Deep Networks Always Grok and Here is Why

ML NNGTB LFDDR Transformer CNN SSL Continual Learning
2024年02月23日
本文讨论了深度神经网络(DNN)中的一种现象,即延迟泛化,也称为“Grokking”。在达到接近零的训练误差之后,DNN中的泛化会在很长一段时间后才发生。以前的研究已经报道了在特定控制环境下出现Grokking的情况,例如使用大范数参数初始化的DNN或在算法数据集上训练的transformers。本文证明了Grokking实际上更为普遍,并出现在许多实际环境中,例如在CIFAR10上训练卷积神经网络(CNN)或在Imagenette上训练Resnet。本文提出了延迟鲁棒性的新概念,即DNN在插值和/或泛化之后才能理解对抗性示例并变得鲁棒。我们根据DNN输入输出映射的局部复杂度提出了延迟泛化和延迟鲁棒性的出现解释。我们的局部复杂度测量了所谓的“线性区域”(又称样条分区区域)在DNN输入空间中的密度,并作为训练的有用进展测量。我们提供了首个证据表明,在分类问题中,线性区域在训练过程中会发生相变,之后它们会远离训练样本(使DNN在那里的映射更平滑),并朝着决策边界移动(使DNN在那里的映射不那么平滑)。Grokking在相变后发生,因为DNN映射在训练点周围的线性化导致了输入空间的鲁棒分区的出现。网址:https://bit.ly/grok-adversarial
Grokking, or delayed generalization, is a phenomenon where generalization in a deep neural network (DNN) occurs long after achieving near zero training error. Previous studies have reported the occurrence of grokking in specific controlled settings, such as DNNs initialized with large-norm parameters or transformers trained on algorithmic datasets. We demonstrate that grokking is actually much more widespread and materializes in a wide range of practical settings, such as training of a convolutional neural network (CNN) on CIFAR10 or a Resnet on Imagenette. We introduce the new concept of delayed robustness, whereby a DNN groks adversarial examples and becomes robust, long after interpolation and/or generalization. We develop an analytical explanation for the emergence of both delayed generalization and delayed robustness based on a new measure of the local complexity of a DNN's input-output mapping. Our local complexity measures the density of the so-called 'linear regions' (aka, spline partition regions) that tile the DNN input space, and serves as a utile progress measure for training. We provide the first evidence that for classification problems, the linear regions undergo a phase transition during training whereafter they migrate away from the training samples (making the DNN mapping smoother there) and towards the decision boundary (making the DNN mapping less smooth there). Grokking occurs post phase transition as a robust partition of the input space emerges thanks to the linearization of the DNN mapping around the training points. Website: https://bit.ly/grok-adversarial
许愿