One of the most surprising puzzles in neural network generalisation is grokking: a network with perfect training accuracy but poor generalisation will, upon further training, transition to perfect generalisation. We propose that grokking occurs when the task admits a generalising solution and a memorising solution, where the generalising solution is slower to learn but more efficient, producing larger logits with the same parameter norm. We hypothesise that memorising circuits become more inefficient with larger training datasets while generalising circuits do not, suggesting there is a critical dataset size at which memorisation and generalisation are equally efficient. We make and confirm four novel predictions about grokking, providing significant evidence in favour of our explanation. Most strikingly, we demonstrate two novel and surprising behaviours: ungrokking, in which a network regresses from perfect to low test accuracy, and semi-grokking, in which a network shows delayed generalisation to partial rather than perfect test accuracy.
翻译:神经网络泛化中最令人困惑的谜题之一是“grokking”:一个在训练集上达到完美准确率但泛化能力差的网络,在经过进一步训练后,会突然转变为完美泛化。我们提出,当任务同时存在泛化解和记忆解时,grokking便会出现。其中泛化解的学习速度较慢但效率更高,能在相同参数范数下产生更大的logits。我们假设,随着训练数据集增大,记忆电路会变得愈发低效,而泛化电路则不然,这暗示存在一个关键数据集规模,使得记忆与泛化的效率相当。我们针对grokking提出了四个新颖的预测并加以验证,为我们的解释提供了有力证据。最引人注目的是,我们展示了两种新颖且令人惊讶的现象:其一为“反grokking”,即网络从完美测试准确率退化为低准确率;其二为“半grokking”,即网络延迟泛化至部分而非完美的测试准确率。