FreeSolo:具备零样本长度外推能力的线性时间稀疏注意力机制
FreeSolo: Linear-time Sparse Attention with Zero-Shot Length Extrapolation
AI总结:
本文提出FreeSolo稀疏注意力机制,含短程滑动窗口与长程关键点分支,其变体FS-L、FS-B分别以线性时间、O(Nlog²N)成本实现,在无长上下文微调时零样本长度外推性能优于基线。
摘要:
线性时间序列模型通常将长上下文信息存储在循环状态中。固定大小的状态限制了可存储的信息量,而添加全注意力以提升召回率的混合架构会产生二次序列成本。另一种方法是结合持续预训练(CPT)的稀疏注意力,可扩展有效上下文长度,但超出训练长度的泛化仍具挑战性,且CPT成本较高。本文提出FreeSolo,一种原生稀疏注意力机制,包含短程滑动窗口分支和选择关键点单元进行直接令牌注意力的长程分支。其线性时间变体FS-L通过短CPT学习在依赖查询的选择前修剪前缀;FS-B搜索平衡树,算法成本为O(Nlog²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(N\log^2 N)$ algorithmic cost including radix-sort construction. FreeSolo demonstrates better zero-shot length extrapolation than the baselines without long-context fine-tuning.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。