CAPS: Unifying Attention, Recurrence, and Alignment in Transformer-based Time Series Forecasting

Viresh Pati, Yubin Kim, Vinh Pham, Jevon Twitty, Shihao Yang +1 more
2/2/2026
cs.LGcs.AI

Official code: vireshpati/CAPS-Attention (0 stars, last commit 2026-02-07).

Abstract

This paper presents $\textbf{CAPS}$ (Clock-weighted Aggregation with Prefix-products and Softmax), a structured attention mechanism for time series forecasting that decouples three distinct temporal structures: global trends, local shocks, and seasonal patterns. Standard softmax attention entangles these through global normalization, while recent recurrent models sacrifice long-term, order-independent selection for order-dependent causal structure. CAPS combines SO(2) rotations for phase alignment with three additive gating paths -- Riemann softmax, prefix-product gates, and a Clock baseline -- within a single attention layer. We introduce the Clock mechanism, a learned temporal weighting that modulates these paths through a shared notion of temporal importance. Experiments on long- and short-term forecasting benchmarks surpass vanilla softmax and linear attention mechanisms and demonstrate competitive performance against seven strong baselines with linear complexity. Our code implementation is available at https://github.com/vireshpati/CAPS-Attention.

View on arXivView PDF

Code Implementations(1)

Official implementation for CAPS: Clock-weighted Aggregation with Prefix-Products and Softmax.

01Shell, PythonFeb 2, 20268 months ago

Similar Papers

Cite this paper

@article{pati2026caps,
  title  = {CAPS: Unifying Attention, Recurrence, and Alignment in Transformer-based Time Series Forecasting},
  author = {Viresh Pati and Yubin Kim and Vinh Pham and Jevon Twitty and Shihao Yang and Jiecheng Lu},
  year   = {2026},
  eprint = {2602.02729},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2602.02729v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2602.02729.svg)](https://codeofpaper.com/paper/2602.02729)

Discussion