RAM-Net:具有可选地址记忆的表达性线性注意力
RAM-Net: Linear-Time Sequence Modeling with Sparsely Addressable State
AI总结:
RAM-Net通过可选地址记忆机制,在保持线性模型效率的同时提升长距离检索和复杂依赖捕捉能力。
摘要:
尽管线性注意力架构在推理上具有高效性,但将无界历史压缩成固定大小的记忆本质上限制了表达能力并导致信息丢失。为了解决这一限制,我们引入了随机访问内存网络(RAM-Net),一种新的架构,旨在弥合全注意力的表示能力与线性模型的记忆效率之间的差距。RAM-Net的核心是将输入映射到高维稀疏向量,作为显式的地址,使模型能够选择性地访问大规模的记忆状态。这种设计使状态大小可以指数级扩展而无需额外参数,这显著减轻了信号干扰并增强了检索的准确性。此外,内在的稀疏性确保了卓越的计算效率,因为状态更新仅限于最小的条目。广泛的实验表明,RAM-Net在细粒度长距离检索任务中始终优于最先进的基线,在标准语言建模和零样本常识推理基准中也取得了具有竞争力的表现,验证了其在显著减少计算开销的情况下捕捉复杂依赖关系的优越能力。
英文摘要:
Linear attention offers an efficient alternative to full attention with a fixed-size recurrent state. However, this state is shared by all tokens, so information from distinct tokens becomes superposed within it and produces inter-token interference that degrades long-range fine-grained recall. To address this issue, we propose RAM-Net, which replaces dense access to a shared state with sparse address-based access. RAM-Net organizes the recurrent state as a fixed-size array of independent slots and uses an Address Decoder that maps each key or query into a sparse address, selecting a small subset of slots to write to or read from at each step. This design directs tokens with non-overlapping addresses to disjoint slots, suppressing inter-token interference, while keeping per-step state access dependent only on the number of selected slots rather than the total state size. Empirically, RAM-Net outperforms strong recurrent baselines on fine-grained long-range retrieval and achieves the lowest perplexity with competitive commonsense reasoning. It does so while accessing fewer state elements per step than all baselines, e.g., $8\times$ fewer than Mamba2.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。