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.


翻译:令牌级自适应计算旨在通过向较难令牌分配更多计算资源、向较易令牌分配较少资源来降低推理成本。然而,先前研究主要在自然语言基准上使用任务级指标进行评估,其中令牌级难度不可观测且与架构因素相互混杂,导致计算分配是否真正与底层复杂度对齐尚不明确。我们通过三项贡献填补这一空白:首先,我们引入一种复杂度可控的评估范式,采用具有参数化难度的算法与合成语言任务,从而实现对令牌级计算分配的直接测试。其次,我们提出ANIRA——一个统一的循环Transformer框架,该框架支持每令牌可变深度计算,同时将计算分配决策与其他模型因素隔离。第三,我们利用该框架对令牌级自适应计算在复杂度对齐性、泛化能力与决策时机等方面进行系统分析。实验结果表明,与任务复杂度对齐的计算分配可在无显式难度监督的情况下自发形成,但此类对齐并不意味着算法泛化能力:尽管模型能为未见过的输入规模分配额外计算,却无法实现外推泛化。我们进一步发现,早期计算决策依赖于静态结构线索,而在线停止机制则更紧密地跟踪算法执行状态。

0
下载
关闭预览

相关内容

【博士论文】基于机器学习的计算优化
专知会员服务
21+阅读 · 2025年4月13日
144页ppt!《Transformers》全面讲解,附视频
专知会员服务
118+阅读 · 2023年1月1日
深度学习算法发展简述,从DNN到Transformer再到ChatGPT
专知会员服务
153+阅读 · 2022年12月22日
《“边缘计算+”技术白皮书》,82页pdf
专知
11+阅读 · 2022年8月28日
综述:军事应用中使用的一些重要算法
专知
12+阅读 · 2022年7月3日
深入理解BERT Transformer ,不仅仅是注意力机制
大数据文摘
22+阅读 · 2019年3月19日
多图带你读懂 Transformers 的工作原理
AI研习社
10+阅读 · 2019年3月18日
干货|掌握机器学习数学基础之优化[1](重点知识)
机器学习研究会
10+阅读 · 2017年11月19日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员