Distilling Long-tailed Datasets

Zhenghao Zhao, Haoxuan Wang, Yuzhang Shang, Kai Wang, Yan Yan

Abstract

Dataset distillation (DD) aims to condense large datasets into small synthetic sets while preserving model performance. However, existing DD methods struggle with real-world "long-tailed" data distributions where a few classes dominate. We present LTDD, a framework utilizing distribution-agnostic matching and expert decoupling to ensure tail classes are adequately represented. LTDD achieves state-of-the-art performance, significantly outperforming existing methods in extreme imbalance scenarios and even achieving "lossless" distillation on certain benchmarks.

Introduction

The goal of Dataset Distillation is to create a compact summary of a massive dataset—for instance, reducing thousands of images to just 10 or 50 per class—that remains effective for training high-performing models. While successful on balanced datasets like CIFAR-10, standard DD methods fail on long-tailed distributions common in domains like medical imaging.

Two primary issues arise in imbalanced DD:

  1. Biased Gradients: Distillation typically matches the training trajectory of an "expert" model. If the expert is trained on imbalanced data, its gradients favor "head" (common) classes, leading the synthetic dataset to ignore "tail" (rare) classes.
  2. Poor Supervision: Experts trained on imbalanced data provide unreliable guidance for tail classes, resulting in poor "soft labels" and ineffective student training.

Methodology

LTDD addresses these challenges through two core strategies:

Distribution-agnostic Matching (DAM)

DAM re-weights the student's learning process to counteract class imbalance. By modifying the loss function to "absorb" the effects of imbalance—similar to Balanced Softmax techniques—DAM allows the student to learn a balanced weight distribution despite being guided by a biased teacher. This prevents tail classes from being overshadowed during synthetic image optimization.

Expert Decoupling (ED)

Recognizing that feature extractors and classifiers react differently to imbalance, LTDD employs two types of experts:

  • Representation Experts: Trained on the full imbalanced dataset to capture rich, diverse features.
  • Classification Experts: Fine-tuned on a balanced version of the data to establish unbiased decision boundaries.

The student model matches the trajectories of both experts, ensuring synthetic images contain both high-quality features and reliable label information for all classes.

Experimental Results

We evaluated LTDD on several benchmarks, including CIFAR-10/100-LT, TinyImageNet-LT, and ImageNet-LT, across various Imbalance Factors ($\beta$) and Images-Per-Class (IPC) settings.

Performance in Extreme Imbalance

LTDD demonstrates remarkable robustness as data imbalance increases. On CIFAR-10-LT with an extreme imbalance factor of $\beta=200$ and IPC=50, LTDD achieved 62.3% accuracy, significantly higher than the previous state-of-the-art (DATM) at 40.1%.

Accuracy vs. Imbalance Factor: LTDD (ours) maintains high performance even as the imbalance factor increases, whereas baselines like DATM and MTT degrade significantly.

Tail Class Recovery

A class-wise analysis reveals that LTDD effectively "recovers" tail classes. While standard methods often yield near-zero accuracy for the rarest classes, LTDD boosts tail accuracy without compromising performance on head classes. This is achieved by ensuring more even weight norms across the model's classifier.

Class-wise Comparison: Compared to the DATM baseline (left), LTDD (right) produces more balanced weight norms and significantly higher accuracy for tail classes.

Conclusion

LTDD represents a significant advancement in dataset distillation for real-world, imbalanced data. By decoupling expert roles and employing distribution-agnostic matching, it overcomes the "biased teacher" trap. Future work will focus on reducing the computational cost of expert trajectory training and extending these techniques to complex tasks like object detection.

Summary updated

BibTeX
@inproceedings{zhao2025distilling,
  author = {Zhenghao Zhao and Haoxuan Wang and Yuzhang Shang and Kai Wang and Yan Yan},
  title = {{Distilling Long-tailed Datasets}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2025},
  doi = {10.1109/cvpr52734.2025.02850},
}
Figure