TL;DR
This paper introduces "SGD-influence," a new method to automatically identify and remove "harmful" training data points that negatively impact machine learning models trained with Stochastic Gradient Descent (SGD). This approach works even for non-convex models and doesn't require domain expertise, making model improvement accessible to non-experts.
What Problem Does This Paper Address?
Building accurate machine learning models often involves improving them when performance is unsatisfactory. One common technique is "data cleansing," which aims to remove problematic data points from the training set. However, identifying these "influential" instances typically requires significant domain knowledge or expertise in machine learning to understand which data points are causing the model to fail. This creates a barrier for non-experts. Existing methods for influence estimation often rely on the assumption that the loss function is convex and an optimal model has been reached, which is not always true for modern deep learning models trained with SGD. This paper addresses the need for an automated, domain-agnostic method to identify influential instances for models trained with SGD, even when optimality is not achieved.
Methods
The core contribution is the introduction of SGD-influence, a new definition of influence tailored for models trained with SGD. Instead of assuming an optimal model, SGD-influence considers the counterfactual scenario where a single instance is absent during the SGD training process and measures how much the resulting model parameters change.
To estimate this SGD-influence without computationally expensive retraining, the authors propose a novel estimator based on the first-order Taylor approximation of the gradient. This method leverages intermediate models computed during the SGD training process. Specifically, it analyzes the steps of SGD by "retracing" the updates and incorporating information from mini-batches. The proposed method can be applied to multi-epoch SGD by aggregating the influence from each time an instance is encountered.
For practical implementation, they present two algorithms: one for the training phase (to store necessary information during SGD) and another for the inference phase (to efficiently compute the influence by retracing the stored information). A key innovation is that the computation of the Hessian-vector product, which can be memory-intensive for large models, is avoided by directly computing the necessary derivatives.
Datasets
The paper evaluates its methods on the following datasets:
- Adult: A tabular dataset.
- 20Newsgroups: A text dataset.
- MNIST: A handwritten digit recognition dataset.
- CIFAR10: An image classification dataset.
These datasets are used to demonstrate the method's effectiveness across different data domains and model types (linear logistic regression and deep neural networks).
Key Insights and Ideas
- SGD-Influence is a more practical notion of influence: By defining influence based on the SGD process itself, rather than an idealized optimal model, the method becomes applicable to the vast majority of modern deep learning training pipelines.
- Domain knowledge is not required: The automated nature of SGD-influence allows non-experts to effectively cleanse their data and improve model performance, democratizing model improvement.
- Non-convexity is not a barrier: The proposed method is designed to work with non-convex loss functions, which are prevalent in deep learning, unlike many prior influence estimation techniques.
- Retracing SGD steps is efficient: The proposed algorithm avoids retraining by cleverly using stored intermediate states from the SGD process, making it computationally feasible.
Key Results
- Accurate Influence Estimation: Experiments on synthetic datasets showed that the proposed method accurately estimates true linear influences, outperforming the baseline method (Koh and Liang, 2017) in terms of Kendall's tau and Jaccard index.
- Effective Data Cleansing: On MNIST and CIFAR10, removing the instances identified as influential by the proposed method led to statistically significant reductions in misclassification rates on the test set.
- Outperformance of Baselines: The proposed method and its approximate version (which retraces only one epoch) consistently outperformed other baseline methods (including K&L, Autoencoder, and Isolation Forest) in improving model performance after data cleansing.
- Qualitative Findings: The influential instances identified by the proposed method were often visually confusing or atypical, suggesting they genuinely impact model learning, whereas outlier detection methods sometimes identified instances that didn't improve performance when removed.
Limitations and Future Work
- Approximation for Non-Convexity: While the method is designed for non-convex losses, the theoretical bounds on estimation error are more uniform for convex losses. For non-convex losses, the estimation error can grow, though it's still shown to be manageable.
- Determining the Number of Instances to Remove: The paper mentions that determining the optimal number of instances to remove is a practical consideration and points to an appendix for a possible approach, suggesting this is an area for further exploration.
- Approximate vs. Full Counterfactual SGD: The paper notes that the approximate version (revisiting only one epoch) performs comparably to the full version, suggesting that for practical purposes, a less computationally intensive approach might suffice. Future work could explore further optimizations or variations of the approximation.
Summary updated