Dataset Distillation by Automatic Training Trajectories

Dai Liu, Jindong Gu, Hu Cao, Carsten Trinitis, Martin Schulz

Abstract

Dataset Distillation (DD) aims to condense large-scale datasets into a small set of synthetic samples that retain the informative power of the original data. Recent state-of-the-art methods rely on Long-range Trajectory Matching (LDD), where synthetic data is optimized to make a student model's training path mimic that of an expert model trained on real data. However, these methods typically employ a Fixed Trajectory Length (FTL), forcing the student to match the expert at a rigid, predetermined step. This paper identifies the Accumulated Mismatching Problem (AMP) caused by FTL, which leads to distorted synthetic data and poor cross-architecture generalization. We propose Automatic Training Trajectories (ATT), a dynamic approach that allows the student to adaptively find the optimal matching point. Our results demonstrate that ATT significantly improves performance and robustness, particularly when transferring distilled data to unseen neural architectures.

Introduction

Deep learning's reliance on massive datasets presents significant challenges in terms of storage and computational overhead. Dataset Distillation (DD) addresses this by synthesizing a tiny fraction of the original data—sometimes as few as 1 to 10 images per class—capable of training models to high accuracy.

Among distillation techniques, Long-range Trajectory Matching (LDD) has emerged as a leading paradigm. In LDD, the goal is to optimize synthetic pixels so that a model trained on them (the student) reaches a parameter state identical to a model trained on the full dataset (the expert) after a certain number of steps. Despite its success, LDD suffers from a fundamental rigidity: it assumes that the student can and should reach the expert's state in a fixed number of updates ($N$). This paper argues that this assumption is flawed and introduces a more flexible, adaptive framework.

The Accumulated Mismatching Problem (AMP)

In traditional LDD, the trajectory length is a static hyperparameter. However, because of variations in initialization, learning rates, and architectural differences, the "natural" progress of a student model rarely aligns perfectly with a fixed schedule. Forcing this alignment creates the Accumulated Mismatching Problem (AMP).

When a student is forced to match an expert state at a step that is either too early or too late for its current optimization state, the distillation process "warps" the synthetic images to compensate for the discrepancy. This results in synthetic data that is overfitted to the specific training dynamics of the distillation architecture and fails to generalize when used to train different models (e.g., data distilled on a simple ConvNet performing poorly on a ResNet).

Proposed Method: Automatic Training Trajectories (ATT)

To resolve AMP, we introduce Automatic Training Trajectories (ATT). Instead of a fixed $N$, ATT treats the trajectory length as a dynamic variable that is optimized during the distillation process. The method consists of three core components:

  1. Minimum Distance Strategy: During each distillation iteration, the algorithm unrolls the student's training trajectory over a range of steps. At each step, it calculates the Euclidean distance between the student’s current parameters and the target expert parameters.
  2. Adaptive Selection: The algorithm identifies the specific step, $N_{opt}$, where the distance between the student and the expert is minimized. This step represents the point of maximum alignment.
  3. Dynamic Optimization: Back-propagation is performed only at $N_{opt}$. By selecting the point where the student naturally aligns with the expert, the optimization pressure on the synthetic images is used to refine features rather than to correct for artificial timing mismatches.

This approach allows the student to find its own pace, ensuring that the resulting synthetic data remains representative of the underlying data distribution rather than the specific artifacts of a fixed training schedule.

Experimental Results

We evaluated ATT across several standard benchmarks, including CIFAR-10, CIFAR-100, Tiny ImageNet, and various ImageNet subsets (ImageNette, ImageWoof, ImageFruit, and ImageMeow).

Cross-Architecture Generalization

One of the most striking benefits of ATT is its ability to produce architecture-agnostic synthetic data. In tests on CIFAR-10 with 10 images per class (IPC), ATT-distilled data—originally created using a standard ConvNet—showed remarkable performance when used to train other architectures:

  • AlexNet: Achieved a 7.7% improvement over previous state-of-the-art methods.
  • VGG11: Achieved a 7.2% improvement.

Large-Scale Performance

On more complex datasets like the ImageNet subsets (128x128 resolution), ATT consistently outperformed existing methods like MTT and FTD by 1-2%. For instance, on the "ImageMeow" subset, ATT reached 45.5% accuracy, compared to 40.4% for MTT.

Computational Efficiency

Despite the requirement to calculate distances at multiple steps, ATT remains computationally competitive. It maintains a runtime of approximately 0.8 seconds per iteration, similar to vanilla LDD. This efficiency is due to the algorithm's ability to identify optimal matches early in the trajectory, often bypassing the need for exhaustive computation of the full unrolled path.

Discussion and Stability

Beyond accuracy gains, ATT introduces a new level of stability to the distillation process. Traditional LDD is highly sensitive to hyperparameters; an incorrect learning rate for synthetic pixels can lead to divergent trajectories. ATT provides a buffer by adaptively adjusting the target step, making the distillation process more robust to variations in learning rates and initialization.

Conclusion and Limitations

Automatic Training Trajectories (ATT) represent a significant step forward in dataset distillation by replacing rigid trajectory matching with an adaptive, distance-based alignment strategy. By solving the Accumulated Mismatching Problem, ATT produces synthetic data that is more robust, more accurate, and significantly better at generalizing across different neural architectures.

However, limitations remain. Like all LDD-based methods, ATT requires the pre-computation and storage of expert trajectories, which can be storage-intensive (up to 120MB per expert). Additionally, the distillation process for large-scale datasets remains hardware-intensive, often requiring high-end GPU clusters. Future research will focus on reducing these resource requirements while maintaining the generalization benefits provided by adaptive trajectories.

Summary updated

BibTeX
@inproceedings{liu2024dataset,
  author = {Dai Liu and Jindong Gu and Hu Cao and Carsten Trinitis and Martin Schulz},
  title = {{Dataset Distillation by Automatic Training Trajectories}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  doi = {10.1007/978-3-031-73021-4\_20},
}
Figure