让循环模型动态重访历史,用更多计算换更小状态
Dynamic Compression in Recurrent Networks

- 允许模型选择性回看历史并更新状态,而非一次性压缩
- 存储10个函数时,所需状态大小减少40%以上
- 适合需要高效记忆长序列的场景,如少样本学习
循环模型通过将历史压缩为固定大小的状态来高效处理长上下文,但现代架构通常在序列上单向因果传递中完成压缩。这意味着每个输入必须在知晓未来用途前就被压缩,迫使有限状态在多种可能需求间妥协。我们提出动态压缩,使循环模型能够有选择地重新扫描过去标记,并通过额外的递归更新来修正其固定大小的状态。模型无需以高保真度持续保留所有历史内容,因为低保真信息可在需要时从保留的原始序列中重新获取。我们在受控设置中研究此机制:模型先在上下文中学习多个函数,随后在同一序列中遇到一系列少样本任务,每个任务需识别并复用其中一个函数。单次遍历模型必须以足够保真度保存每个函数以应对任意后续任务,而选择性重扫则仅需对当前所需函数进行回溯和精炼。结果表明,动态压缩显著减少了准确复用所需的循环状态规模,且随着存储函数数量增加,其扩展性更优。这些结果展示了循环模型中的计算-内存权衡:通过投入更多计算重访历史,可更有效地利用固定大小的状态。
原文摘要 · Abstract (English)
Recurrent models process long contexts efficiently by compressing their history into a fixed-size state, but modern architectures typically do so in a single causal pass over the sequence. Each input must therefore be compressed before the model knows how it will later be used, forcing a limited state to compromise across possible future demands. We introduce dynamic compression, which allows a recurrent model to selectively revisit past tokens and revise its fixed-size state through additional recurrent updates. The model need not preserve every part of the history at uniformly high fidelity in its recurrent state, because lower-fidelity information can be revisited from the retained raw sequence when it becomes relevant. We study this in a controlled setting where the model first learns multiple functions in-context and, later in the same sequence, encounters a series of few-shot tasks that each require it to identify and reuse one of those functions. A single-pass model must preserve every function at sufficient fidelity for any future task, whereas selective re-scanning allows the model to revisit and refine only the function currently needed. We find that dynamic compression substantially reduces the recurrent state required for accurate reuse and scales more favorably as the number of stored functions grows. These results demonstrate a computation--memory tradeoff in which recurrent models can spend more computation revisiting their history to make more effective use of a fixed-size state.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。