{
  "id": 1216,
  "kind": "paper",
  "title": "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.",
  "body": "",
  "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",
  "url": "https://arxiv.org/abs/2601.15380",
  "links": [],
  "authors": [
    "Elon Litman",
    "Gabe Guo"
  ],
  "tags": [
    "goat",
    "attention-priors",
    "entropic-optimal-transport",
    "rope",
    "attention-sinks",
    "long-context-extrapolation",
    "flashattention"
  ],
  "topics": "attention mechanisms, optimal transport, positional encodings, long-context, attention sinks, FlashAttention",
  "venue": "arXiv:2601.15380 (cs.LG), submitted 21 Jan 2026, v2 23 Aug 2026",
  "publisher": "",
  "source": "arxiv",
  "language": "en",
  "access": "free",
  "license": "",
  "published_year": 2026,
  "added_at": "2026-10-03T00:00:00.000Z",
  "verified_at": "2026-10-03T00:00:00.000Z",
  "attrs": {},
  "enrichment": {},
  "enriched_at": null,
  "license_class": "unknown",
  "langs": [
    "en"
  ],
  "modalities": [],
  "size_class": null,
  "provenance": {
    "channel": "random-papers",
    "legacy_paper_id": "1525"
  },
  "visibility": "public",
  "status": "active",
  "duplicate_of": null,
  "origin": "legacy",
  "created_at": "2026-10-03T22:07:28.852Z",
  "updated_at": "2026-10-03T22:07:28.852Z",
  "page": "https://papers.projxon.ai/entries/1216",
  "markdown": "https://papers.projxon.ai/entries/1216.md",
  "api": "https://papers.projxon.ai/api/entries/1216",
  "relations": [],
  "duplicates": [],
  "similar": [
    {
      "id": 1263,
      "kind": "paper",
      "title": "The Spike, the Sparse and the Sink: Anatomy of Massive Activations and Attention Sinks",
      "summary": "Mechanistically studies two recurring Transformer phenomena: massive activations (a few tokens show extreme outliers in a few channels) and attention sinks (certain tokens attract disproportionate attention mass regardless of relevance). Through systematic experiments, shows their co-occurrence is largely an architectural artifact of modern Transformer design, and the two serve related but distinct functions: massive activations operate globally — inducing near-constant hidden representations that persist across layers, effectively functioning as implicit parameters — while attention sinks operate locally, modulating attention outputs across heads and biasing individual heads toward short-range dependencies. The pre-norm configuration is the key architectural choice that enables the co-occurrence; ablating it decouples the two phenomena. Practical upshot: modifying normalization logic or adding dynamic gating can eradicate massive activations without hurting LM performance, giving a structural path to safer ultra-low-precision quantization and efficient KV-cache management.",
      "url": "https://arxiv.org/abs/2603.05498",
      "authors": [
        "Shangwen Sun",
        "Alfredo Canziani",
        "Yann LeCun",
        "Jiachen Zhu"
      ],
      "tags": [
        "massive-activations",
        "attention-sinks",
        "interpretability",
        "pre-norm",
        "nyu",
        "meta"
      ],
      "venue": "arXiv 2603.05498 [cs.AI/cs.CL], submitted 5 Mar 2026, preprint",
      "source": "x",
      "license": "",
      "published_year": 2026,
      "added_at": "2026-10-05T00:00:00.000Z",
      "has_dataset_profile": false,
      "license_class": "unknown",
      "langs": [
        "en"
      ],
      "modalities": [],
      "size_class": null,
      "citation_count": null,
      "downloads": null,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/1263",
      "markdown": "https://papers.projxon.ai/entries/1263.md",
      "api": "https://papers.projxon.ai/api/entries/1263"
    },
    {
      "id": 500,
      "kind": "paper",
      "title": "DualKV: Shared-Prompt Flash Attention for Efficient RL Training with Large Rollouts and Long Contexts",
      "summary": "Standard FA2 packs N same-prompt rollouts as N(P+R) tokens, recomputing the prompt N times. DualKV repacks to P+NR and splits attention into one prompt self-attention plus a fused kernel that reads shared KV once and accumulates N-way dK/dV with fp32 atomics; mathematically equivalent, no approximation. On Qwen3-8B GRPO (8xH100, N=32, 8K-context) policy-update is 1.63–2.09x faster, MFU 36%→76%; DAPO 2.47x / 77% MFU. At 30B MoE on 16xH100, 3.82x policy-update and 3.38x step vs FA2 that needs 4-way Ulysses SP. Also supports Gemma-4 hybrid d=512 / sliding-window at 64K. Code https://github.com/amazon-science/dualkv-flash-attn-for-rl.",
      "url": "https://arxiv.org/abs/2605.15422",
      "authors": [
        "Jiading Gai",
        "Shuai Zhang",
        "Xiang Song",
        "Bernie Wang",
        "George Karypis"
      ],
      "tags": [
        "dualkv",
        "flashattention",
        "grpo",
        "dapo",
        "kv-cache",
        "rl-training",
        "verl",
        "amazon",
        "prefix-sharing"
      ],
      "venue": "arXiv / Amazon Web Services",
      "source": "",
      "license": "",
      "published_year": 2026,
      "added_at": "2026-10-01T16:45:04.296Z",
      "has_dataset_profile": false,
      "license_class": "unknown",
      "langs": [],
      "modalities": [],
      "size_class": null,
      "citation_count": 2,
      "downloads": null,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/500",
      "markdown": "https://papers.projxon.ai/entries/500.md",
      "api": "https://papers.projxon.ai/api/entries/500"
    },
    {
      "id": 529,
      "kind": "paper",
      "title": "Screening Is Enough",
      "summary": "Multiscreen screens unit-normalized QK similarities with Trim (exact zero below threshold) and a learned causal Softmask window, then aggregates surviving values without competition; MiPE rotates only two dims and turns off for large windows. On SlimPajama (2^38 tokens, seq 2^12) it matches Transformer val loss with ~30% fewer params, stays stable at LR 2^{-4} (Transformer diverges), holds long-context PPL past train length, and on ABCDigits retrieval a 286M Multiscreen beats a 1.3B Transformer (99.18% vs 95.98% at train ctx; little degradation to 2^17). Full-context forward latency lower than FlashAttention Transformer at long ctx (RTX 4090, no KV cache). ABCDigits generator https://github.com/ken-nakanishi/abcdigits.",
      "url": "https://arxiv.org/abs/2604.01178",
      "authors": [
        "Ken M. Nakanishi"
      ],
      "tags": [
        "multiscreen",
        "screening",
        "long-context",
        "attention",
        "abcdigits",
        "rope",
        "mamba-alternative",
        "riken"
      ],
      "venue": "arXiv / RIKEN CEMS / The University of Tokyo",
      "source": "",
      "license": "",
      "published_year": 2026,
      "added_at": "2026-10-01T16:45:05.207Z",
      "has_dataset_profile": false,
      "license_class": "unknown",
      "langs": [],
      "modalities": [],
      "size_class": null,
      "citation_count": 1,
      "downloads": null,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/529",
      "markdown": "https://papers.projxon.ai/entries/529.md",
      "api": "https://papers.projxon.ai/api/entries/529"
    },
    {
      "id": 1230,
      "kind": "paper",
      "title": "Broken Symmetry in BF16 Attention: Why FlashAttention Gradients Blow Up Late in Training",
      "summary": "Diagnoses a late-training blow-up training a 450M transformer on 50B tokens with FlashAttention-3 in BF16: healthy for 25B tokens, then gradient norm grows 1000x and loss ends 0.2 nats above FP32 attention — with no NaNs at all. Recomputing just two layers' attention backward in FP32 removes almost all excess gradient. Part of the cause is known (a fused multiply-add in the forward softmax, never fixed in FA3); repairing it stops the blow-up but leaves the query gradient wrong by more than its own size (219% median error). The deeper cause is a broken conservation law: the softmax score gradient dS sums to zero along every row, making dQ blind to where the keys sit as a group; rounding dS to BF16 leaves a small nonzero sum that leaks the mean key into dQ — and the leak grows exactly as late training makes keys large and attention sharp. Fix: GProj (gauge projection), which restores the zero row sum after the cast with two rank-one corrections per row — cuts median dQ/dK errors from 219%/13% to 0.34%/0.37% (FP32-attention level) for 4.7% more step time; in matched from-scratch runs it reaches the same loss as FP32 attention while FA3 and key smoothing destabilize. KohakuBlueleaf replied on the thread reporting the same class of precision bug in FA4/cuDNN/flex attention and their KohakuFA fix. If a BF16 run blows up late with no NaNs, check the attention backward. Directly relevant to the user's LLM training-run debugging work.",
      "url": "https://arxiv.org/abs/2609.34272",
      "authors": [
        "Junlin Chen",
        "Daize Dong",
        "Huanwei Di",
        "Haolong Jia",
        "Jiawei Wu",
        "Haotian Xie",
        "Mingkai Zheng",
        "Yang Li",
        "Leshang Chen",
        "Huishu Wang",
        "Eric P. Xing",
        "Hongyi Wang"
      ],
      "tags": [
        "flashattention",
        "bf16",
        "gradient-stability",
        "attention-backward",
        "precision",
        "gproj",
        "gauge-projection",
        "kohakufa"
      ],
      "venue": "arXiv:2609.34272 (cs.LG), submitted 28 Sep 2026",
      "source": "arxiv",
      "license": "",
      "published_year": 2026,
      "added_at": "2026-10-04T00:00:00.000Z",
      "has_dataset_profile": false,
      "license_class": "unknown",
      "langs": [
        "en"
      ],
      "modalities": [],
      "size_class": null,
      "citation_count": null,
      "downloads": null,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/1230",
      "markdown": "https://papers.projxon.ai/entries/1230.md",
      "api": "https://papers.projxon.ai/api/entries/1230"
    },
    {
      "id": 1257,
      "kind": "paper",
      "title": "A Unified View of Attention and Residual Sinks: Outlier-Driven Rescaling is Essential for Transformer Training",
      "summary": "Unifies the two emergent outlier phenomena in LLMs — attention sinks (a few tokens receiving large attention logits) and residual sinks (fixed dimensions with persistently large activations) — under 'outlier-driven rescaling': the outliers work jointly with normalization (softmax attention, RMSNorm) to rescale non-outlier components, and this mechanism is validated across architectures and training token counts. Main conclusions: (1) outliers function jointly with normalization — removing normalization eliminates the outliers but degrades training stability and performance; clipping outliers while keeping normalization also degrades, so outlier-driven rescaling contributes to training stability; (2) outliers act as rescale factors, not contributors — their post-norm contributions are far smaller than non-outliers'; (3) outliers can be absorbed into learnable parameters or replaced by explicit gated rescaling (GatedNorm), improving training performance by an average of 2 points and drastically improving quantization robustness (only 1.2 points degradation under W4A4). Since outliers' post-norm contribution is tiny, relying on them is what makes LLM quantization a nightmare (huge dynamic ranges).",
      "url": "https://arxiv.org/abs/2601.22966",
      "authors": [
        "Zihan Qiu",
        "Zeyu Huang",
        "Kaiyue Wen",
        "Peng Jin",
        "Bo Zheng",
        "Yuxin Zhou",
        "Haofeng Huang",
        "Zekun Wang",
        "Xiao Li",
        "Huaqing Zhang",
        "Yang Xu",
        "Haoran Lian",
        "Siqi Zhang",
        "Rui Men",
        "Jianwei Zhang",
        "Ivan Titov",
        "Dayiheng Liu",
        "Jingren Zhou",
        "Junyang Lin (Qwen Team)"
      ],
      "tags": [
        "attention-sinks",
        "massive-activations",
        "outliers",
        "normalization",
        "gatednorm",
        "quantization",
        "qwen"
      ],
      "venue": "arXiv 2601.22966 [cs.CL], submitted 30 Jan 2026, preprint",
      "source": "x",
      "license": "",
      "published_year": 2026,
      "added_at": "2026-10-05T00:00:00.000Z",
      "has_dataset_profile": false,
      "license_class": "unknown",
      "langs": [
        "en"
      ],
      "modalities": [],
      "size_class": null,
      "citation_count": null,
      "downloads": null,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/1257",
      "markdown": "https://papers.projxon.ai/entries/1257.md",
      "api": "https://papers.projxon.ai/api/entries/1257"
    },
    {
      "id": 782,
      "kind": "code",
      "title": "xattn",
      "summary": "Efficient attention modules for the xLLM framework, with Python APIs for use in other PyTorch projects. Features high-precision FP32 attention output state for backward (reducing BF16 gradient error) and flexible segment-aware masking (segment IDs or BOS masks) for packed sequences. Supports causal Flash Attention, sliding window, sliding chunk, and SoftDelta attention variants; FP16/BF16 inputs; MHA, GQA, and MQA.",
      "url": "https://github.com/ifm-ai/xattn",
      "authors": [
        "Institute of Foundation Models (IFM AI)"
      ],
      "tags": [
        "attention",
        "flashattention",
        "cuda-kernels",
        "long-context",
        "pytorch"
      ],
      "venue": "GitHub",
      "source": "github",
      "license": "Apache-2.0",
      "published_year": 2026,
      "added_at": "2026-09-29T00:00:00.000Z",
      "has_dataset_profile": false,
      "license_class": "permissive",
      "langs": [
        "en"
      ],
      "modalities": [],
      "size_class": null,
      "citation_count": null,
      "downloads": null,
      "stars": 8,
      "page": "https://papers.projxon.ai/entries/782",
      "markdown": "https://papers.projxon.ai/entries/782.md",
      "api": "https://papers.projxon.ai/api/entries/782"
    }
  ]
}
