Abstract
The recent success of deep learning has partially been driven by training increasingly overparametrized networks on ever larger datasets. It is therefore natural to ask: how much of the data is superfluous, which examples are important for generalization, and how do we find them?
最近深度学习的成功部分是由于在更大的数据集上训练越来越多的过度参数化的网络。因此,我们很自然地会问:有多少数据是多余的,哪些例子对泛化很重要,以及我们如何找到它们?
In this work, we make the striking observation that, on standard vision benchmarks, the initial loss gradient norm of individual training examples, averaged over several weight initializations, can be used to identify a smaller set of training data that is important for generalization.
在这项工作中,我们做出了惊人的观察,在标准视觉基准上,单个训练示例的初始损失梯度范数,在几个权重初始化中平均,可以用来识别一个较小的训练数据集,这对泛化很重要。
Furthermore, after only a few epochs of training, the information in gradient norms is reflected in the normed error—L2 distance between the predicted probabilities and one hot labels—which can be used to prune a significant fraction of the dataset without sacrificing test accuracy.
此外,经过几个阶段的训练后,梯度范数中的信息反映在范数误差中——预测概率和一个热门标签之间的L2距离——这可以用于在不牺牲测试精度的情况下修剪数据集的很大一部分。
Based on this, we propose data pruning methods which use only \emph{local information early in training}, and connect them to recent work that prunes data by discarding examples that are rarely forgotten \emph{over the course of training}.
基于此,我们提出了数据修剪方法,该方法在训练早期只使用局部信息,并将其与最近的工作联系起来,通过丢弃在训练过程中很少被遗忘的例子来删除数据。
Our methods also shed light on how the underlying data distribution shapes the training dynamics: they rank \samples based on their importance for generalization, detect noisy \samples and identify subspaces of the model’s data representation that are relatively stable over training.
我们的方法也阐明了底层数据分布是如何塑造训练动态的:它们根据其对泛化的重要性对样本进行排序,检测有噪声的样本,并识别模型数据表示中相对稳定的子空间。
仿写此处如何剔除样本的notation
\section{Introduction}
Recently, deep learning has made remarkable progress driven, in part, by training over-parameterized models on ever larger datasets.
This trend creates new challenges: the large computational resources required pose a roadblock to the democratization of AI.
Memory and resource constrained settings, such as on-device computing, require smaller models and datasets.
Identifying important training data plays a role in online and active learning.
Finally, it is of theoretical interest to understand how individual examples and sub-populations of training examples influence learning.
最近,深度学习取得了显著的进展,部分原因是在更大的数据集上训练过度参数化的模型。
这一趋势带来了新的挑战:需要大量计算资源,这对人工智能的民主化构成了障碍。
内存和资源受限的设置,比如设备上的计算,需要更小的模型和数据集。
识别重要的训练数据在在线和主动学习中起着重要作用。
最后,理解单个示例和训练示例的子群如何影响学习具有理论意义。
To address these challenges, we propose a scoring method that can be used to identify important and difficult examples early in training, and prune the training dataset without large sacrifices in test accuracy. We also investigate how different sub-populations of the training data identified by our score affect the loss surface and training dynamics of the model.
为了解决这些挑战,我们提出了一种评分方法,可以用于在训练早期识别重要和困难的例子,并修剪训练数据集,而不会对测试准确性造成很大的牺牲。我们还研究了如何通过我们的分数识别训练数据的不同亚群影响模型的损失面和训练动力学。
Recent work on pruning data \citep{coleman2019selection,hwang2020data}, can be placed in the broader context of identifying coresets that allow training to approximately the same accuracy as would be possible with the original data \citep{har2007smaller,huggins2016coresets,campbell2018bayesian,tsang2005core,munteanu2018coresets}. These works attempt to identify examples that provably guarantee a small gap in training error on the full dataset. However, due to the nonconvex nature of deep learning, these techniques make conservative estimates that lead to weak theoretical guarantees and are less effective in practice.
最近的修剪工作数据\ citep {coleman2019selection, hwang2020data},可以放在更广阔的背景识别coresets允许训练大约相同的准确性可能与原数据\ citep {har2007smaller、huggins2016coresets campbell2018bayesian, tsang2005core, munteanu2018coresets}。这些工作试图确定可证明的例子,以保证在整个数据集上的训练误差有一个小的差距。然而,由于深度学习的非凸性,这些技术的估计保守,导致理论保证较弱,在实践中效果较差。
A very different approach was recently discovered by \citet{toneva2018empirical}. They track the number of times through training an example transitions from being correctly classified to misclassified, called a “forgetting event”, and find that some examples are rarely forgotten, while others are forgotten repeatedly. Empirically, they observed that training accuracy is not affected by the rarely forgotten training \samples and a large fraction of the \trainingdata can be removed without any impact on test accuracy. However, since this method relies on collecting forgetting statistics throughout training, the forgetting score is typically calculated in the middle of or at the end of training. \citet{toneva2018empirical} find that, in their example of a ResNet18 trained on CIFAR-10 for 200 epochs, the Spearman rank correlation between early and late scores is good after about 25 epochs and stabilizes after 75 epochs.
最近,citet{toneva2018empirical}发现了一种非常不同的方法。他们跟踪通过训练一个例子从正确分类到错误分类的次数,称为“遗忘事件”,并发现一些例子很少被遗忘,而另一些则被反复遗忘。根据经验,他们观察到,训练的准确性不受很少被遗忘的训练样本的影响,而且大部分的训练数据可以被删除,而不会对测试的准确性产生任何影响。然而,由于该方法依赖于在整个训练过程中收集遗忘统计数据,遗忘分数通常是在训练中途或结束时计算的。研究发现,在200个epoch的ResNet18训练的cifar10的例子中,早期和晚期得分之间的斯皮尔曼等级相关性在大约25个epoch后很好,在75个epoch后稳定。
Broadly speaking, the ability to prune datasets raises a number of questions: What is the nature of \samples that can be removed from the \trainingdata without hurting accuracy? How early in training can we recognize such \samples? How many \samples do we need and how does this depend on the data distribution?
These questions may have no generic answers and so, in this work, we begin to pursue them empirically in the context of several standard vision benchmarks and standard network architectures.
Answers to these questions may both (1) lead to new methodologies that could dramatically reduce training times and memory requirements, and (2) offer important insights into the training dynamics of deep neural networks, and the role of data.
从广义上说,数据集修剪的能力提出了一些问题:可以从训练数据中删除的样本的本质是什么,而不损害准确性?在训练中,我们多久能识别出这样的样本?我们需要多少个\样本,这与数据分布有什么关系?
这些问题可能没有通用的答案,因此,在这项工作中,我们开始在几个标准愿景基准和标准网络架构的背景下,根据经验来追求它们。
这些问题的答案可能(1)导致新的方法,可以大大减少训练时间和记忆需求,(2)提供重要的洞察深度神经网络的训练动态和数据的作用。
Our first finding is that \emph{very early in training} (just a few epochs), partial forgetting scores identify large fractions of data that can be pruned. Analyzing this puzzling result with a one gradient step analysis of training suggests a very simple heuristic: use the loss gradient norm of individual \samples to identify important \samples.
我们的第一个发现是\emph{非常早期的训练}(仅仅几个时期),部分遗忘分数识别了可以被修剪的大部分数据。用训练的一个梯度步骤分析这个令人困惑的结果表明了一个非常简单的启发式:使用个体样本的损失梯度范数来识别重要的样本。
While this approach does not work when the loss gradient norms are computed at the weights early in training of a single trajectory, we find that, surprisingly, averaging these norms over multiple weight initializations does produce a ranking that correlates strongly with forgetting scores and allows us to prune a significant fraction of examples early in training.
Indeed, even at initialization, we can prune 50\% of examples from CIFAR-10 without affecting accuracy, while on the more challenging CIFAR-100 dataset, we can prune 25\% of examples with only a 1\% drop in accuracy.
虽然这种方法不适用于在单个轨迹训练早期的权值处计算损失梯度范数,但我们发现,令人惊讶的是,在多个权重初始化中平均这些标准,确实产生了一个与遗忘分数密切相关的排名,并允许我们在训练早期删除大量的示例。
事实上,即使在初始化时,我们也可以从CIFAR-10中删除50%的示例而不影响精度,而在更具挑战性的CIFAR-100数据集上,我们可以删除25%的示例而只降低1 %的精度。
Through a series of empirical studies, we have begun to tease apart the properties of important examples and how they can depend on the data distribution. In particular, we find that the examples with the very highest norms become superfluous as the amount of label noise increases. Indeed, even on clean data, we find that in the high pruning regime, the best population excludes the very highest-scoring \samples.
通过一系列的实证研究,我们已经开始梳理重要例子的性质,以及它们如何依赖于数据分布。特别是,我们发现,随着标签噪声的增加,具有最高规范的示例变得多余。事实上,即使在干净的数据上,我们发现在高修剪制度下,最佳种群排除了得分最高的\样本。
\subsection{Contributions}
\begin{itemize}[leftmargin=2em]
\item We propose to score the importance of each training \sample $(x_i,y_i)$ by its expected loss gradient norm (\scorename score), which, up to a constant, bounds the expected
%
change in loss for an arbitrary \sample $(x,y)$ caused by removing $(x_i,y_i)$.
我们建议根据期望损失梯度范数(\scorename score)为每个训练样本$(x_i,y_i)$的重要性评分,该值在一个常数的范围内限制期望
%
删除$(x_i,y_i)$引起的任意\样本$(x,y)$损失的变化。
\item We show that pruning training samples with small \scorename scores at initialization allows one to train on as little as $50\%$ of the training data without any loss in accuracy (CIFAR-10). While the pruning levels are comparable to those provided by other methods
\citep{toneva2018empirical,coleman2019selection}, our score is the only one that is well-defined at initialization and early in training.
我们表明,在初始化时,用小的评分进行剪枝训练样本,可以在不损失任何准确性的情况下,用最少$50\%$的训练数据进行训练(cifar10)。而修剪水平可与其他方法所提供的相比
我们的分数是唯一一个在初始化和早期训练时定义明确的分数。
\item Our experimental findings suggest that, within the first few epochs of training, the \scorename score is well-approximated by the norm of the error vector (\scoreerror score),
where the error vector is the predicted class probabilities minus one-hot label encoding.
In fact, we find that the \scoreerror score provides even better information for data-pruning across a wide range of data pruning levels, even early in training.
我们的实验结果表明,在训练的前几个阶段,\scorename分数很好地近似于误差向量的范数(\scoreerror score),
其中错误向量是预测类概率减去一个热标签编码。
事实上,我们发现\scoreerror分数为广泛的数据剪枝级别上的数据剪枝提供了更好的信息,甚至在训练的早期。
\item We study the role of \samples with the highest \scoreerror scores, and find that excluding a small subset of the very highest scoring \samples produces a boost in performance. This boost in performance is enhanced in a corrupted label regime.
我们研究了具有最高评分错误分数的样本的作用,并发现排除一小部分最高评分的样本可以提高性能。这种性能的提升在一个被破坏的标签制度中得到了增强。
\item We introduce a method, based on linearly connected modes, for studying the empirical risk surface in terms of the modes of \emph{subsets of data}, allowing us to identify when, in training, the final performance on subpopulations is determined.
We demonstrate that the linearly connected mode at-convergence of empirical risk surface computed on low \scoreerror score \samples is determined much earlier in training compared to high score \samples.
我们引入了一种基于线性连接模式的方法,以数据子集}的模式来研究经验风险面,使我们能够在训练中确定在亚种群上的最终性能。
我们证明,与高得分样本相比,在低得分错误样本上计算的经验风险面的线性连接模式在训练中要早得多。
\item Finally, we study how an \sample’s \scoreerror score connects to the network’s training dynamics. We do so by tracking the data-dependent NTK submatrices corresponding to the low or high score \samples, and measuring the rate at which it evolves in a scale-invariant way. We find that the NTK submatrix for the high score \samples evolves faster throughout training, supporting our hypothesis that high-scoring \samples are the ones driving the learning and the changes in the NTK feature space \citep{fort2020deep}.
最后,我们研究了一个样本的评分错误评分如何与网络的训练动态连接。我们通过跟踪与低或高得分\样本相对应的依赖于数据的NTK子矩阵来做到这一点,并测量它以比例不变的方式演变的速率。我们发现高分样本的NTK子矩阵在整个训练过程中进化得更快,这支持了我们的假设,即高分样本是驱动学习和NTK特征空间变化的因素。
\end{itemize}
学习NOTATION
\section{Related Work}
\label{sec:relatedwork}
\vspace{-1em}
As we have already discussed, our work is closely related to an empirical study by \citet{toneva2018empirical},
which examines the frequency with which correct classification decisions are forgotten during training.
The authors observe that \samples that are rarely forgotten are also ones that do not contribute much to the final accuracy of the predictor. In particular, if we retrain from initialization after having removed these rarely forgotten \samples from the \trainingdata, we achieve the same accuracy. Similar to our work, this work analyzes the dynamics of training in deep learning through the lens of training \samples,
and demonstrates that standard vision datasets have \NA{superfluous information.}
正如我们已经讨论过的,我们的工作与citet{toneva2018empirical}的实证研究密切相关,
它检查了在训练过程中,正确的分类决策被遗忘的频率。
作者观察到,很少被遗忘的\样本也是那些对预测器的最终准确性贡献不大的样本。特别是,如果我们在从训练数据中移除这些很少被遗忘的样本后,从初始化中重新进行训练,我们可以达到同样的精度。与我们的工作类似,本工作通过训练样本的镜头分析了深度学习中的训练动态,
并证明标准视觉数据集具有\NA{多余信息}。
However, unlike forgetting scores, our proposed methods use only local information, bringing to light that the local ordering of \samples is roughly preserved throughout training.
然而,与遗忘分数不同,我们提出的方法只使用局部信息,揭示了\样本的局部排序在整个训练过程中大致保持不变。
\citet{coleman2019selection} use a small proxy network in combination with other training data selection methods to find a small subset of important-for-training \samples, that can then be used to train a large state-of-the-art (SOTA) deep neural network.
In their empirical study, they observe that most important \samples selected via a proxy model are also important for training a SOTA network.
\citet{coleman2019selection}使用小型代理网络与其他训练数据选择方法相结合,找到重要的训练样本的小子集,然后可用于训练大型的最先进(SOTA)深度神经网络。
在他们的实证研究中,他们观察到通过代理模型选择的最重要的\样本对SOTA网络的训练也很重要。
In addition, they study a proxy which reuses SOTA network’s architecture but is trained for a shorter time.
The authors observe that selecting the important examples after at least 50 epochs of training works better than selecting them at random, but not as well as after the full training run.
They do not study shorter training times for proxies or relate it to the training dynamics in any other way.
此外,他们研究了一种重用SOTA网络架构但训练时间较短的代理。
作者观察到,在至少50个训练阶段之后选择重要的例子比随机选择效果更好,但不如在完整的训练阶段之后。
他们没有研究代理更短的训练时间,也没有以任何其他方式将其与训练动态联系起来。
Another line of related work is on coresets (see, e.g., \citep{agarwal2005geometric,munteanu2018coresets,huggins2016coresets,campbell2018bayesian,feldman2020turning,tolochinsky2018coresets}, and many others).
另一项相关工作是关于核心集(参见,例如\citep{agarwal2005几何,munteanu2018coreset,huggins2016coreset,campbell2018bayesian,feldman2020turning,tolochinsky2018coreset},以及许多其他)。
The term \emph{coresets} generally refers to a possibly weighted subset of \trainingdata. Much of the work on coresets is focused on identifying small training data subsets that provably yield an $\epsilon$-approximate solution to the original objective (on all the \trainingdata).
术语emph{coresets}通常指的是\训练数据的可能加权子集。核心集的大部分工作都集中在识别小的训练数据子集上,这些子集可以证明为原始目标(在所有的训练数据上)提供$ epsilon$-近似的解决方案。
Most guarantees require the problem to have special structure, such as convexity.
For nonconvex problems, like training deep neural networks, guarantees are provided for very conservative proxies, e.g., based on Lipschitz constants or smoothness.
While coreset selection comes with nice theoretical guarantees, in our opinion, the utility of these methods is best considered an empirical question.
大多数保证要求问题具有特殊的结构,如凸性。
对于非凸问题,如训练深度神经网络,可以为非常保守的代理提供保证,例如基于Lipschitz常数或平滑性。
虽然核心选择有很好的理论保证,在我们看来,这些方法的效用最好被认为是一个经验问题。
Coresets have also been studied in the active learning community. Here, the goal is to select a small set of \samples to label at any given iteration of training (see, e.g., \citep{wei2015submodularity,sener2017active,killamsetty2020glister, mirzasoleiman2020coresetsA,shen2017deep}, and references therein).
Coreset selection has also been proposed as a way to increase model robustness \citep{mirzasoleiman2020coresetsB}.
核心集在主动学习社区中也有研究。在这里,我们的目标是在任何给定的训练迭代中选择一小组样本进行标注(参见,例如\citep{wei2015submodularity,sener2017active,killamsetty2020glister, mirzasoleiman2020coresetsA,shen2017deep},以及其中的引用)。
核心选择也被提出作为一种提高模型鲁棒性的方法(citep{mirzasoleiman2020coresetsB})。
Informally, removing a training \sample from the \trainingdata and not hurting the generalization error suggests that the \sample has small ``influence’’ on the test data.
Influence of the training \samples on test \samples is studied in sample-based explainability \citep{koh2017understanding,barshan2020relatif,pruthi2020estimating}.
非正式地说,从训练数据中删除一个训练样本,而不伤害泛化误差,意味着这个样本对测试数据有很小的“影响”。
在基于样本的可解释性\citep{koh2017understanding,barshan2020relatif, pruthi2020estimation}中研究了训练样本对测试样本的影响。
On the theory side,
\citet{feldman2020does} recently proposed to model data as a mixture of populations
and study the role of memorization when the data distribution is long-tailed.
\citeauthor{feldman2020does} demonstrates conditions under which memorization is necessary for good generalization.
In doing so, he proposes a definition of \sample memorization and influence,
which can be interpreted as a leave-one-out notion of stability.
In an empirical study following this work, \citet{feldman2020neural} demonstrate that classifiers trained on computer vision benchmarks benefit from memorization. In particular, training without high-memorization-value \samples comes at a cost of accuracy of the learned neural network classifier.
在理论方面,
citet{feldman2020does}最近提出将数据建模为混合种群
并研究了记忆在数据分布长尾时的作用。
\citeauthor{feldman2020does}论证了记忆对于良好的泛化是必要的条件。
为此,他提出了一个\样本记忆和影响的定义,
这可以被解释为一种忽略了稳定性的概念。
在这项工作之后的一项实证研究中,\citet{feldman2020neural}证明在计算机视觉基准上训练的分类器受益于记忆。特别是,没有高记忆值的\样本的训练以学习到的神经网络分类器的准确性为代价。
In \cref{app:comparetomemorization}, we compare \scorename, \scoreerror, forgetting scores, and memorization values on CIFAR-100-trained Resnet50 networks; memorization values do not correlate with the other scores.
在\cref{app: comparetomorization},我们比较\scorename, \scoreerror,遗忘分数,和记忆值在cifar -100训练Resnet50网络;记忆值与其他分数无关。
\section{Discussion}
\label{sec:discussion}
In summary, our work both (1) introduces methods to significantly prune data without sacrificing test accuracy using {\it only} local information {\it very early} in training (\cref{fig:tradeoffs}), sometimes even at initialization,
and (2) uses the resulting methods to obtain new scientific insights into how different subsets of training examples drive the dynamics of deep learning.
综上所述,我们的工作(1)在不牺牲测试精度的情况下引入了在训练(\cref{fig:tradeoffs})中使用{\它仅}局部信息{\它非常早期}的方法,有时甚至在初始化时,
(2)使用结果的方法获得新的科学见解,以了解不同的训练示例子集如何驱动深度学习的动态。
We start from a principled approach by asking how much on average each training \sample influences the loss reduction of other examples, and from that starting point, we obtain $2$ scores, namely gradient norm (\scorename) and error norm (\scoreerror) that bound or approximate this influence, with higher scores indicating higher potential influence. We find that \samples with higher scores tend to be harder to learn, in the sense that they are forgotten more often over the entire course of training. We also find that the very highest scoring examples tend to be either unrepresentative outliers of a class, have non standard backgrounds or odd angles, are subject to label noise, or are otherwise difficult.
我们从一个原则性的方法开始,通过询问平均每个训练样本对其他例子的损失减少有多大影响,从这个起点,我们得到$2$的分数,即梯度范数(\scorename)和错误范数(\scoreerror),限制或近似这种影响,得分越高,潜在影响力越大。我们发现,分数越高的样本往往越难学习,也就是说,它们在整个训练过程中更容易被遗忘。我们还发现,得分最高的例子要么是一类中不具代表性的异常值,要么是非标准背景或奇数角度,要么受到标签噪声的影响,或者是其他困难。
This observation yields a simple and powerful sliding window method (\cref{fig:slidingwindow}) to prune data by keeping examples within a range of scores, where the start and the end of the range constitute just $2$ hyperparmeters that can be tuned via a validation set. Furthermore, we find that high-scoring examples primarily drive feature learning by maximally supporting the velocity of the NTK, whereas learning dynamics might actually give up on the very highest scoring examples that may correspond to unrepresentative examples or noise (\cref{fig:ntk}).
这种观察产生了一个简单而强大的滑动窗口方法(\cref{fig:slidingwindow}),通过将示例保持在一个分数范围内来修剪数据,其中范围的开始和结束只构成$2$超参数,可以通过验证集进行调优。此外,我们发现高分的例子主要通过最大限度地支持NTK的速度来驱动特征学习,而学习动态实际上可能会放弃得分最高的例子,这可能对应于不具代表性的例子或噪音(\cref{fig: NTK})。
Finally we show that higher (lower) scoring subsets of examples contribute to a rougher (smoother) loss landscape (\cref{fig:lmc}). Overall this decomposition of both loss landscape geometry and learning dynamics into differential contributions from different types of \samples constitutes an exciting new methodology for analyzing deep learning. A deeper understanding of the differential role played by different subsets of examples could aid not only in data pruning, but also in curriculum design, active learning, federated learning with privacy, and analysis of fairness and bias.
最后,我们展示了例子的高(低)评分子集有助于更粗糙(更平滑)的损失情况(\cref{fig:lmc})。总的来说,将景观损失几何和学习动态分解为不同类型样本的不同贡献,构成了一种令人兴奋的分析深度学习的新方法。深入了解不同样本子集所扮演的不同角色,不仅有助于数据修剪,还有助于课程设计、主动学习、与隐私联合学习以及分析公平和偏见。
\section*{Acknowledgements}
The authors would like to thank Blair Bilodeau, Alex Drouin, \’Etienne Marcotte, and Daniel M. Roy for feedback on drafts, as well as the Toolkit team at ServiceNow for providing the tools and computation resources that greatly accelerated our empirical work. S.G. thanks the Simons Foundation, NTT Research and an NSF Career award for funding while at Stanford.
作者要感谢Blair Bilodeau、Alex Drouin、Etienne Marcotte和Daniel M. Roy对草案的反馈,以及ServiceNow的Toolkit团队,感谢他们提供的工具和计算资源,极大地加快了我们的实证工作。感谢西蒙斯基金会,NTT研究和NSF事业奖在斯坦福大学的资助。
