Scaling Laws and Interpretability of Learning from Repeated Data
Danny Hernandez Correspondence to: All authors are at Anthropic. Author contributions are listed at the end of the paper. Tom Brown, Tom Conerly, Nova DasSarma, Dawn Drain, Sheer El-Showk, Nelson Elhage, Zac Hatfield-Dodds, Tom Henighan, Tristan Hume, Scott Johnston, Ben Mann, Chris Olah, Catherine Olsson, Dario Amodei, Nicholas Joseph, Jared Kaplan, Sam McCandlish \AND Anthropic
Abstract
Recent large language models have been trained on vast datasets, but also often on repeated data, either intentionally for the purpose of upweighting higher quality data, or unintentionally because data deduplication is not perfect and the model is exposed to repeated data at the sentence, paragraph, or document level. Some works have reported substantial negative performance effects of this repeated data. In this paper we attempt to study repeated data systematically and to understand its effects mechanistically. To do this, we train a family of models where most of the data is unique but a small fraction of it is repeated many times. We find a strong double descent phenomenon, in which repeated data can lead test loss to increase midway through training. A predictable range of repetition frequency leads to surprisingly severe degradation in performance. For instance, performance of an 800M parameter model can be degraded to that of a 2x smaller model (400M params) by repeating 0.1% of the data 100 times, despite the other 90% of the training tokens remaining unique. We suspect there is a range in the middle where the data can be memorized and doing so consumes a large fraction of
中文速览
训练大语言模型时,哪怕只有极少比例的数据被反复重复,模型性能也会遭受出乎意料的严重损害——这篇论文就是要搞清楚"为什么"和"怎么发生的"。研究者系统地训练了一批Transformer模型,其中绝大多数数据是唯一的,只让一小部分数据重复不同次数,从而发现了一个强烈的"双重下降(double descent)"现象:重复次数太少或太多都危害不大,但在中间某个特定频率段,性能会断崖式下跌——比如仅把0.1%的数据重复100次,就能让一个8亿参数模型退化到4亿参数模型的水平。进一步用机制可解释性(mechanistic interpretability)工具解剖模型内部,他们发现重复数据会优先破坏"归纳头(induction heads)"这一负责复制和上下文学习的关键注意力机制,使模型从泛化转向死记硬背,从而消耗大量模型容量。这一发现对现实中的大模型训练具有重要警示意义:即便数据去重做得不够彻底,留下的少量重复内容也可能造成远超直觉的性能损失。
原文 arXiv:2205.10487;中英对照 + 大白话阅读 https://aha.fim.ai/paper/2205.10487v1