Introduction
The performance of machine learning models is fundamentally limited by the quality of their training data. Real-world datasets are often compromised by "data glitches," primarily categorized into mislabeled samples (annotation errors) and anomalies (outliers). Traditional model-agnostic tools often fail to capture how a specific model architecture perceives these errors. This paper introduces a unified framework that leverages influence functions to detect and repair these glitches by analyzing the model's internal training dynamics.
Methodology: Counterfactual Influence
The proposed framework utilizes TracIn, a dynamic influence estimator that tracks how individual training samples affect the model's loss on a clean validation set throughout the training process. The authors innovate by introducing "Counterfactual Influence Signals," which ask how the model's perception would change if a sample's label were different.
Key Signals
- CNCI (Conditional Negative Counterfactual Influence): Targeted at mislabeled samples. It identifies labels that, if assigned, would most significantly improve model performance.
- PCID (Positive Counterfactual Influence Difference): Targeted at anomalies. It identifies samples that maintain consistently low influence regardless of label changes, indicating they reside in sparse data regions.
- CFRank (Counterfactual Influence Rank): A hybrid signal for datasets containing both types of glitches.
Experimental Evaluation
The framework was tested across various modalities, including image datasets (MNIST, CIFAR-10, ImageNet-Dogs) and tabular datasets (Epsilon, Forest Cover), using architectures like ResNet, Vision Transformers (ViT), and ConvNeXt.
Performance on Mislabeled Samples
A primary highlight of the research is the significant performance gain over existing state-of-the-art tools. As shown in the figure below, the CNCI signal consistently outperforms CleanLab across multiple modern architectures.
Furthermore, when compared against a broader suite of influence-based baselines, CNCI maintains a clear lead in detection accuracy (F1 score), particularly for complex architectures like ViT and ConvNeXt.
Key Insights
- Influence Signatures: The research demonstrates that mislabeled samples and anomalies have distinct "fingerprints." Mislabeled samples exhibit high negative influence as they conflict with the decision boundary, whereas anomalies are characterized by low positive influence because they are effectively ignored by the broader distribution.
- Efficiency: By restricting influence calculations to the model's last layer, the framework requires only approximately 10% of the total training time, making it a practical addition to standard ML pipelines.
- Repair Capabilities: Beyond detection, CNCI can suggest correct labels with roughly 85% accuracy, facilitating automated dataset cleaning.
Conclusion
By shifting from model-agnostic data cleaning to an "explainable-by-design" influence-based approach, this framework provides a robust solution for maintaining high-quality training sets. Future work aims to address more complex "feature-dependent" noise and scale these techniques to extremely large models.
Summary updated