用随机标签头分析模型记忆能力,揭示过拟合与泛化的新关系
Random Label Prediction Heads for Studying Memorization in Deep Neural Networks
- 为每个样本添加随机标签,通过中间层的随机标签头预测来衡量记忆程度
- 随机标签准确率反映样本级记忆和模型容量,可直接评估过拟合
- 发现减少记忆可能提升或降低泛化性能,挑战传统过拟合即记忆的认知
我们提出一种简单有效的实证方法,用于研究分类任务中深度神经网络的记忆现象。该方法为每个训练样本附加辅助随机标签,并由一个随机标签预测头(RLP-head)进行预测。RLP-head 可以连接在任意网络深度,从对应中间表示中预测随机标签,从而分析记忆能力如何随层演变。通过将 RLP-head 的表现解释为 Rademacher 复杂度的实证估计,我们获得了样本级记忆和模型容量的直接度量。利用这一随机标签准确率指标,我们分析了不同模型和数据集上的泛化与过拟合情况。在此基础上,我们进一步提出一种基于 RLP-head 输出的新正则化技术,能有效降低记忆。有趣的是,实验发现减少记忆可能改善或损害泛化,具体取决于数据集和训练设置。这些结果挑战了过拟合等同于记忆的传统假设,并提出了新的假说来解释看似矛盾的现象。源代码见 https://github.com/MarlonBecker/RandomLabelHeads
原文摘要 · Abstract (English)
We introduce a straightforward yet effective method to empirically study memorization in deep neural networks for classification tasks. Our approach augments each training sample with auxiliary random labels, which are then predicted by a random label prediction head (RLP-head). RLP-heads can be attached at arbitrary depths of a network, predicting random labels from the corresponding intermediate representation and thereby enabling analysis of how memorization capacity evolves across layers. By interpreting the RLP-head performance as an empirical estimate of Rademacher complexity, we obtain a direct measure of both sample-level memorization and model capacity. We leverage this random label accuracy metric to analyze generalization and overfitting in different models and datasets. Building on this approach, we further propose a novel regularization technique based on the output of the RLP-head, which demonstrably reduces memorization. Interestingly, our experiments reveal that reducing memorization can either improve or impair generalization, depending on the dataset and training setup. These findings challenge the traditional assumption that overfitting is equivalent to memorization and suggest new hypotheses to reconcile these seemingly contradictory results. The source code is available at https://github.com/MarlonBecker/RandomLabelHeads
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。