Not All Samples Should Be Utilized Equally: Towards Understanding and Improving Dataset Distillation

Shaobo Wang, Yantai Yang, Qilong Wang, Kaixin Li, Linfeng Zhang, Junchi Yan

TL;DR

Why do different dataset distillation algorithms perform so differently, and how should we pick what information to compress into synthetic images? This paper provides a theoretical and empirical framework showing that when distilling down to tiny budgets (low images-per-class), algorithms must prioritize learning easy samples rather than hard ones. Building on this insight, the authors introduce Sample Difficulty Correction (SDC)—a plug-and-play gradient-norm regularizer that consistently boosts performance across 7 popular distillation algorithms and 6 image benchmarks.

What Problem Does This Paper Address?

Dataset Distillation (DD) compresses large datasets into small, synthetic datasets such that a model trained on the synthetic data achieves performance comparable to one trained on the original dataset. Modern DD techniques primarily rely on matching surrogate model statistics between real and synthetic data—most notably Gradient Matching (GM) and Trajectory Matching (TM).

Despite their empirical success, two major questions remained open:

  1. Lack of theoretical unity: Why do TM-based methods consistently outperform GM-based methods in practice?
  2. Sample difficulty bias: Data pruning literature shows that sample difficulty (how hard an example is for a network to classify) heavily impacts learning. Yet, DD methods have largely ignored how sample difficulty affects the distillation trajectory.

Methods

  • GraDN Metric & Empirical Analysis: The authors measure sample difficulty via the GraDN score (the average $L_2$ norm of the sample loss gradient over an ensemble of models). They discover that GM methods inadvertently synthesize harder samples (gradients explode or rise over training), whereas TM methods decrease or smooth out sample difficulty.
  • Perceptron Scaling Law Theory: Extending statistical mechanics theory from data pruning to dataset synthesis, the authors analyze student-teacher perceptron setups in high-dimensional limits. The analytical scaling laws reveal a critical phase transition:
  • In small synthetic regimes (low IPC), matching easy samples (those with large margins) yields significantly lower generalization error. Hard samples hurt performance when capacity is constrained.
  • Only when the synthetic budget is large do harder samples become beneficial.
  • Sample Difficulty Correction (SDC): Filtering real samples by difficulty via thresholding is computationally prohibitive ($10\times$ slower). Instead, the authors introduce an implicit regularizer: penalizing the $L_2$ norm of the gradient on the synthetic batch: $$\mathcal{L}_{\text{total}} = \mathcal{L}_{\text{matching}} + \lambda \|\nabla_\theta \mathcal{L}_{D_{\text{syn}}}\|_2$$ This drives the optimizer toward simpler, easily learned patterns.

  • Adaptive SDC (ASDC): The authors also experiment with progressively scheduling $\lambda$ upwards over training iterations, enabling networks to start with foundational, easy features before gradually incorporating more complex patterns.

Datasets

The authors evaluated their framework on 6 standard image classification benchmarks:

  • MNIST, FashionMNIST, and SVHN (evaluated on GM methods).
  • CIFAR-10, CIFAR-100, and Tiny-ImageNet (evaluated on TM methods).

No new dataset benchmarks were introduced.

Key Insights and Ideas

  • GM's Fatal Flaw: The loss objective in Gradient Matching naturally over-penalizes samples with large gradients, inadvertently focusing synthetic data optimization on hard examples. In low-data regimes, this severely degrades test accuracy.
  • Why TM Performs Better: Trajectory matching aligns multi-step parameter paths rather than individual instantaneous gradients, avoiding an explicit bias toward high-gradient (hard) instances.
  • Simplicity First: When image-per-class (IPC) budgets are constrained (e.g., $\text{IPC} \le 10$), synthetic samples need to cover core class centroids and robust patterns rather than boundary edge cases.

Key Results

SDC was integrated into 7 baseline methods (DC, DSA, DSAC, MTT, FTD, TESLA, DATM) using default ConvNets:

  • Gradient Matching gains:
  • DSA on SVHN: Accuracy improved by +1.2% (IPC = 1) and +1.0% (IPC = 50).
  • DC on FashionMNIST: Accuracy increased by +1.1% (IPC = 50).
  • Trajectory Matching gains:
  • FTD on CIFAR-10: Accuracy rose by +1.2% (IPC = 10) and +1.1% (IPC = 50).
  • DATM on Tiny-ImageNet: Improved by +0.6% (IPC = 10).
  • Cross-Architecture Generalization: Distilled sets trained with SDC generalized better across unseen architectures (ResNet-18, VGG-11, AlexNet, LeNet, MLP). For example, DATM synthetic images for CIFAR-10 evaluated on AlexNet jumped +4.61% (IPC = 1).

Limitations and Future Work

  • High Computational Cost: Like many trajectory- and gradient-matching pipelines, training remains computationally demanding (e.g., distilling Tiny-ImageNet with DATM at IPC = 1 requires ~150 GB of GPU VRAM; IPC = 50 runs can take ~24 hours).
  • Hyperparameter Tuning: While sensitivity analyses show that performance is relatively robust to the regularization strength $\lambda$, identifying optimal values across varying datasets and IPC settings still requires manual tuning.

Summary updated

BibTeX
@inproceedings{wang2025not,
  author = {Shaobo Wang and Yantai Yang and Qilong Wang and Kaixin Li and Linfeng Zhang and Junchi Yan},
  title = {{Not All Samples Should Be Utilized Equally: Towards Understanding and Improving Dataset Distillation}},
  booktitle = {SynData4CV @ CVPR},
  year = {2025},
  url = {https://openreview.net/forum?id=ulgRu6zM3a},
}
Figure