通过可控难度任务验证了注意力模型动态分配计算的合理性
Understanding Dynamic Compute Allocation in Recurrent Transformers
- 设计可调节难度的算法与合成语言任务,实现细粒度计算分配测试
- 提出ANIRA框架,在不依赖显式难度标注下实现逐标记变深度计算
- 发现计算分配虽匹配复杂度但无法泛化到未见输入规模,适合模型机制研究者
逐标记自适应计算旨在通过为更难的标记分配更多计算、为较易标记分配较少计算来降低推理成本。然而,以往工作主要在自然语言基准上使用任务级指标评估,其中标记级难度不可观测且与架构因素混杂,难以判断计算分配是否真正匹配底层复杂性。我们通过三项贡献弥补这一空白:第一,引入复杂度可控的评估范式,采用参数化难度的算法和合成语言任务,可直接检验逐标记计算分配;第二,提出ANIRA,一种支持逐标记变深度计算的统一循环变压器框架,同时将计算分配决策与其他模型因素解耦;第三,利用该框架对逐标记自适应计算在复杂度对齐性、泛化能力及决策时机方面的系统分析。结果表明,无需显式难度监督,计算分配也能与任务复杂度对齐,但这种对齐并不意味着算法泛化:模型无法外推至未见过的输入规模,尽管增加了计算量。此外,早期计算决策依赖静态结构线索,而在线终止更贴近算法执行状态。
原文摘要 · Abstract (English)
Token-level adaptive computation seeks to reduce inference cost by allocating more computation to harder tokens and less to easier ones. However, prior work is primarily evaluated on natural-language benchmarks using task-level metrics, where token-level difficulty is unobservable and confounded with architectural factors, making it unclear whether compute allocation truly aligns with underlying complexity. We address this gap through three contributions. First, we introduce a complexity-controlled evaluation paradigm using algorithmic and synthetic language tasks with parameterized difficulty, enabling direct testing of token-level compute allocation. Second, we propose ANIRA, a unified recurrent Transformer framework that supports per-token variable-depth computation while isolating compute allocation decisions from other model factors. Third, we use this framework to conduct a systematic analysis of token-level adaptive computation across alignment with complexity, generalization, and decision timing. Our results show that compute allocation aligned with task complexity can emerge without explicit difficulty supervision, but such alignment does not imply algorithmic generalization: models fail to extrapolate to unseen input sizes despite allocating additional computation. We further find that early compute decisions rely on static structural cues, whereas online halting more closely tracks algorithmic execution state.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。