Abstract
Dataset condensation aims to condense a large dataset with a lot of training samples into a small set. Previous methods usually condense the dataset into the pixels format. However, it suffers from slow optimization speed and large number of parameters to be optimized. When increasing image resolutions and classes, the number of learnable parameters grows accordingly, prohibiting condensation methods from scaling up to large datasets with diverse classes. Moreover, the relations among condensed samples have been neglected and hence the feature distribution of condensed samples is often not diverse. To solve these problems, we propose to condense the dataset into another format, a generative model. Such a novel format allows for the condensation of large datasets because the size of the generative model remains relatively stable as the number of classes or image resolution increases. Furthermore, an intra-class and an inter-class loss are proposed to model the relation of condensed samples. Intra-class loss aims to create more diverse samples for each class by pushing each sample away from the others of the same class. Meanwhile, inter-class loss increases the discriminability of samples by widening the gap between the centers of different classes. Extensive comparisons with state-of-the-art methods and our ablation studies confirm the effectiveness of our method and its individual component. To our best knowledge, we are the first to successfully conduct condensation on ImageNet-1k.
Introduction
Dataset Condensation (DC) is a technique used to create a small synthetic dataset that retains the essential information of a much larger original dataset. Training models on these condensed sets significantly reduces computational and environmental costs. However, traditional DC methods face a "Scalability Wall" because they optimize raw pixels. As image resolution or class counts increase, the parameter space explodes. Additionally, these methods often suffer from a "Diversity Wall," where synthetic samples become overly compact and redundant, leading to poor generalization.
Methodology
We propose a paradigm shift: condensing datasets into a generative model rather than a static set of pixels. This approach utilizes a learnable codebook $Z$ and a generator $G$ to represent the data distribution.
Generative Architecture
Instead of optimizing millions of individual pixels, we optimize a shared generator and a set of latent codes. This architecture is parameter-efficient because the generator's size does not scale linearly with the number of classes. To generate a synthetic image, a code is sampled from the codebook and passed through the generator, conditioned on a class embedding $c(y)$.
Relational Loss Functions
To address the lack of diversity in previous methods, we introduce two novel relational losses:
- Intra-class Diversity Loss: This loss pushes synthetic samples of the same class away from each other in the feature space, ensuring the synthetic set covers a wider range of the original distribution.
- Inter-class Discrimination Loss: This loss maximizes the distance between the centers of different classes, enhancing the discriminability of the synthetic samples for downstream training.
Experimental Results
Our method was evaluated across various benchmarks, including MNIST, CIFAR-10, and, most notably, ImageNet-1k.
- ImageNet-1k Scaling: We achieved the first successful condensation of ImageNet-1k (64x64). With 50 images per class (IPC), our method reached 27.2% accuracy, a significant milestone for the field.
- State-of-the-Art Performance: On CIFAR-10 (1 IPC), we achieved 48.2% accuracy, outperforming the previous state-of-the-art (MTT) by nearly 2%.
- Cross-Architecture Generalization: Synthetic data generated via a simple ConvNet transferred effectively to ResNet, VGG, and AlexNet, often outperforming existing methods by over 10% in cross-architecture scenarios.
Conclusion
By treating dataset condensation as a generative task rather than a pixel-optimization task, we overcome the primary barriers to scaling DC to large-scale datasets. The inclusion of relational losses ensures that the resulting synthetic data is not only compact but also diverse and representative, providing a robust foundation for efficient deep learning training.
Summary updated