arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.02680cs.LG
收藏

局部性并不意味着可达性:块稀疏因果注意力中的边界修复

Post-Boundary Bridge: Must Local Attention Go Global Between Global Layers?

Ocean University of China(中国海洋大学)

Zhibo Yang

AI总结:

本文研究块稀疏因果注意力中序列局部性与注意力图可达性之间的不匹配,通过结构依赖集形式化边界伪影,提出相位条件覆盖函数分析可达性,并引入边界桥接注意力作为最小修复方法。

摘要:

稀疏因果注意力通常由序列局部性描述:附近的token应保持易于访问,而远处的token可能被丢弃以降低成本。本文研究了序列局部性与注意力图可达性之间的不匹配。在固定块因果注意力中,两个相邻token可能在每一深度的注意力图中断开连接。我们通过结构依赖集形式化了这种边界伪影:如果每个注意力层使用相同的固定块因果掩码,且所有剩余操作是位置级的,则目标表示只能依赖于其自身块前缀中的token。这为构造的K路边界复制分布产生了架构级的边界-复制分离,top-1准确率上界为1/K,期望交叉熵下界为log K。然后,我们推导了相位条件覆盖函数,表明可达性取决于源-目标距离以及目标在其块内的偏移。这些覆盖律预测了稀疏模式何时会失败、修复何时有帮助,以及滑动窗口注意力和边界修复为何不可互换。边界桥接注意力被视为建设性的证明:它保留了固定块路径,并在块边界附近使用共享投影添加了零额外参数的辅助因果边。受控的1024-token实验表明,收益集中在覆盖对齐的诊断中。作为次要的外部有效性证据,固定检查点的8K-token Qwen2.5-7B探针显示了相同的覆盖不可比模式。贡献在于一个理论指导的诊断框架,用于块稀疏因果注意力中的局部性-可达性不匹配,以及相位条件覆盖分析和最小建设性修复。

英文摘要:

Hybrid Transformers reduce the cost of long-context modeling by combining local attention with periodic full-attention layers. When global communication is already available, however, the best use of local computation remains unclear. We introduce Post-Boundary Bridge (PBB), which preserves causal attention within blocks and adds direct connections across their boundaries. Rather than extending the range of information relayed through successive local layers, PBB prioritizes within-block modeling and nearby exchange, leaving long-range communication to full-attention layers. Across dense and mixture-of-experts models with 205 million to 2.07 billion stored parameters, PBB hybrids retain near-Full perplexity and competitive performance on standard downstream benchmarks while improving controlled source retrieval. At 205 million parameters, PBB also matches a hybrid using sliding-window attention (SWA) in perplexity and achieves higher source-retrieval accuracy. The same boundary-aligned structure enables Flash-PBB, an exact decoding implementation that updates its key-value cache without relocating retained entries. Compared with Flash-SWA, Flash-PBB delivers 1.82x decode attention-core throughput with half the allocated local key-value cache. These results show that targeted boundary exchange can preserve model quality while enabling faster, more memory-efficient local attention between global layers.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑