arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.05697cs.LGcs.AI
收藏

预算注意力分配:面向高效变换器的成本条件计算控制

Budgeted Attention Allocation: Cost-Conditioned Compute Control for Efficient Transformers

Independent Researcher(独立研究者)

Amrit Nidhi

AI总结:

本文研究了预算注意力分配机制,通过条件注意力预算控制实现变换器的高效计算,展示了在不同预算下提升准确率和速度的可行性。

摘要:

变换器通常暴露每个训练模型的单次推理成本,而部署系统往往需要多个成本-质量操作点。我们研究了预算注意力分配,一种基于请求注意力预算的单调头部门控机制。密集预热对稳定性至关重要:在稳健的合成序列任务中,一个预算模型在0.303估计注意力成本时达到99.7%的准确率,在0.504成本时达到100.0%的准确率。在外部AG新闻数据集上,使用自定义词级变换器,硬门适应将软成本控制转化为测量单线程CPU速度,达到82.1%的准确率,速度提升1.28倍,在预算0.50时。在预训练的BERT-Mini AG新闻中,预算结构剪枝在预算0.50时达到87.6%的准确率,速度提升1.20倍;一个验证排名的零样本密集后处理结构基线达到86.1%,一个恢复周期将该预算专家提升至87.9%。在DBpedia14上,BERT-Mini预算门在精确预算0.50时达到97.4%,优于密集全注意力的96.6%。静态固定预算门和恢复的密集专家仍表现强劲。因此,贡献并非普遍主导,而是在不同预算下可控制的检查点的可重复可行性研究,可以以注意力成本换取准确率,并在小型CPU基准上转化为测量的结构速度提升。

英文摘要:

Transformers usually expose one inference cost per trained model, while deployed systems often need multiple cost-quality operating points. We study Budgeted Attention Allocation, a monotone head-gating mechanism conditioned on a requested attention budget. Dense warm-starting is important for stability: on a robust synthetic sequence task, one budgeted model reaches 99.7% accuracy at 0.303 estimated attention cost and 100.0% accuracy at 0.504 cost. On held-out AG News with a custom word-level transformer, hard-gate adaptation turns soft cost control into measured single-thread CPU speed, reaching 82.1% accuracy with 1.28x speedup at budget 0.50. In pretrained BERT-Mini AG News, budgeted structural pruning reaches 87.6% accuracy with 1.20x speedup at budget 0.50; a validation-ranked zero-shot dense post-hoc structural baseline reaches 86.1%, and one recovery epoch raises that per-budget specialist to 87.9%. On DBpedia14, BERT-Mini budgeted gates reach 97.4% at exact budget 0.50 versus 96.6% for dense full attention. Static fixed-budget gates and recovered dense specialists remain strong. The contribution is therefore not universal dominance, but a reproducible feasibility study of one controllable checkpoint across budgets that can trade attention cost for accuracy and be converted into measured structural speedups on small CPU benchmarks.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑