TL;DR
Standard transformers treat every input the same inside a layer: they take a single snapshot of how tokens relate to one another and immediately move on. Fixed-Point Self-Attention (FPSA) turns attention into an iterative feedback loop, letting queries and keys refine their relationships until they naturally settle into an equilibrium. Without adding a single new parameter, FPSA acts as a drop-in upgrade that lets models "think" longer on complex tokens while breezing past easy ones—boosting accuracy across language, vision, and reasoning tasks for a modest compute fee.
What Problem Does This Paper Address?
Whether a transformer is reading "The cat sat" or a tangled sentence of quantum mechanics, each layer allocates the exact same computational effort: queries examine keys, select values, and pass the result forward in one rigid pass. This is especially limiting for encoder models (like BERT or Vision Transformers) that don't generate text token-by-token and thus lack a natural way to do extra test-time "thinking."
Researchers have tried adding adaptive compute by looping entire transformer blocks, adding early-exit ramps, or building auxiliary routing networks. While effective, repeating a whole block means repeatedly running the heavy feed-forward network (FFN), which gets expensive fast. The authors ask a more surgical question: Can we iteratively refine just the attention alignment itself—where context is actually built—while leaving the rest of the transformer block completely untouched?
Methods
FPSA treats the self-attention sublayer as a miniature dynamical system searching for a mathematical equilibrium—a fixed point where $Z^* = f(Z^*)$.
Here is how the inner loop works inside a single layer:
- Anchor the Values: Value vectors ($V$) are computed once from the layer’s input and held completely static. This separates refining token alignments from remixing token content.
- Evolve Queries and Keys: Starting from an initial state $Z_0$, the model computes Queries ($Q$) and Keys ($K$), calculates attention weights, applies them to the static $V$, and mixes the new output with the previous state using a damping factor ($\alpha = 0.8$) for smooth convergence.
- Stop When Settled: Each token and head stops updating once its relative change drops below a tiny threshold $\epsilon$ (or hits a hard safety cap). Only after settling does the representation exit into the standard residual connection and FFN.
Two tricks keep training fast and stable: spectral normalization on the $W_Q$ and $W_K$ matrices guarantees the loop actually contracts rather than exploding, and masked implicit differentiation computes gradients directly at the equilibrium point—meaning memory cost stays constant regardless of how many steps a token takes. The authors also test FPSA-LH, a variant that learns when to halt rather than using a fixed threshold.
Datasets
The authors evaluate FPSA across an unusually wide range of benchmarks (no new datasets are introduced, though a synthetic 8k Needle-in-a-Haystack test is constructed):
- Language & Reasoning: GLUE, SQuAD v2.0 (encoders); GSM8K, MMLU, BBH, and LogiQA (7B decoders); Sudoku-Extreme, Maze-Hard, ARC-1, and ARC-2 (recurrent reasoning).
- Vision & Multimodal: ImageNet-1K and ImageNet-C (out-of-distribution corruption robustness); DIV2K, BSD68, Set14, and GoPro (image restoration); COCO, Flickr30k, and VQA v2.
Key Insights and Ideas
- Location of the loop matters: Looping only $Q$ and $K$ while freezing $V$ and leaving the heavy FFN outside the loop outperforms looping entire transformer blocks under matched compute budgets. Refining who talks to whom before transforming features is a remarkably clean inductive bias.
- Adaptivity emerges for free: Without explicit routing rules, semantically dense words (like "randomized" or "generalize") naturally take dozens of iterations to settle, while punctuation and simple words halt in 2–3 steps.
- Spectral normalization is non-negotiable: Ablating spectral normalization on $W_Q$ and $W_K$ causes every token to slam into the maximum iteration cap and collapses GLUE scores from 88.4% down to 37.8%.
- Test-time compute knob: Because setting the max iteration cap to 1 recovers standard attention without degradation, engineers can dial iterations up or down at deployment to trade latency for accuracy on the fly—no retraining required.
Key Results
Across controlled, size-matched baselines, FPSA delivers consistent gains for moderate overhead (~1.6$\times$ GFLOPs and ~1.36$\times$ latency on BERT-Base):
- Language Encoders: Boosts a reproduced BERT-Base (110M) by +10.1 points on GLUE (with massive jumps on reasoning-heavy CoLA +12.2 and RTE +12.8) and +15.1 F1 on SQuAD v2.0. Gains hold from 29M up to 340M parameters.
- 7B Decoders & Long Context: Adding FPSA during matched LoRA fine-tuning lifts Mistral-7B by +5.4 on BBH and +2.7 on GSM8K. On an 8k-context Needle-in-a-Haystack task, it beats a compute-matched deeper transformer by +7.2 percentage points under heavy distractors.
- Vision: Improves ViT-B/16 by +1.7% Top-1 accuracy on clean ImageNet-1K, sets a new accuracy-compute Pareto frontier for corruption robustness on ImageNet-C, and adds +2.0 dB PSNR on Set14 super-resolution over its Uformer-S backbone.
Limitations and Future Work
In the main text, the authors note several practical trade-offs (deferring a fuller discussion of limitations and open questions to Appendix M):
- Non-trivial latency and tail behavior: Even though FFN layers aren't looped, FPSA reduces throughput (from 344k to 128k tok/s on BERT-Base) and introduces variable per-input timing, pushing p99 latency higher than p50 (31.5 ms vs. 19.3 ms).
- Uneven task benefits: Extra refinement doesn't help every problem equally; tasks where standard single-pass representations are already strong (like QNLI) see modest gains compared to complex relational tasks.
- Future directions: Promising next steps include scaling FPSA further, pairing it with sparse Mixture-of-Experts (where MoE adapts width and FPSA adapts depth), and building systems-level hardware optimizations for dynamic in-layer loops.
Summary updated