You Need Better Attention Priors
Summary
Generalizes attention through the lens of Entropic Optimal Transport (EOT): standard attention corresponds to a transport problem regularized by an implicit uniform prior. GOAT (Generalized Optimal Transport Attention with Trainable priors) replaces that naive assumption with a learnable, continuous prior that decouples spatial geometry from token semantics — standard positional encodings (e.g., RoPE) entangle position with meaning and corrupt semantic representations when forced to handle structural biases like attention sinks. The prior maintains full compatibility with optimized kernels like FlashAttention (zero compute overhead). GOAT also provides an EOT-based explanation of attention sinks and a solution that avoids standard attention's representational trade-offs. By absorbing spatial information into the core attention computation, GOAT learns an extrapolatable prior combining the flexibility of learned positional embeddings with the length generalization of fixed encodings — strong long-context extrapolation beyond training length.
- Venue
- arXiv:2601.15380 (cs.LG), submitted 21 Jan 2026, v2 23 Aug 2026
- Source
- arxiv
- Access
- free
- Language
- en
- Added
- Oct 3, 2026
- Verified
- Oct 3, 2026
- Found via
- #random-papers
Tags
Topics
attention mechanisms, optimal transport, positional encodings, long-context, attention sinks, FlashAttention
Research notes
- Discovery: @hooshaaii (Hoosha) X thread 2026-10-03 3:04 PM ET (https://x.com/hooshaaii/status/2106460401852661820), 1.3K views, 3 self-thread replies
- Stanford
- Code: github.com/elonlit/goat
- License: CC BY 4.0
Similar entries
- Paper The Spike, the Sparse and the Sink: Anatomy of Massive Activations and Attention Sinks
- Paper DualKV: Shared-Prompt Flash Attention for Efficient RL Training with Large Rollouts and Long Contexts
- Paper Screening Is Enough
- Paper Broken Symmetry in BF16 Attention: Why FlashAttention Gradients Blow Up Late in Training
- Paper A Unified View of Attention and Residual Sinks: Outlier-Driven Rescaling is Essential for Transformer Training
- Code xattn