DiM: Distilling Dataset into Generative Model

Kai Wang, Jianyang Gu, Hansong Zhang, Daquan Zhou, Zheng Zhu, Wei Jiang, Yang You

TL;DR

This paper introduces DiM, a novel dataset distillation method that synthesizes informative training data using a generative model, overcoming limitations of previous image-based distillation techniques. DiM achieves state-of-the-art performance across various datasets and architectures, demonstrating superior scalability and efficiency, particularly for complex models.

What Problem Does This Paper Address?

Training large deep learning models often requires massive datasets, which are computationally expensive and time-consuming to manage. Dataset distillation (DD) aims to alleviate this by creating small, synthetic datasets that can train models to a similar performance level as the original large datasets. However, existing DD methods, which distill knowledge into synthetic images, face several challenges:

  • Poor performance on larger architectures: Synthetic images generated by these methods often struggle to train complex models like ResNets.
  • Re-optimization cost: When the desired distillation ratio (e.g., images per class) changes, the entire distillation process needs to be redone.
  • Limited diversity: The diversity of synthetic images can be restricted, hindering performance, especially at higher distillation ratios.

Methods

DiM (Distill into Model) tackles these issues by shifting the paradigm of dataset distillation. Instead of generating synthetic images, DiM trains a generative model to store the discriminative information from the original dataset. The framework consists of two stages:

  • Distillation Stage:
    • Generative Model: A conditional GAN is trained to synthesize images from random noises and labels.
  • Models Pool: Instead of relying on a single model for supervision, DiM uses a pool of randomly initialized models. This provides diverse perspectives for learning.
  • Logits Matching (LM): This novel loss function minimizes the difference in predicted logits between real and synthetic images. This is crucial because logits directly influence downstream task performance. LM is more efficient than gradient or feature matching and provides richer supervision.
  • Multi-task Optimization: The generator is first trained with a standard GAN loss to produce realistic images, and then jointly optimized with the LM loss to ensure discriminative capabilities.
  • Deployment Stage: The trained generative model can synthesize diverse training samples on-the-fly from random noises. This allows for direct application to different distillation ratios and architectures without re-distillation.

Datasets

The proposed DiM method was evaluated on the following standard datasets:

  • MNIST
  • FashionMNIST
  • SVHN
  • CIFAR-10

Key Insights and Ideas

  • Shifting from Images to Models: The core innovation is distilling knowledge into a generative model rather than synthetic images. This allows for greater flexibility and efficiency.
  • Logits Matching for Discriminative Power: Directly matching the logits of real and synthetic images proves more effective for training discriminative models than traditional gradient or feature matching.
  • Models Pool for Robustness: Using a pool of diverse models for supervision enhances the robustness and generalization of the distilled knowledge.
  • Scalability and Redeployment Efficiency: DiM's ability to synthesize data on-the-fly from a trained generator eliminates the need for re-distillation when parameters like images per class change, offering significant cost savings.
  • Cross-Architecture Generalization: DiM demonstrates unprecedented performance, even allowing smaller distilled models to outperform larger ones in previous DD settings.

Key Results

  • State-of-the-Art Performance: DiM achieves state-of-the-art results on all tested datasets (MNIST, FashionMNIST, SVHN, CIFAR-10) across various architectures.
  • Superiority on Complex Architectures: DiM significantly outperforms previous methods, especially when training complex architectures like ResNet-18, achieving 75.1% accuracy on CIFAR-10 with only 10 images per class.
  • Efficiency Gains: DiM offers substantial redeployment efficiency, saving up to 160x GPU hours compared to existing methods.
  • Improved Diversity: DiM generates more discriminative synthetic images than standard GANs, as visualized in the paper.
  • Scalability: DiM shows strong scalability, with performance improving for larger architectures as the number of images per class increases.

Limitations and Future Work

  • Generation Effort: DiM still requires generating training samples at the deployment stage, which adds some computational effort for downstream tasks. The authors suggest designing lighter-weight generative models for future work.
  • Future Directions: The authors plan to explore the application of DiM to larger datasets like ImageNet and other tasks such as object detection and semantic segmentation. They also aim to investigate the ethical implications of their method.

Summary updated

BibTeX
@inproceedings{wang2023dim,
  author = {Kai Wang and Jianyang Gu and Hansong Zhang and Daquan Zhou and Zheng Zhu and Wei Jiang and Yang You},
  title = {{DiM: Distilling Dataset into Generative Model}},
  booktitle = {Workshops @ ECCV},
  year = {2023},
}
Figure