用固定记忆单元替代序列注意力,实现线性计算复杂度的高效模型
Echo State Transformer: Attention Over Finite Memories
- 将注意力机制从输入序列转向一组可动态调整的固定记忆单元
- 在69个时序任务上超越现有模型,在分类与异常检测中排名第一
- 适合需要长序列处理且对计算效率要求高的场景
尽管大语言模型及其基于Transformer的架构表现高效,但并未反映大脑处理语言等认知任务及利用工作记忆的方式。此外,Transformer存在随序列长度呈二次增长的计算瓶颈。为此,我们提出埃希状态变换器(Echo State Transformer, EST),一种结合Transformer注意力机制与储层计算节点的混合架构,构建固定大小的记忆系统。受回声状态网络启发,该方法并行使用多个随机循环网络作为轻量级工作记忆,各单元具有独立且可学习的内部动态与自适应泄漏率,可动态调节其时间特性。通过在这些固定数量的单元上应用注意力而非输入标记,EST实现了全序列的线性复杂度,有效突破标准Transformer的二次扩展难题。我们在包含69个任务的时序库(Time Series Library)上评估,结果表明:在五个类别中的两个类别中排名第一,在分类与异常检测任务上显著优于强基线模型,同时在短期预测任务上保持竞争力。这证明,将注意力从整个输入序列转移到一组动态演化的记忆单元,可在维持对时间事件高敏感性的同时,实现每步恒定的计算复杂度。
原文摘要 · Abstract (English)
While Large Language Models and their underlying Transformer architecture are remarkably efficient, they do not reflect how our brain processes and learns a diversity of cognitive tasks such as language, nor how it leverages working memory. Furthermore, Transformers encounters a computational limitation: quadratic complexity growth with sequence length. Motivated by these limitations, we aim to design architectures that leverage efficient working memory dynamics to overcome standard computational barriers. We introduce Echo State Transformers (EST), a hybrid architecture that resolves this challenge while demonstrating state of the art performance in classification and detection tasks. EST integrates the Transformer attention mechanisms with nodes from Reservoir Computing to create a fixed-size memory system. Drawing inspiration from Echo State Networks, our approach leverages several reservoirs (random recurrent networks) in parallel as a lightweight and efficient working memory. These independent units possess distinct and learned internal dynamics with an adaptive leak rate, enabling them to dynamically adjust their own temporality. By applying attention on those fixed number of units instead of input tokens, EST achieves linear complexity for the whole sequence, effectively breaking the quadratic scaling problem of standard Transformers. We evaluate ESTs on a recent timeseries benchmark: the Time Series Library, which comprises 69 tasks across five categories. Results show that ESTs ranks first overall in two of five categories, outperforming strong state-of-the-art baselines on classification and anomaly detection tasks, while remaining competitive on short-term forecasting. These results demonstrate that by shifting the attention mechanism from the entire input sequence to a fixed set of evolving memory units, it is possible to maintains high sensitivity to temporal events while achieving constant computational complexity per step.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。