Structured Token Statistics Transformer: Linear-Time Attention via Tighter Coding-Rate Bounds

Menghui Zhou, Po YangarXiv 2026

TL;DR

Linear-time attention mechanisms often avoid quadratic bottlenecks by summarizing tokens into compact statistics, yet doing so per-coordinate makes them blind to how features co-vary. Structured Token Statistics Transformer (SToST) bridges this gap by grouping feature coordinates into tiny blocks and tracking their joint statistics. You keep the holy grail of linear scaling in sequence length while capturing rich feature correlations—all derived cleanly from first principles of information theory.

What Problem Does This Paper Address?

Standard self-attention compares every token to every other token. It is expressive, but as sequences grow, the $O(n^2)$ cost becomes painful.

A clever recent alternative, the Token Statistics Transformer (ToST), belongs to the family of "white-box" transformers—architectures where layers are mathematically derived as optimization steps on an explicit information-theoretic objective called coding rate (roughly, the bit-volume needed to represent data). Instead of building an $n \times n$ pairwise interaction matrix, ToST summarizes projected tokens using compact second moments (feature energies) and adjusts tokens based on those summaries, achieving $O(n)$ linear time.

Here is the catch: ToST is strictly diagonal. It tracks the energy of each projected feature coordinate in isolation. Imagine two features that have the exact same individual energies across two different inputs, except in Input A they always fire together, and in Input B they fire separately. Under the same projection, ToST’s scalar filter cannot tell those two inputs apart. While a network can learn a shared basis to reduce correlations globally, a fixed set of weights cannot diagonalize the statistics of every unique input. Can we capture how features vary together without giving up linear efficiency?

Methods

Enter SToST and its core attention operator, Structured Token Statistics Attention (STSA).

Instead of evaluating every feature coordinate solo (size $1$) or computing a massive covariance matrix across the entire head width $p$ (size $p$), the authors partition the $p$ feature coordinates within each attention head into small groups of bounded size $b_r \le B$ (for example, pairs of features where $B=2$).

  1. Standard Routing & Projection: Like ToST, tokens are projected into head subspaces and softly assigned to groups via an energy-based router.
  2. Novel Block Statistics: Within each small feature group, STSA computes a tiny $b_r \times b_r$ block second-moment matrix across the tokens, preserving pairwise cross-moments inside that group.
  3. Matrix Solves Instead of Scalar Gates: Taking a gradient descent step on this tighter, block-structured coding-rate upper bound yields the STSA update. Instead of multiplying each feature by a simple scalar gate, STSA solves tiny positive-definite linear systems (using Cholesky factorization) for each block.
Table 1. Per-head statistical core. Uniform-size rows assume b | p. Projections and token activations are excluded.

When the group size is $1$, SToST mathematically reduces to ToST. When bounded by a constant $B$, it preserves ToST’s $O(np)$ time and $O(p)$ statistical storage orders.

Datasets

The authors run preliminary, from-scratch pilot evaluations on two standard benchmarks (no new datasets are introduced):

  • CIFAR-10: $32 \times 32$ image classification (50,000 training images, 10,000 test images).
  • WikiText-2: Causal language modeling tokenized with the GPT-2 subword vocabulary (2.40M training tokens, 284,614 test tokens).

Key Insights and Ideas

  • Classical Math Meets Attention Design: Using the classical Hadamard–Fischer determinant inequality, the authors prove a clean hierarchy: grouping coordinates guarantees a coding-rate upper bound that is never looser than ToST’s diagonal bound, and strictly tighter the moment any within-group correlation is nonzero.
  • Measuring the Leftover Gap: What do you lose by ignoring correlations between separate blocks? The authors show that the remaining gap between their block surrogate and the full projected coding rate is the Kullback–Leibler (KL) divergence of a noise-regularized Gaussian surrogate—neatly quantifying the discarded inter-block dependence.
  • Subspace Invariance: Because STSA uses small matrix filters rather than coordinatewise gates, rotating the coordinate basis inside a feature block leaves the attention output unchanged. It cares about the subspace, not arbitrary coordinate axes.
  • Big-O Isn't Wall-Clock: Keeping maximum block size $B$ constant preserves $O(np)$ scaling, whereas fixing the number of blocks breaks linear scaling in head width $p$. Even so, swapping hardware-friendly scalar division for tiny $2 \times 2$ Cholesky solves introduces noticeable constant-factor runtime overhead.

Key Results

In single-run, head-to-head pilots matching initial weights and hyperparameters, SToST using tiny feature pairs ($B=2$) consistently nudges quality upward compared to ToST ($B=1$), at the cost of wall-clock speed:

  • Image Classification (CIFAR-10): SToST-Tiny improves test accuracy from 86.42% to 86.81%, while training takes $2.03\times$ longer and inference latency rises from 15.36 ms to 22.14 ms.
Table 2. CIFAR-10 pilot: test accuracy, training time, and full- model inference latency.
  • Language Modeling (WikiText-2): SToST-Base lowers test perplexity from 326.09 to 318.91 (a 2.20% reduction), running at $1.48\times$ the training time and $1.51\times$ slower evaluation throughput.
Table 3. WikiText-2 pilot: test perplexity, training time, and teacher-forced evaluation throughput.

Limitations and Future Work

The authors are refreshingly candid about what their theory and pilots do—and do not—prove:

  • Tighter Bounds $\neq$ Guaranteed Accuracy: Proving a tighter mathematical bound at fixed weights does not guarantee that independently trained networks will achieve lower task loss.
  • Omitted Correlations & Partitioning: Correlations between distinct groups are still ignored, and the theory does not dictate which features ought to be grouped together.
  • Preliminary Empirical Scope: The experiments are single-seed pilots (with CIFAR-10 run on separate host machines), not multi-seed statistical validations. Scaling tests up to full ImageNet-1K and OpenWebText pretraining, testing larger or unequal block sizes, and optimizing low-level GPU kernels to shrink the linear-solve overhead remain open next steps.

Summary updated

BibTeX
@misc{zhou2026structured,
  author = {Menghui Zhou and Po Yang},
  title = {{Structured Token Statistics Transformer: Linear-Time Attention via Tighter Coding-Rate Bounds}},
  year = {2026},
  eprint = {2611.37614},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.37614},
}
Figure