cs.LGOct 14, 2026

Beyond Static Positional Encoding: Bayesian Time-aware Attention for Non-Stationary Long-term Time Series Forecasting

Authors: Xinjie Lan, Yunbo Mei, Leheng Zhou, Hao Qi

Organizations: Rice University · University of Hong Kong · University of North Carolina at Charlotte

Abstract

Transformers have demonstrated strong performance in long-term time series forecasting (LTSF), yet modeling non-stationary temporal dependencies remains challenging. In this paper, we interpret self-attention as a Bayesian posterior over attended positions, combining a content-based prior induced by scaled dot-product similarity with a temporal-evidence likelihood induced by positional encoding. This formulation provides a probabilistic interpretation of how positional encoding shapes the temporal dependencies captured by self-attention. Building on this perspective, we derive a population-level evidence lower bound (ELBO) that characterizes the role of positional encoding in forecasting weakly stationary time series. Our analysis further highlights a limitation of static positional encoding: when temporal dependence structures vary across input windows, a fixed temporal bias must accommodate heterogeneous dynamics and can therefore be suboptimal for non-stationary forecasting. Motivated by this analysis, we propose Bayesian Time-aware Attention (BTA), which employs a mixture-of-experts (MoE) router to adaptively combine temporal kernels and generate input-conditioned, head-specific positional biases. Extensive experiments on standard LTSF benchmarks demonstrate that BTA consistently improves forecasting performance across multiple Transformer backbones and achieves competitive overall performance with modest computational overhead and stable training.

Figures & tables

Appendix figures & tables19 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Self-Gating Attention for Efficient Time Series Forecasting

    Jul 2, 2026Dezheng Wang, Tong Chen, Wei Yuan +3Time Series ForecastingLinear Attention

  2. Beyond Similarity: Temporal Operator Attention for Time Series Analysis

    May 11, 2026Jevon Twitty, Vinh Pham, Nitiwith Rotchanarak +4Time Series ClassificationTime Series Forecasting

  3. Signed Dual Attention: Capturing Signed Dependencies in Time Series Forecasting

    Jun 3, 2026Balthazar Courvoisier, Tristan CazenaveTime Series ForecastingTransformer Attention