PapersSelected

THOT paper: hub-based optimal transport replaces dense attention matrices

Topology Hub Optimal Transport: Eliminating Long Context Dilution at Flash Speed

Why we picked it

The striking result is length generalisation: attention trained at 128 tokens still retrieves bindings reliably at 262K, which standard RoPE FlashAttention does not do in this setting. Practitioners working on long-context RAG, document QA or agent memory can benchmark THOT against FlashAttention and latent softmax using the released Triton kernels, noting the multi-layer runs still use an unfused path. Teams deciding between sparse attention and retrieval-augmentation should weigh that the language-modelling gains on small models are modest compared with the retrieval gains.

An arXiv paper (arXiv:2611.27951) introduces Topology Hub Optimal Transport (THOT), a sparse attention method that replaces the dense L×L attention matrix with a linear-size graph over local windows and K shared hubs, balanced by Sinkhorn scaling. The goal is to stop long-context dilution, where normalization mass spreads across hundreds of thousands of distractor tokens and retrieval accuracy degrades with sequence length.

Body

THOT combines four components: capacity gating via simplex sparsemax at O(L log L) or a sorting-free token-local thresholded ReLU at O(L) that drives distractor mass to zero; a three-sweep annealed row-closed Sinkhorn schedule; a rank-(D+2R+1) One-Reference-Tile adjoint implemented in batched split-factor Triton kernels with BF16 Tensor Cores and FP32 potentials; and a chunked exclusive-prefix causal variant with verified zero future leakage. On a single NVIDIA L4, a model trained at L=128 reaches 97.40% zero-shot recall of fixed bindings at L=262,144 under pure task loss, and 98.83% with α=0.05; softmax-gated hub OT drops to 3.52%. The kernel runs forward+VJP in 100.1 ms at L=262K, 2.2x faster than latent softmax, and 1.34 ms versus 4.37 ms for cuDNN FlashAttention at L=4,096. Zero-shot WikiText-103 multi-needle retrieval at L=65K scores 100.00% (128/128) against 0.78% for short-trained RoPE FlashAttention.

The work builds on block-wise tail refinement and fixed-support transport topology from two earlier papers, and positions optimal transport as an alternative to softmax attention for extreme-length retrieval. Compact 4-layer WikiText-4K runs show only modest causal and masked LM gains, so the strongest evidence is in needle-retrieval at long context rather than general language modelling.

Original · arXiv cs.LG

Topology Hub Optimal Transport: Eliminating Long Context Dilution at Flash Speed

Long-context models use sparse or structured attention to avoid quadratic cost, yet retrieving a small set of relevant facts embedded among hundreds of thousands of distractors degrades as normalization mass disperses with length. Hub-and-spoke optimal transport (OT) replaces the dense $L \times L$ matrix with a linear-size graph over local windows and $K$ shared hubs balanced by Sinkhorn scaling. Building on block-wise tail refinement and fixed-support transport topology (arXiv:2605.08123, arXiv:2609.07954), we introduce Topology Hub Optimal Transport (THOT): (1) bounded-support capacity gating via simplex sparsemax ($O(L\log L)$) or sorting-free token-local thresholded ReLU ($O(L)$), driving excess distractor mass to zero; (2) a three-sweep $1+2$ annealed row-closed Sinkhorn schedule that damps bipartite residuals; (3) an exact rank-$(D+2R+1)$ One-Reference-Tile adjoint in batched split-factor Triton kernels (BF16 Tensor Cores, FP32 potentials); and (4) a chunked exclusive-prefix causal variant with verified zero future leakage. On NVIDIA L4, sparsemax THOT trained at $L=128$ reaches 97.40% zero-shot recall of fixed bindings at $L=262{,}144$ under pure task loss ($α=0$) and 98.83% at $α=0.05$ (matched by $O(L)$ thresholded ReLU at $α=0.05$, vs. 80.60% at $α=0$), while softmax-gated hub OT drops to 3.52%. In bidirectional operator microbenchmarks, our kernel runs forward+VJP in 100.1 ms at $H=8, D=64, L=262\mathrm{K}$ (2.2x faster with 4.0x smaller compiler temporaries than latent softmax) and 1.34 ms vs. 4.37 ms for cuDNN FlashAttention at $L=4{,}096$; multi-layer LM runs use the unfused path. Zero-shot WikiText-103 multi-needle retrieval hits 100.00% (128/128 queries at $L=65\mathrm{K}$) vs. 0.78% for short-trained RoPE FlashAttention, and compact 4-layer WikiText-4K runs show modest causal and masked LM gains.

Industry Coordinates & Source Verification

This report is categorized under AITOP's "Papers" desk. Within our cross-regional analytical framework, it directly maps to AI developer toolchains, coding agents, and engineering workflows. Key entities and technical topics under continuous tracking include THOT, optimal transport, FlashAttention, long context.

Source attribution: curated from arXiv cs.LG (@Dylan Forde).