AI 与机器学习2024arxiv.org
Grokked Transformer 是隐式推理器
Grokked Transformers Are Implicit Reasoners
进阶 · 约 90 分钟读完前置知识:Transformer 基础、grokking 现象、组合泛化
导读
这篇论文研究经过 grokking 的 Transformer 是否具备隐式推理能力。作者训练定制 Transformer,在多跳事实连接/推理任务上测试,并与 GPT-4-Turbo、Gemini-Pro-1.5 对比,结论称小型模型在特定任务上表现更好,且训练数据分布而非单纯数据规模会定性影响泛化行为。
HN 关注点:grokking 对理解模型泛化与推理的重要性,同时质疑论文实验细节不足、与大模型对比的可比性不清。
HN 评论精选
这几条评论里:支持 1 质疑 1 补充 1
质疑批评论文过于抽象、缺少任务样例与提示细节,导致结果可比性存疑。
这篇论文太抽象,让人很难理解团队到底做了什么。比如论文声称在某些任务上击败 GPT-4-Turbo 和 Gemini-Pro-1.5,却没给出问这些模型的任何问题,很难判断结果是否有价值。也不清楚他们训练的自定义 Transformer 具体做什么;有自定义 tokenizer,却没给 token 列表,只给了图里几个例子。讨论了分布内和分布外任务,却没给任务样例。这像是意外复杂度:多加几个附录,列出约 20 个分布内句子和 10 个分布外句子并不难,但论文只给了不同超参数的性能图,我们甚至不知道模型被测试在什么上。
PoignardAzur查看英文原文
This paper feels way too abstract, to the point it makes it hard to understand what the team actually did. For instance, the paper claims it beat GPT-4-Turbo and Gemini-Pro-1.5 on certain tasks... but it doesn't include any of the questions they asked GPT4 or Gemini, so it's hard to guess whether these results have any value at all. It's also unclear what they even trained their custom transformer to do. It has a custom tokenizer, but they don't give a list of tokens (aside from a few examples in the diagrams like "Barrack", "Michelle", "Trump"). They talk about in-distribution and out-of-distribution tasks, but they don't give any examples of these tasks and what they look like. This feels like accidental complexity. It wouldn't have been hard to add a few more appendices with eg a list of 20 or so in-distribution sentences they asked the model to complete and 10 out-of-distribution sentences. Instead all they include is diagrams comparing performance for different hyperparameters and stuff, but we don't even know what the models are being tested on.
支持认为 grokking 是 AI 核心问题,赞赏论文关于数据分布影响泛化的发现。
自从第一次了解 grokking 以来,我一直强烈怀疑,掌握它并弄清如何促进它应是 AI 的核心问题。我们目前困在一个局部最小值:记忆电路表现足够好,能处理大量有经济价值的用例。但利润函数把我们引向一个由数据和算力饥渴架构主导的山谷,它并不适合学习泛化电路,部分原因是记忆电路太有效:我们很快到达平坦损失景观,然后像布朗运动一样盲目跳无数 epoch,直到进入正则化能驱动泛化的区域。像这篇论文的研究非常重要。我认为论文最有趣的一点是:“训练数据分布,而非训练数据规模,定性地影响泛化行为。”
scarmig查看英文原文
Since I first learned about grokking, I've had a strong suspicion that getting a handle on it and figuring out how to aid it should be the central question in AI. We are currently stuck in a local minimum, where memorizing circuits perform well-enough to handle a whole lot of economically viable use cases. But the profit function has guided us into a valley dominated by a data and compute hungry architecture that isn't ideal for learning generalizing circuits (partially because the memorizing circuits are so effective! We relatively quickly get to a flat loss landscape, after which we blindly jump around for countless epochs in a kind of Brownian motion until we get into an area where regularizers can drive generalization). Research like this paper is incredibly important. I thought this was the most interesting bit from the paper: > Training data distribution, instead of training data size, qualitatively influences generalization behavior.
补充补充论文关键实验设置:GPT-2 规模模型在多跳事实连接任务上超过大模型,并说明任务搜索空间与评测配置。
这是有趣的结果:他们 GPT-2 大小的 Transformer 在连接事实方面击败了 GPT-4 和 Gemini 1.5。这类任务难度有两方面:搜索空间大,例如平均每个查询实体连接 50 多个事实,真值证明中每个桥接实体连接 900 多个事实;其次没有表面形式线索可利用来偏置搜索,不像多数传统 QA 基准的证明步骤可从查询中看出。为测试基于非参数记忆的 LLM,他们用简单模板把事实翻成自然语言,按属性分组测试。测试了把所有事实(平均 28.2K)加载进上下文,以及检索增强设置(平均检索 5.4K 事实),检索两个查询实体的两跳邻域,含足够事实推出答案。也试了标准提示直接回答和 CoT 提示要求模型口述推理。测试 GPT-4-Turbo 和 Gemini-Pro-1.5,GPT-4-Turbo 因上下文长度只测检索增强。
campers查看英文原文
This is the interesting result where their GPT-2 sized transformer blows away GPT4 and Gemini 1.5 in connecting together facts The difficulty of such a task is two-fold. First, the search space is large. For example, on average, each query entity connects with more than 50 facts, and each bridge entity in the ground truth proof connects with more than 900 facts. Second, there are no surface form clues to exploit and bias the search towards the ground truth proof, unlike most conventional QA benchmarks where the proof steps are transparent from the query. To test LLMs based on non-parametric memory, we translate the facts into natural language by simple templates (Appendix F). Facts/queries for each attribute are grouped/tested separately. We test both the vanilla setup where all facts (28.2K on average) are loaded into the LLM context, and the retrieval-augmented setup (5.4K facts retrieved on average) where the two-hop neighborhoods of the two query entities are retrieved, which includes enough facts to deduce the answer. We also try both standard prompting where the model answers directly, and chain-of-thought (CoT) prompting where the model is prompted to verbalize the reasoning. We test GPT-4-Turbo and Gemini-Pro-1.5, where for GPT-4-Turbo we only test the retrieval-augmented setup due to context length limit. Table 1:Results on the complex reasoning task. Direct/CoT: predict the answer directly/verbalize the reasoning steps. “+R”: retrieval augmentation. GPT-4-Turbo Gemini-Pro-1.5 Grokked Transformer Direct+R CoT+R Direct CoT Direct+R. CoT+R Accuracy (%) 33.3 31.3 28.7 11.3 37.3 12.0 99.3
相关资源
从这篇论文所有 HN 讨论帖的全部评论里整理出来的链接。
- 评论区提到的论文
历次讨论
- 2024Hacker News 讨论帖239 分 · 61 评
同领域还值得读
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 分钟编辑精选