Table of Contents
Fetching ...

Integrating Quantum-Classical Attention in Patch Transformers for Enhanced Time Series Forecasting

Sanjay Chakraborty, Fredrik Heintz

TL;DR

QCAAPatchTF advances time-series analysis by embedding a quantum-classical hybrid self-attention within an optimized patch-based transformer, enabling efficient modeling of multivariate temporal dependencies. By combining classical attention with a variational quantum circuit, it leverages superposition and entanglement to enhance representation learning while reducing computational load via patching. Empirical results across forecasting, classification, and anomaly detection show competitive or state-of-the-art performance and favorable run-time on standard benchmarks, supported by ablation and hyperparameter analyses. This work demonstrates the potential of quantum-enhanced attention for scalable, accurate time-series modeling and suggests avenues for future integration with quantum hardware and larger AI systems.

Abstract

QCAAPatchTF is a quantum attention network integrated with an advanced patch-based transformer, designed for multivariate time series forecasting, classification, and anomaly detection. Leveraging quantum superpositions, entanglement, and variational quantum eigensolver principles, the model introduces a quantum-classical hybrid self-attention mechanism to capture multivariate correlations across time points. For multivariate long-term time series, the quantum self-attention mechanism can reduce computational complexity while maintaining temporal relationships. It then applies the quantum-classical hybrid self-attention mechanism alongside a feed-forward network in the encoder stage of the advanced patch-based transformer. While the feed-forward network learns nonlinear representations for each variable frame, the quantum self-attention mechanism processes individual series to enhance multivariate relationships. The advanced patch-based transformer computes the optimized patch length by dividing the sequence length into a fixed number of patches instead of using an arbitrary set of values. The stride is then set to half of the patch length to ensure efficient overlapping representations while maintaining temporal continuity. QCAAPatchTF achieves state-of-the-art performance in both long-term and short-term forecasting, classification, and anomaly detection tasks, demonstrating state-of-the-art accuracy and efficiency on complex real-world datasets.

Integrating Quantum-Classical Attention in Patch Transformers for Enhanced Time Series Forecasting

TL;DR

QCAAPatchTF advances time-series analysis by embedding a quantum-classical hybrid self-attention within an optimized patch-based transformer, enabling efficient modeling of multivariate temporal dependencies. By combining classical attention with a variational quantum circuit, it leverages superposition and entanglement to enhance representation learning while reducing computational load via patching. Empirical results across forecasting, classification, and anomaly detection show competitive or state-of-the-art performance and favorable run-time on standard benchmarks, supported by ablation and hyperparameter analyses. This work demonstrates the potential of quantum-enhanced attention for scalable, accurate time-series modeling and suggests avenues for future integration with quantum hardware and larger AI systems.

Abstract

QCAAPatchTF is a quantum attention network integrated with an advanced patch-based transformer, designed for multivariate time series forecasting, classification, and anomaly detection. Leveraging quantum superpositions, entanglement, and variational quantum eigensolver principles, the model introduces a quantum-classical hybrid self-attention mechanism to capture multivariate correlations across time points. For multivariate long-term time series, the quantum self-attention mechanism can reduce computational complexity while maintaining temporal relationships. It then applies the quantum-classical hybrid self-attention mechanism alongside a feed-forward network in the encoder stage of the advanced patch-based transformer. While the feed-forward network learns nonlinear representations for each variable frame, the quantum self-attention mechanism processes individual series to enhance multivariate relationships. The advanced patch-based transformer computes the optimized patch length by dividing the sequence length into a fixed number of patches instead of using an arbitrary set of values. The stride is then set to half of the patch length to ensure efficient overlapping representations while maintaining temporal continuity. QCAAPatchTF achieves state-of-the-art performance in both long-term and short-term forecasting, classification, and anomaly detection tasks, demonstrating state-of-the-art accuracy and efficiency on complex real-world datasets.

Paper Structure

This paper contains 26 sections, 2 theorems, 34 equations, 7 figures, 16 tables, 2 algorithms.

Key Result

Lemma 1

The 'Quantum Classical Self-Attention' mechanism, combining quantum superposition and quantum entanglement with classical attention scores, ensures that the attention weights remain non-negative ($A \geq 0$) and retain probabilistic structure ($\sum_i A_{i} = 1$) after normalization via softmax. Thi

Figures (7)

  • Figure 1: Types of Time Series
  • Figure 2: Variational Quantum Circuit
  • Figure 3: Overall approach of QCAAPatchTF
  • Figure 4: Architecture of QCAAPatchTF internal blocks
  • Figure 5: VQE-based Quantum Attention Circuit for Each Head
  • ...and 2 more figures

Theorems & Definitions (2)

  • Lemma 1
  • Lemma 2