Daily Tech Briefing
AI 科技速览
每天 5 分钟内学习 AI。获取最新的人工智能新闻,理解其重要性,并学习如何将其应用于您的工作。
arXiv Machine Learning · 2026/7/22 04:00:00
A Controlled Study of Attention-Only Transformers
AI 中文解读
一项新研究挑战了AI大模型的核心设计:去掉Transformer中占比三分之二参数的前馈层,把算力全部投入到注意力机制上,模型表现几乎没有下降,损失差距仅为0.006个“困惑度”单位(相当于0.27%)。这意味着过去被视为不可或缺的“知识存储模块”可能并非必需,注意力本身就能扛起大部分任务。
通俗来说,当前的AI模型好比一个“双核大脑”:注意力机制负责理解上下文关系(比如“苹果”是水果还是公司),前馈网络负责记忆大量知识(比如“爱因斯坦的生日”)。研究者发现,如果把记忆模块完全拆掉,仅靠注意力机制,模型依然能高效处理大多数问题——只不过在需要依靠“死记硬背”的事实性问答时表现稍弱,而更擅长从提供的资料中推理答案。这个差异在训练数据越多时越小到几乎可以忽略。
这项发现对未来AI应用意义重大:简化模型结构意味着更低的计算成本和更快的推理速度。普通用户未来可能用上更便宜、更流畅的AI助手,开发者也能在手机上部署更强大的本地模型,不用全部依赖昂贵的云端算力。同时,AI对上下文的依赖增强(比如阅读理解)可能催生出更智能的文档分析工具,让机器像人一样从给定材料中找答案,而非依赖庞大知识库。
arXiv:2607.18363v1 Announce Type: new
Abstract: Feed-forward networks hold two thirds of a transformer's non-embedding parameters, yet the architecture has not received a necessity test that controls parameters, compute, and depth at once. We pretrain attention-only decoder transformers (Simple Attention Networks, SANs) against standard transformers matched separately for parameter count, training FLOPs, and depth (2 to 48 layers), for up to 105B tokens at 6M to 87M parameters. Deleting feed-forward layers in place is costly: the standard transformer leads by 0.47 nats at matched depth and 0.26 nats at matched FLOPs. Reallocating the freed budget into attention depth closes the gap: at matched parameters the difference is 0.006 nats (0.27 percent of loss), reproducible to one part in ten thousand across seed pairs, shrinking across 5B, 30B, and 105B budgets, and holding near 0.02 nats across a 29x size range. Three measurements localize the remaining gap to parametric recall: attention-only models are better on context-grounded answers and worse where knowledge must come from weights. Weight spectra show why: routing matrices (Q/K) crystallize early, content matrices accumulate rank slowly, and removing feed-forward layers relocates this accumulation to the attention output projection. QK-normalization, not feed-forward layers or residual gating, keeps 48-layer attention-only stacks trainable. The deficit concentrates on low-context query prediction and localizes there entirely by the largest budget. A pre-registered test confirms the account: it predicts a 0.02 to 0.05 nat gap on knowledge-dense web text; a matched pair trained on fineweb-edu measures 0.040. Within the tested regime, attention does the rest.
分享
阅读原文 ↗