AI 与机器学习2025arxiv.org
通过 N-gram 统计理解 Transformer
Understanding Transformers via N-gram Statistics
进阶 · 约 45 分钟读完前置知识:Transformer 基础、n-gram 语言模型、下一 token 预测
导读
这篇论文尝试用从训练语料中提取的 n-gram 统计规则集来解释 Transformer 的下一 token 预测:在 TinyStories 和 Wikipedia 上,分别有 79% 和 68% 的 Transformer top-1 预测与这些简单规则集的预测一致。作者据此认为,至少在这类简单数据集上,LLM 的预测包含大量可用简单统计规则刻画的结构。
HN 关注点:争议焦点在于:这是否等于把 LLM 贬低成 n-gram 模型,以及“两种方法预测一致”究竟能说明多少可解释性。
HN 评论精选
这几条评论里:质疑 2 补充 2
质疑预测一致不等于机制相同,真正难的部分恰恰是 n-gram 覆盖不到的那一小部分。
论文第 7 节的结果意味着,至少在 TinyStories 和 Wikipedia 这类简单数据集上,LLM 的预测包含大量可量化的结构,常常能用我们这些简单的统计规则来描述;我们发现,在 TinyStories 和 Wikipedia 上,分别有 79% 和 68% 的 LLM 下一 token 分布,其 top-1 预测与我们的 n-gram 规则集给出的预测一致。两种预测方法可能机制完全不同,但偶尔会一致,因为它们预测的是同一个东西。看起来语言的相当大一部分确实能被更简单的模型预测。但真正困难的是剩下的那部分,也就是简单 n-gram 模型表现很差、而 Transformer 真正擅长的地方。
montebicyclelo查看英文原文
> The results we obtained in Section 7 imply that, at least on simple datasets like TinyStories and Wikipedia, LLM predictions contain much quantifiable structure insofar that they often can be described in terms of our simple statistical rules > we find that for 79% and 68% of LLM next-token distributions on TinyStories and Wikipedia, respectively, their top-1 predictions agree with those provided by our N-gram rulesets Two prediction methods may have completely different mechanisms, but agree sometimes, because they are both predicting the same thing. Seems a fairly large proportion of language can be predicted by a simpler model.. But it's the remaining percent that's the difficult part; which simple `n-gram` models are bad at, and transformers are really good at.
补充提出把 n-gram 模型用作投机解码器加速的设想,但担心规则数量爆炸。
我在想,这些经 n-gram 约简的模型,如果再加上置信度度量,能不能充当非常快的投机解码器(speculative decoder)。不过也可能,从压缩的隐表示中展开出的显式规则数量太多,导致不实用。
pona-a查看英文原文
I wonder if these N-gram reduced models, augmented with confidence measures, can act as a very fast speculative decoder. Or maybe the sheer number of explicit rules unfolded from the compressed latent representation will make it impractical.
质疑质疑论文论调是在把 LLM 还原为 n-gram 模型,并对作者产出速度表示怀疑。
听起来很倒退,还助长了那种奇怪又不智识的叙事——说 LLM 不过就是 n-gram 模型(笑)。另外,这位作者今年五月一个月就提交了大约 10 篇论文,这正常吗?
justanotherjoe查看英文原文
Sounds regressive and feeds into the weird unintellectual narrative that llm is just like ngram models (lol, lmao even) Thr author submitted like 10 papers this May alone. Is that weird?
补充提出该方法是否可推广到其他 LLM,因为语料本质上都是人类产出。
这帖子有 74 分却只有一条评论?说正题:理论上,是不是可以针对不同种类的 LLM 重新发表这类论文?毕竟 LLM 所基于的文本语料,归根结底在某种程度上都来自人类的劳动和投入,无论是写作还是打字。
maz1b查看英文原文
How does this have 74 points and only one comment? on topic: couldn't one in theory, re-publish this kind of paper for different kinds of LLMs, as the textual corpus upon which LLMs are built based off ultimately, at some level, human effort and human input whether it be writing, or typing?
相关资源
从这篇论文所有 HN 讨论帖的全部评论里整理出来的链接。
历次讨论
- 2025Hacker News 讨论帖139 分 · 16 评
同领域还值得读
DeepSeek-R1:通过强化学习激励 LLM 的推理能力
DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via RL
研究如何用强化学习激励大语言模型的推理能力,提出 DeepSeek-R1,并探讨 RL 训练对模型推理表现的影响。
AI 与机器学习2025 · 1,351 分 · 1,056 评 · 引用 30进阶 · 约 80 分钟编辑精选1-bit LLM 时代:面向低成本计算的三值参数
The Era of 1-bit LLMs: ternary parameters for cost-effective computing
提出用三值参数 {-1, 0, 1} 替代 LLM 中的浮点权重,即所谓“1-bit LLM”。
AI 与机器学习2024 · 1,040 分 · 447 评 · 引用 19进阶 · 约 45 分钟编辑精选DeepSeek-V3.2:推进开放大语言模型的前沿
DeepSeek-v3.2: Pushing the frontier of open large language models
这是 DeepSeek-V3.2 的技术报告,延续了 DeepSeek 开源权重模型的路线,目标是让开放模型继续逼近甚至追平前沿闭源模型。
AI 与机器学习2025 · 982 分 · 465 评进阶 · 约 90 分钟编辑精选通过自我对弈与通用强化学习掌握国际象棋和将棋(AlphaZero)
Mastering Chess and Shogi by Self-Play with General Reinforcement Learning
DeepMind 的 AlphaZero 论文:用通用强化学习算法(自我博弈 + MCTS + 神经网络),从零开始仅数小时训练便在国际象棋和将棋上击败了世界顶级引擎 Stock…
AI 与机器学习2017 · 539 分 · 270 评 · 引用 13进阶 · 约 90 分钟编辑精选用强化学习发现更快的矩阵乘法算法
Discovering faster matrix multiplication algorithms with reinforcement learning
论文提出 AlphaTensor,用强化学习搜索矩阵乘法算法。
AI 与机器学习2022 · 518 分 · 111 评专业 · 约 90 分钟编辑精选