跳到正文
arXiv (AI + Vision + Imaging)· Dylan Forde·· 2 天前AI 评分38

THOT:以拓扑枢纽最优传输消除长上下文稀释并实现Flash级速度

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

AI 导读

研究者提出拓扑枢纽最优传输(THOT),用局部窗口加K个共享枢纽的线性规模图替代稠密L×L矩阵,并通过单纯形sparsemax或免排序阈值ReLU门控将干扰项质量压至零。

正文 · 原文

arXiv:2611.27951v1 Announce Type: new 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 $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 ($\alpha=0$) and 98.83% at $\alpha=0.05$ (matched by $O(L)$ thresholded ReLU at $\alpha=0.05$, vs. 80.60% at $\alpha=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.

来源:arXiv (AI + Vision + Imaging) · arxiv.org