Towards Universal Dataset Distillation via Task-Driven Diffusion

Ding Qi, Jian Li, Junyao Gao, Shuguang Dou, Ying Tai, Jianlong Hu, Bo Zhao, Yabiao Wang, Chengjie Wang, Cairong Zhao

Abstract

Dataset Distillation (DD) aims to condense large-scale datasets into a small set of synthetic images that retain the original data's performance. However, existing DD methods are primarily optimized for image classification, failing to generalize to complex tasks like object detection and semantic segmentation. We present UniDD (Universal Dataset Distillation), a framework that utilizes task-specific proxies to guide a pre-trained diffusion model. UniDD effectively captures both global semantics and localized details, setting new state-of-the-art benchmarks across multiple vision tasks while maintaining high computational efficiency.

Introduction

The primary goal of Dataset Distillation is to reduce storage and training costs by creating a "distilled" version of a dataset. While successful in classification, current DD approaches face two major hurdles: Task Optimization Heterogeneity and Inflexible Image Generation. Classification-centric methods focus on global features, which are insufficient for tasks requiring precise spatial localization, such as bounding box detection or pixel-wise segmentation. Furthermore, existing generative DD methods often lack the fine-grained control needed to synthesize multi-object scenes with specific spatial arrangements.

The UniDD Framework

UniDD addresses these challenges through a two-stage process that decouples knowledge mining from image synthesis.

Stage I: Universal Task Knowledge Mining

To capture task-specific nuances, UniDD employs two primary components:

  1. Task-Specific Proxies ($T_{SP}$): Lightweight models (e.g., ResNet-18 for classification, Faster R-CNN for detection) are trained on the original dataset. These proxies serve as teachers that encapsulate the necessary task-specific knowledge.
  2. Task-Aligned Contextual Prompting: Leveraging Large Language Models (LLMs) like GPT-4o, the framework generates descriptive text prompts. These prompts provide the diffusion model with rich contextual information, describing object relationships and backgrounds rather than just class labels.

Stage II: Universal Task-Driven Diffusion

UniDD utilizes a pre-trained Stable Diffusion (SD) model as its generative backbone. Notably, the SD model is kept frozen, avoiding the high cost of fine-tuning.

The UniDD framework architecture, illustrating the flow from large real datasets and task labels through the distillation process to the final synthetic set.

The synthesis is driven by a Guidance Mechanism. During the denoising process, the proxy model ($T_{SP}$) evaluates the intermediate noisy images and calculates a task-specific loss. The gradient of this loss is used to "nudge" the diffusion process, ensuring the generated pixels align with the target labels, boxes, or masks. A final High-Realism Refinement step filters out low-quality "hallucinations," ensuring only the most effective synthetic images are retained.

Experimental Results

The researchers evaluated UniDD across a wide range of benchmarks, including ImageNet-1K for classification, Pascal VOC and MS COCO for object detection, and Pascal VOC for semantic segmentation.

Performance Gains

UniDD demonstrates significant improvements over previous state-of-the-art (SOTA) methods. On ImageNet-1K at 10 Images Per Class (IPC), UniDD achieved an accuracy of 50.4%, a 6.1% improvement over the best previous diffusion-based method. In the more challenging domain of object detection, UniDD reached 16.8% mAP on Pascal VOC (at 1% ratio), vastly outperforming traditional coreset selection methods which typically achieve only 4-5% mAP.

Radar chart comparing UniDD performance against SOTA across various tasks and datasets, highlighting its universal superiority in classification, detection, and segmentation.

Discussion and Conclusion

UniDD represents a significant step toward truly universal dataset distillation. By shifting from model fine-tuning to task-driven guidance, the framework achieves high flexibility and efficiency. The use of LLMs for scene architecture further enhances the realism and spatial accuracy of the distilled images. While the refinement stage discards a small percentage of generated samples, the overall efficiency remains high compared to trajectory-matching methods. Future work may focus on reducing this discard rate and extending the framework to even more specialized domains.

Summary updated

BibTeX
@inproceedings{qi2025towards,
  author = {Ding Qi and Jian Li and Junyao Gao and Shuguang Dou and Ying Tai and Jianlong Hu and Bo Zhao and Yabiao Wang and Chengjie Wang and Cairong Zhao},
  title = {{Towards Universal Dataset Distillation via Task-Driven Diffusion}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2025},
  doi = {10.1109/cvpr52734.2025.00987},
}
Figure