Grokking是否值得?Transformer中泛化电路的功能分析与可迁移性
Is Grokking Worthwhile? Functional Analysis and Transferability of Generalization Circuits in Transformers
AI总结:
本文研究了Transformer中泛化电路的功能与可迁移性,发现grokking过程是整合记忆事实到自然推理路径,而非突然获得新范式,且其在迁移新知识时存在局限。
摘要:
尽管大型语言模型(LLMs)在事实检索方面表现出色,但它们在组合任务中常常面临“双跳推理诅咒”的问题。最近的研究表明,通过长时间的“grokking”阶段,参数共享的Transformer可以形成一种“泛化电路”,从而弥补这一差距。一个基本问题随之产生:经过grokking的模型在下游任务中是否优于非grokking的模型?此外,等待grokking阶段的高计算成本是否值得?在本工作中,我们进行了一项机制研究,以评估泛化电路在知识吸收和迁移中的作用。我们证明了:(i)非grokking和grokking模型在分布内组合查询中的推理路径是相同的。这表明“泛化电路”并不代表突然获得新的推理范式。相反,我们认为grokking是将记忆中的原子事实整合到自然建立的推理路径中的过程。(ii)在长时间训练后在未见过的案例上实现高准确率和形成特定推理路径并不绑定;在特定的数据制度下,它们可以独立发生。(iii)即使是一个成熟的电路,在整合新知识时也表现出有限的可迁移性,这表明“grokked”Transformer并未完全掌握组合逻辑。
英文摘要:
While Large Language Models (LLMs) excel at factual retrieval, they often struggle with the "curse of two-hop reasoning" in compositional tasks. Recent research suggests that parameter-sharing transformers can bridge this gap by forming a "Generalization Circuit" during a prolonged "grokking" phase. A fundamental question arises: Is a grokked model superior to its non-grokked counterparts on downstream tasks? Furthermore, is the extensive computational cost of waiting for the grokking phase worthwhile? In this work, we conduct a mechanistic study to evaluate the Generalization Circuit's role in knowledge assimilation and transfer. We demonstrate that: (i) The inference paths established by non-grokked and grokked models for in-distribution compositional queries are identical. This suggests that the "Generalization Circuit" does not represent the sudden acquisition of a new reasoning paradigm. Instead, we argue that grokking is the process of integrating memorized atomic facts into an naturally established reasoning path. (ii) Achieving high accuracy on unseen cases after prolonged training and the formation of a certain reasoning path are not bound; they can occur independently under specific data regimes. (iii) Even a mature circuit exhibits limited transferability when integrating new knowledge, suggesting that "grokked" Transformers do not achieve a full mastery of compositional logic.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。