Abstract
Recent advancements in dataset distillation have demonstrated the significant benefits of employing soft labels generated by pre-trained teacher models. In this paper, we introduce a novel perspective by emphasizing the full utilization of labels. We first conduct a comprehensive comparison of various loss functions for soft label utilization in dataset distillation, revealing that the model trained on the synthetic dataset exhibits high sensitivity to the choice of loss function for soft label utilization. This finding highlights the necessity of a universal loss function for training models on synthetic datasets. Building on these insights, we introduce an extremely simple yet surprisingly effective plug-and-play approach, GIFT, which encompasses soft label refinement and a cosine similarity-based loss function to efficiently leverage full label information. Extensive experiments demonstrate that GIFT consistently enhances the state-of-the-art dataset distillation methods across various scales datasets without incurring additional computational costs. For instance, on ImageNet-1K with IPC = 10, GIFT improves the SOTA method RDED by 3.9% and 1.8% on ConvNet and ResNet-18, respectively.
Introduction
Dataset Distillation (DD) aims to shrink massive datasets like ImageNet into a tiny handful of synthetic images that retain the original's performance. While recent methods have moved from using "hard" one-hot labels to "soft" labels generated by teacher models, significant hurdles remain.
Models trained on distilled data are incredibly sensitive to the choice of loss function. A synthetic dataset that works perfectly with KL-divergence loss might fail if switched to standard Cross-Entropy. Furthermore, there is a persistent "optimizer gap": data distilled using one optimizer (e.g., AdamW) often performs poorly when trained with another (e.g., SGD). Finally, soft labels from teacher models are often imperfect, lacking the sharpness needed to clearly separate classes.
Methodology: The GIFT Approach
The authors introduce GIFT (Gaining Improvement from Full Labels at Near-zero CosT), a two-part strategy designed to be "plug-and-play" with any existing distillation method. Crucially, GIFT requires no extra training during the distillation phase; it is applied during the final stage when a user trains a model on the distilled dataset.
1. Label Refinement
Instead of blindly trusting teacher-generated soft labels, GIFT blends them with "smoothed" hard labels. This refinement helps correct teacher errors and provides a sharper signal that improves class separation in the synthetic set.
2. Cosine Similarity Loss
Moving away from standard Cross-Entropy or KL-divergence, the authors demonstrate that cosine similarity is a more robust loss function for synthetic data. By treating labels as high-dimensional vectors and focusing on the angle between the model's output and the target, it becomes less sensitive to specific gradient scales. In high-dimensional spaces, refined labels become approximately orthogonal, making cosine similarity an optimal choice for handling the geometry of these label vectors.
Experimental Results
The authors evaluated GIFT across standard benchmarks including CIFAR-100, Tiny-ImageNet, and ImageNet-1K, testing various "Images Per Class" (IPC) settings.
Performance Gains
GIFT consistently improved every state-of-the-art (SOTA) distillation method tested:
- Accuracy Boosts: On CIFAR-100, it improved the SRe2L method by 4.3% (at IPC=10) and Tiny-ImageNet by 3.0%.
- Large-Scale Success: On ImageNet-1K, GIFT improved the SOTA method (RDED) by 3.9% on ConvNet architectures at IPC=10.
- Cross-Architecture Generalization: Data distilled on a simple ConvNet and then trained on a ResNet-101 saw gains of up to 7.8% using GIFT.
Cross-Optimizer Breakthrough
One of the most significant findings is GIFT's ability to bridge the optimizer gap. On ImageNet-1K (IPC=10), GIFT improved the SOTA method (RDED) by a staggering 30.8% when switching between different optimizers during evaluation. This stability stems from the cosine similarity loss, which provides a more consistent gradient signal than traditional functions.
Conclusion
GIFT represents a "free" upgrade for dataset distillation. By focusing on the full utilization of label information through refinement and a universal loss function, it achieves massive gains in performance and generalization without adding computational overhead. While the method currently relies on pre-trained teacher models, its effectiveness across architectures and optimizers sets a new standard for the practical application of distilled datasets. Future work may extend these insights beyond classification to tasks like object detection and segmentation.
Summary updated