FreeSolo:线性时间稀疏注意力与零样本长度外推
研究论文 · 2026/10/16
线性时间序列模型通常将长上下文信息存储在循环状态中,固定大小的状态限制了可存储的信息量,而加入全注意力的混合架构虽能提升召回,却带来二次序列成本。稀疏注意力结合持续预训练(CPT)可扩展有效上下文长度,但超越训练长度的泛化仍具挑战,且CPT成本高昂。我们提出FreeSolo,一种原生稀疏注意力机制,包含短程滑动窗口分支和长程分支,后者选择关键点单元进行直接令牌注意力。其线性时间变体FS-L通过短CPT学习在查询相关选择前修剪前缀。FS-B搜索平衡树,包括基数排序构建在内的算法成本为O(Nlog^2 N)。FreeSolo在无需长上下文微调的情况下,展现出比基线更好的零样本长度外推能力。
该工作提出了一种无需长上下文微调即可实现零样本长度外推的稀疏注意力机制,在保持线性时间的同时提升了长序列建模能力,对高效长上下文处理有重要价值。
Linear-time sequence models typically store long-context information in a recurrent state. A fixed-size state limits how much information can be stored, while hybrid architectures that add full attention for better recall incur quadratic sequence cost. Alternatively, sparse attention with continued pretraining (CPT) can extend the effective context length. Generalization beyond the trained length remains challenging, however, and CPT can be costly. We introduce FreeSolo, a native sparse attention mechanism with a short-range sliding window branch and a long-range branch that selects keypoint cells for direct token attention. Its linear-time variant, FS-L, learns to prune the prefix before query-dependent selection through short CPT. FS-B searches balanced trees with O(Nlog^2 N) algorithmic cost including radix-sort construction. FreeSolo demonstrates better zero-shot length extrapolation than the baselines without long-context fine-tuning.