Abstract
Analytical theories suggest that higher-quality data can lead to lower test errors in models trained on a fixed data budget. Coreset selection (or data pruning) seeks to select a subset of training data to maximize the performance of models trained on this subset. There are two dominant approaches: geometry-based selection for maximizing data diversity, and difficulty-based selection using importance scores. However, optimizing for diversity often biases coresets toward easier samples, while difficulty ranking can omit easy samples necessary for learning basic features. We propose $D^2$ Pruning, a novel algorithm that uses forward and reverse message passing over a dataset graph to jointly consider diversity and difficulty. By updating difficulty scores based on neighborhood information, $D^2$ Pruning selects coresets that encapsulate both diverse and difficult regions of the dataset space. Our evaluation across vision, language, and multimodal datasets demonstrates that $D^2$ Pruning achieves state-of-the-art performance, particularly at high pruning rates, and improves generalization in large-scale pretrained models.
Introduction
As deep learning models scale to trillions of parameters, the computational cost of training on massive datasets has become a significant bottleneck. Data pruning aims to identify a small, high-quality subset—a "coreset"—that yields performance comparable to the full dataset. Historically, this has been approached through either geometry-based methods (focusing on diversity) or score-based methods (focusing on difficulty).
The challenge lies in the fact that these two factors are complementary but difficult to unify. Geometry-based methods often over-sample "easy" data to ensure coverage, while score-based methods may ignore easy samples that are crucial for establishing a model's foundational features. $D^2$ Pruning addresses this gap by treating the dataset as a graph, allowing difficulty scores to communicate with the underlying spatial distribution of the data.
Methodology
$D^2$ Pruning operates through a three-stage graph-based process:
- Graph Initialization: The dataset is represented as an undirected graph where nodes are data samples and edges connect each sample to its $k$-nearest neighbors in embedding space. Nodes are initialized with difficulty scores (e.g., forgetting scores).
- Forward Message Passing: Each node updates its score by collecting messages from its neighbors. This "upweights" samples in dense regions or those surrounded by other difficult samples, ensuring that representative "easy" samples in high-density areas are not prematurely discarded.
- Coreset Selection & Reverse Message Passing: The algorithm iteratively selects the highest-scoring samples. Upon selection, a "reverse" message is sent to neighbors to down-weight their scores, preventing the selection of redundant, similar samples and effectively enforcing diversity.
Experimental Evaluation
The authors evaluated $D^2$ Pruning across several domains:
- Vision: CIFAR-10/100 and ImageNet-1K.
- NLP: ImDB and Adversarial NLI, providing one of the first systematic coreset evaluations in natural language processing.
- Multimodal: DataComp, a massive corpus of image-text pairs.
Results and Insights
$D^2$ Pruning consistently outperformed previous state-of-the-art methods. On ImageNet-1K, it achieved a 1.0% to 1.4% improvement at 50% and 80% pruning rates. In NLP, it improved performance on Adversarial NLI by 1.7% at an 80% pruning rate, where traditional score-based methods often failed to exceed random sampling baselines.
A key insight is that message passing allows the algorithm to value "easy" samples if they represent dense clusters, while still prioritizing "hard" samples for their high information content. This balance is reflected in the importance score distributions, where $D^2$ Pruning maintains a broader, more representative spread than competing methods. Furthermore, the method is highly efficient; using optimized libraries like FAISS, it can process over 12 million samples in under an hour.
Conclusion
$D^2$ Pruning demonstrates that the most effective training data is not simply the most difficult, but a representative mix of the entire data manifold. While the method currently depends on initial pre-trained embeddings to calculate scores, its metric-agnostic nature and scalability make it a powerful tool for dataset curation. Future work may explore incorporating class-level information or more complex graph neural network architectures to further refine the selection process.
Summary updated