Topology Hub Optimal Transport: Eliminating Long Context Dilution at Flash Speed
Abstract
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 matrix with a linear-size graph over local windows and 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 () or sorting-free token-local thresholded ReLU (), driving excess distractor mass to zero; (2) a three-sweep annealed row-closed Sinkhorn schedule that damps bipartite residuals; (3) an exact rank- 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 reaches 97.40% zero-shot recall of fixed bindings at under pure task loss () and 98.83% at (matched by thresholded ReLU at , vs. 80.60% at ), while softmax-gated hub OT drops to 3.52%. In bidirectional operator microbenchmarks, our kernel runs forward+VJP in 100.1 ms at (2.2x faster with 4.0x smaller compiler temporaries than latent softmax) and 1.34 ms vs. 4.37 ms for cuDNN FlashAttention at ; multi-layer LM runs use the unfused path. Zero-shot WikiText-103 multi-needle retrieval hits 100.00% (128/128 queries at ) vs. 0.78% for short-trained RoPE FlashAttention, and compact 4-layer WikiText-4K runs show modest causal and masked LM gains.
Create a lesson
Related papers
DisSparse: Pipelined Top-p Sparse Attention for Long-Context LLM Serving
Shared title terminology · Nurlan Nazaraliyev, Elaheh Sadredini, Nael Abu-Ghazaleh
Model Carving: Training Transformers That Optimize Their Own Topology
Shared title terminology · Kaden Zheng, Pratyusha Sharma
Auditing and Adapting kNNGuard for Long-Context Prompts
Shared title terminology · Niccolò Ronchetti
Optimal User-Level Private Stochastic Convex Optimization and Mean Estimation with Heavy Tails
Shared title terminology · Andrew Lowy
The Cross-Context Threshold Test: Detecting Discrimination Under Environmental Shifts
Shared title terminology · Jun Yuan, Xinyue Ye
Ranking-Preserving Coreset Selection for Efficient Evolutionary Hyperparameter Optimization
Shared title terminology · Mamoona Tasadduq, Maryam Bashir