NeurIPS 2026QuestionsPapersAreasAboutMarkdown

Two Layers of Attention Stability: A Koopman-Operator Analysis of Linear and Softmax Attention

zhenglong chen

NeurIPS page · Open on the map

Category: Interpretability & Model Adaptation › Transformer Attention Theory · Type: theory · Keywords: attention stability, Koopman operator, linear attention, softmax attention, time-series forecasting, spectral analysis

Areas: Model Architectures & Sequence Modeling › Language Model Architectures › Attention Replacement and Stabilization

Summary

Two Layers of Attention Stability: A Koopman-Operator Analysis of Linear and Softmax Attention provides a theoretical framework that explains why linear attention diverges on long sequences while softmax attention remains stable, and proposes two stabilized linear-attention variants (SN-LA, RN-LA) that close most of the performance gap on time-series benchmarks.

Explained to a 5-year-old

Computers sometimes need to remember many things at once, like a long story. To help them, they use something called attention, which lets them focus on important parts. Some attention methods work quickly but get confused on long lists. Others, like softmax attention, stay calm even when the list is long. The researchers used a special math idea to understand why this happens and split the problem into two parts. They found a rule that helps make the confusing attention stable, and built two new stable versions. These new versions work almost as well as the stable ones and help computers handle long lists better.

Explained to a 5-year-old, longer

Computers need to keep track of many items, such as a long paragraph or a long sequence of numbers. To decide which items matter most, they use a mechanism called attention. Some attention methods are fast but can break when the list becomes very long. Other attention methods stay reliable even with long lists. The researchers used a mathematical tool called a Koopman operator to study why these differences happen. They discovered that stability can be understood by looking at two separate layers: one about how the attention matrix is built, and another about how the training changes it. By controlling the first layer and leaving the second free, they created two new attention methods that stay stable. These new methods keep the speed benefits of linear attention while performing almost as well as the stable softmax attention. In experiments on time-series data, the new methods closed most of the performance gap with softmax and even beat it on some datasets. This work gives a clear rule for designing future attention mechanisms that are both fast and stable.

For a technical reader

The paper introduces a two-layer decomposition of attention stability, separating architectural and dynamical components. It provides a Koopman-operator analysis that links linear and softmax attention through spectral properties and proves three key theoretical results. Based on these insights, a design principle is derived that constrains the architectural layer while freeing the dynamical layer, leading to two new stabilized linear-attention variants. Empirical evaluation on time-series benchmarks shows these variants close a large portion of the performance gap with softmax attention and sometimes outperform it, all while preserving the desirable dynamical-layer flexibility.

Problem

Adapting attention mechanisms for long sequences often leads to instability in linear attention, while softmax attention remains stable, raising the question of why this difference occurs under the same predictive objective.

Method

The approach decomposes attention stability into an architectural layer, concerning the spectrum of the token-mixing matrix, and a dynamical layer, concerning the spectrum of the dual operator induced by training. It provides theoretical proofs linking linear and softmax attention to Koopman operators and derives a design principle that constrains the architectural layer while leaving the dynamical layer free, leading to stabilized linear-attention variants.

Results

Numerical experiments reveal a hierarchy of architectural stability: vanilla linear attention diverges immediately, stabilized variants delay divergence, and softmax remains bounded. On real time-series benchmarks (ETT, Weather), the approach closes ≥80% of the vanilla-to-softmax gap and surpasses softmax on 3/5 datasets at long horizons, while preserving dynamical-layer freedom.

Contributions

The paper introduces a two-layer decomposition of attention stability, provides a Koopman-operator analysis linking linear and softmax attention, proves three concrete theoretical results, and derives a design principle that constrains the architectural layer while freeing the dynamical layer.

Limitations and assumptions

The analysis assumes a shared encoder and focuses on causal attention; the theoretical results rely on specific normalization schemes (LayerNorm vs RMSNorm); empirical evaluation is limited to a few time-series benchmarks.

Practical relevance

The findings enable more stable and efficient linear attention for long-sequence tasks, offering a path to retain computational benefits while achieving performance comparable to softmax attention.

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction