Sam Babichenko

Reading notes / Dataset distillation

Dataset distillation

2018-2026

The problem
T,\mathcal T, S\mathcal Sreal training set, distilled set
θ(S)\theta(\mathcal S)weights after training on S\mathcal S
ℓT\ell_{\mathcal T}average cross-entropy on the real data
Kernel distillation
yT,y_{\mathcal T}, ySy_{\mathcal S}labels of the real and the distilled images
KTS,K_{\mathcal T\mathcal S}, KSSK_{\mathcal S\mathcal S}kernel matrices between real and distilled, and among distilled images
λ\lambdaridge penalty
Distribution matching
ψ\psia randomly initialized feature network
Tc,\mathcal T_c, Sc\mathcal S_creal and distilled images of class cc
Paper symbols
KTSK_{\mathcal T\mathcal S}KIP writes KXtXsK_{X_tX_s}, with XtX_t the real and XsX_s the support images
ψ\psiZhao and Bilen write ψϑ\psi_\vartheta, with ϑ\vartheta the random weights

Context. Wang et al. (2018) introduced dataset distillation to build a small synthetic training set, typically 1 to 50 images per class, that trains a network from scratch nearly as well as the full dataset. Its pixels can take any value, whereas a a subset of the real training examples chosen to stand in for the whole set, for example by K-center or herding selection keeps real images. The field aimed for datasets small enough to store or send and training runs cheap enough to repeat many times. Eight years of work produced three main families of methods, followed by controlled tests of what they actually deliver.

Fair comparisons split the evidence by scale. On small datasets with one-hot labels and a few images per class, matching methods build synthetic images that train a network far better than the subsets of real images tested against them. At ImageNet scale, the labels and training compute govern accuracy. With a teacher network's soft labels and the same training recipe, random real images match nearly every distilled set. Under one-hot labels on ImageNet, the strongest methods, selected real patches and drifting, have not been shown to beat the best subsets of real images, except selected patches at 50 images per class. Above about 200 images per class on CIFAR-10, every synthesis method tested drops to the level of random selection.

The bilevel problem. Write the real training set, images with their class labels for the real training set, the distilled set, a few images per class with their labels for the distilled set, and the weights a network reaches when it is trained from a random start on the distilled set alone for the weights reached after training a network on S\mathcal S. Let ℓT(θ)\ell_{\mathcal T}(\theta), the average cross-entropy of the network with weights θ\theta on the real training set be the average loss on the real data. Dataset distillation solvesmin⁡S ℓT(θ(S)).\min_{\mathcal S}\ \ell_{\mathcal T}\big(\theta(\mathcal S)\big).The bottleneck is the inner training run: real-data loss depends on S\mathcal S only through an entire training run. Every family works around that run in a different way. The first simplifies or unrolls training, either stepping through a few updates or taking a closed-form kernel limit. The second matches the training trajectory or the data distribution without differentiating through a full run. The third leans on a classifier or generative model already trained on the real data.

Differentiating through training. Wang et al. (2018) attack the bilevel objective directly by treating pixels as parameters of a short training run. They train a network for a few steps on the synthetic images, evaluate the resulting weights on real data, and backpropagate that loss through every step to the pixels. To first order, one small step rewards synthetic images whose loss gradient aligns with the real-data gradient. Memory and time grow linearly with the number of unrolled steps, so only very short runs fit. Images fitted to a single fixed initialization also generalize poorly to other starting points. Direct unrolling is now mainly historical, though its objective still defines the field.

Kernel distillation. Kernel methods avoid unrolling by replacing finite-width training with a closed-form limit. An infinitely wide network trains like the regression that predicts at a new point a weighted combination of the training labels, with weights set by the kernel similarities to the training points and a ridge penalty λ\lambda, which turns the bilevel problem into a single-level least-squares objective. kernel inducing points: fits the distilled images, and optionally their labels, so that kernel ridge regression on them predicts the labels of the real images. Reading note: Kernel dataset distillation (Nguyen et al., 2021) minimizes that regression's prediction error on the real labels. Write the labels of the real and of the distilled images, one row per image; KIP can learn ySy_{\mathcal S} along with the images for the real and distilled label matrices, λ\lambda for the ridge penalty, and KTSK_{\mathcal T\mathcal S}, KSSK_{\mathcal S\mathcal S} for the network's KTSK_{\mathcal T\mathcal S} holds the kernel between every real and every distilled image, KSSK_{\mathcal S\mathcal S} between distilled images; here the neural tangent kernel of the architecture across real-to-distilled and distilled-to-distilled pairs. KIP solvesmin⁡S, yS ∥yT−KTS×(KSS+λI)−1yS∥2.\begin{aligned}\min_{\mathcal S,\,y_{\mathcal S}}\ \big\|y_{\mathcal T}&-K_{\mathcal T\mathcal S}\\&\times(K_{\mathcal S\mathcal S}+\lambda I)^{-1}y_{\mathcal S}\big\|^2.\end{aligned}The regression predicts each real image's label from the distilled images that resemble it, and optimization moves both S\mathcal S and ySy_{\mathcal S} to match the true labels.

Computing the infinite-width convolutional kernel is still expensive. FRePo (Zhou et al., 2022) keeps the ridge objective and substitutes a cheaper kernel built from the last-layer features of a pool of finite networks. Those networks train on the distilled images and reset every few steps. Even so, cost and width transfer limit the family. Cazenavette et al. (2022) report that KIP needs over 1,000 GPU-hours for its convolutional kernel. On CIFAR-10, a set fitted to an infinitely wide network also loses accuracy on a narrower network. At 10 images per class, accuracy drops from 62.7% at width 1024 to 57.6% at width 128, though the width-1024 ConvNet also carries an extra convolutional layer.

Matching training. Matching methods stay at finite width. They optimize synthetic images so a network trained on them follows the same weight path as real training. From the same checkpoint, an a network trained normally on the real data, with its weights saved after every epoch runs for several epochs on real data while a student takes a few steps on the synthetic images. Minimizing the distance between their endpoints gives (Cazenavette et al., 2022) start a student at a saved checkpoint of a real-data run, train it a few steps on the synthetic images, and minimize its distance to the checkpoint several epochs later. Reading note: Matching training trajectories, with gradient matching as its one-step case. The method requires storing expert runs, and its images fit one architecture. Memory also grows with the student rollout until a constant-memory gradient removes that growth. Trajectory matching wins clearly only on small problems with one-hot labels, such as CIFAR or Tiny ImageNet up to about 50 images per class. Once real images also get a teacher's soft labels, that lead disappears on Tiny ImageNet, though not on CIFAR-10.

Distribution matching. Zhao and Bilen (2023) drop the inner training loop altogether and align each synthetic class with the real class across random feature spaces. At every step, they sample a randomly initialized network a convolutional network with random weights and its classifier removed, drawn afresh at every step; ψ(x)\psi(x) is its feature vector for image xx and, for each class cc, match the mean feature of the synthetic class the distilled images of class cc; Tc\mathcal T_c are the real images of class cc to that of the real class Tc\mathcal T_c:min⁡Sc Eψ∥1∣Tc∣∑x∈Tcψ(x)−1∣Sc∣∑x∈Scψ(x)∥2.\begin{aligned}\min_{\mathcal S_c}\ \mathbb E_\psi\Big\|&\tfrac1{|\mathcal T_c|}\textstyle\sum_{x\in\mathcal T_c}\psi(x)\\&-\tfrac1{|\mathcal S_c|}\textstyle\sum_{x\in\mathcal S_c}\psi(x)\Big\|^2.\end{aligned}Each step takes one forward and backward pass per class, so the method scaled where trajectory matching did not. Matching a class mean gives a weak signal for placing 1 to 10 images. On CIFAR-10 at 10 images per class, it reaches 48.9% against 65.3% for trajectory matching.

Distillation by drifting. (Cazenavette et al., 2026) moves the distilled images' augmented views, in a pretrained feature space, toward the nearby real images of the class and away from the other views. Reading note: Dataset distillation via drifting (Cazenavette et al., 2026) replaces the class mean with local forces in a pretrained encoder's feature space. It pulls each synthetic view toward nearby real images of the class and pushes it away from other synthetic views. The pull anchors each image to the class while the push spreads the set across it, much like samples from a small generative model. On ImageNet-1k at 10 images per class with one-hot labels, drifting from noise reaches 27.0%, beating every compared classifier-based method, the best of which reaches 11.7% from noise. Distilling takes about 250 GPU-hours, and drifting sits slightly behind the best diffusion-based methods on one-hot labels. Knowledge from the pretrained encoder enters through its features. The paper also reports no random-real or coreset baseline under its own training recipe, leaving that 27.0% unplaced against simple selection.

Leaning on a pretrained classifier: inversion. A third route bypasses the inner training loop by using a classifier already trained on the real data as a compressed stand-in. Inversion methods such as squeeze, recover and relabel (Yin et al., 2023): train a classifier, synthesize images from noise that it assigns to the target class while matching its BatchNorm statistics, then train the student on its soft predictions optimize pixels from noise until the classifier assigns them confidently to the target class while matching its BatchNorm statistics. The student then trains on that classifier's soft predictions. Because the pixels fit a single classifier's decision boundary, the images look alike and unnatural. With one-hot labels, they train a network worse than the same number of random real images.

Selected real patches. (Sun et al., 2024) scores random crops of real photographs by a pretrained classifier's confidence in the true class, keeps the best, and tiles four into each stored image. Reading note: Distilling ImageNet from real patches (Sun et al., 2024) keeps the pretrained classifier and drops pixel synthesis. It scores random crops of real photographs by the classifier's confidence in the true class, keeps the top crops, and tiles four into each stored image. Every crop is a real photograph, so nothing is fitted to a decision boundary and the classifier selects clear views of the class. With one-hot labels, RDED leads the classifier-based methods. At 50 images per class it beats random real images by about 10 points and comes close to the best subsets of whole images. Confidence scoring still favors easy, typical crops, and once the student learns from a teacher's soft labels, random real images do as well.

Leaning on a generative model. A pretrained generator already models the class distribution, so distillation only needs a spread-out handful of samples. Under any matching loss, GLaD (Cazenavette et al., 2023) optimizes a generator's latent codes instead of pixels. That keeps outputs closer to the generator's range and removes high-frequency patterns fitted to the distilling network. D4M (Su et al., 2024) and Minimax diffusion (Gu et al., 2024) sample a pretrained diffusion model and steer it toward typical, mutually diverse class images. These methods draw their information from the generator itself. Minimax's generator is trained on ImageNet itself and D4M uses Stable Diffusion trained on web images, so the distilled set samples a compressed copy of a much larger dataset. One-hot evidence is mixed at 50 images per class. In one re-evaluation, D4M trails random real images at 21.6% against 28.5%. Under the drifting paper's longer recipe, the best diffusion method leads every family at 44.3% against 41.1% for drifting.

What the labels do. Most ImageNet-scale methods train the student with a teacher's the teacher's predicted class probabilities, used as training targets in place of one-hot labels. Reading note: Soft labels in dataset distillation. Many generate a fresh target for every augmented crop at every step, turning training into training a student network to match a teacher network's softened predictions on each input (Hinton et al., 2015). Qin et al. (2024) isolate the labels on ImageNet-1k at 10 images per class by holding random real images fixed. Accuracy jumps from 3.9% with one-hot labels to 25.8% with SRe2L's per-crop labels, above the 21.3% SRe2L reported for its synthesized images under the same labels. Compute amplifies the effect. Under knowledge distillation, Dey et al. (2026) reach 58.1% with 50 random real images per class, against 62.5% for full-dataset training at equal compute, so compute dominates image choice. Labels also dominate storage. At 50 images per class, SRe2L-style per-crop labels take 28.33 GB against 750 MB for the images (Cui et al., 2026).

Fair evaluation. Fair tests compare a distilled set against random real images and a strong coreset of the same size, using identical labels and training recipes. One-hot labels isolate the images themselves. Under that standard, pure synthesis wins clearly only on small datasets at 1 to 50 images per class with one-hot labels, where trajectory matching leads. Above about 200 images per class on CIFAR-10, every synthesis method tested drops to the level of random selection (DC-BENCH, Cui et al., 2022). On ImageNet-1k with one-hot labels, the stronger methods build on real images or a pretrained encoder. None has been shown to beat the best coresets, except selected patches at 50 images per class.

Claimed uses that fail fair tests. The motivating downstream applications have not survived controlled evaluation. In CIFAR-10 architecture search, rankings of 100 architectures trained on distilled sets correlate negatively with full-data rankings. Their Spearman correlations run from −0.50-0.50 to −0.09-0.09, against 0.75 for real data trained the same way. Carlini et al. (2022) showed that the privacy claim rested on a baseline scored over the wrong population. Scored properly, that baseline's attack advantage is 1.6% rather than 92.8%, and DP-SGD gives higher accuracy at lower attack advantage with a provable guarantee. Under knowledge distillation, a distilled set saves storage and data access but does not reduce training compute. For continual and federated learning, none of the papers behind this note compares against selected real images with knowledge distillation at equal memory, and none documents a production deployment. In practice, teams rely on the adjacent tools directly: knowledge distillation with cached teacher outputs, data pruning, and DP-SGD.

Terms

The problem
min⁡SℓT(θ(S))\min_{\mathcal S}\ell_{\mathcal T}(\theta(\mathcal S)): the real-data loss of a network trained on the distilled set.
Unrolled
Backpropagate the real-data loss through a short training run (Wang et al.); cost linear in steps, historical.
Kernel
KIP, FRePo: closed-form inner loop, ∥yT−KTS(KSS+λI)−1yS∥2\|y_{\mathcal T}-K_{\mathcal T\mathcal S}(K_{\mathcal S\mathcal S}+\lambda I)^{-1}y_{\mathcal S}\|^2; costly kernel, weaker on narrow networks on CIFAR-10.
Matching training
Gradient and trajectory matching: wins with one-hot labels on small datasets at 1 to 50 images per class.
Matching distributions
Mean random features (distribution matching); local pull and push in a pretrained space (drifting).
Pretrained classifier
Inversion from noise (SRe2L) fails with one-hot labels; selected real patches (RDED) hold up.
Labels
With a teacher's soft labels, random real images match nearly every distilled ImageNet set.
Baselines
Random real images and a good coreset, same labels and recipe; one-hot labels test the images.
Large budgets
Above about 200 images per class on CIFAR-10, every synthesis method tested is at random selection's level.

Sources

Connected notes

  • Under μ\muP the optimal learning rate, initialization scale and multipliers are nearly stable in width, so they can be tuned on a small proxy and copied, and a 40M proxy beat the published 6.7B GPT-3 at a tuning cost of 7% of its pretraining cost.

  • Kaplan et al. trained every model on one fixed-length schedule and read compute-optimal points off intermediate steps, and many of their runs are under 100M parameters while the frontier bends, so slopes fitted on small models overpredict model size at large budgets. At 102110^{21} FLOPs the 2.80B model chosen by Chinchilla's fit beats the 4.74B model chosen by Kaplan's law.

  • Kimi Team fit compute power laws across five scales from 194M to 528M activated parameters under baseline-tuned hyperparameters to express Block AttnRes's 0.022 validation loss gap as a 1.25x compute multiplier, then confirm the gain persists far past the ladder at 48B parameters.

  • Power laws for batch size and peak step fitted on up to 100 million vectors on one dataset predict near-optimal settings without sweeps when extended to 10 billion vectors.

Threads