Sam Babichenko

Reading notes / Dataset distillation

Soft labels in dataset distillation

Dey et al., 2026; Qin et al., 2024

Training
θ\thetastudent weights
S\mathcal Sthe training set: distilled, selected or random images
x,x, yyan image and its class
CCnumber of classes
zzthe student's logits
τ\tausoftmax temperature, 20 in Dey et al. and SRe2L
pθ(⋅∣x)p_\theta(\cdot\mid x)student's class probabilities, softmax of z/τz/\tau
pteach(⋅∣x)p_{\rm teach}(\cdot\mid x)teacher's class probabilities at the same temperature
AAa random augmentation
qqthe training target; sets the label regime
eye_yone-hot vector of class yy
ℓ(θ)\ell(\theta)training loss, mean KL from qq to the student
Paper symbols
HL, SL, SL+KDDey et al.'s names for q=eyq=e_y, q=pteach(⋅∣x)q=p_{\rm teach}(\cdot\mid x) and q=pteach(⋅∣A(x))q=p_{\rm teach}(\cdot\mid A(x))
IPCimages per class
Dsyn={(x~i,y~i)}\mathcal D_{\rm syn}=\{(\tilde x_i,\tilde y_i)\}what Qin et al. write for the distilled images and their labels
SLI, SLCCui et al.'s soft labels stored per image and per class

Context. At ImageNet scale, most learning a few synthetic training images per class that train a network nearly as well as the full real training set. Reading note: Dataset distillation methods no longer train the student on their images alone. squeeze, recover and relabel (Yin et al., 2023): train a classifier on the real data, synthesize images from noise that it assigns to the target class while matching its BatchNorm statistics, then train the student on its softened predictions for random crops of those images synthesized images through a pretrained classifier and then relabeled them with that same classifier. For each of 300 training epochs, it stored the classifier's softened prediction on the exact random crop the student would see. Most later ImageNet methods adopted this protocol. Because the student learns from both the images and the teacher's per-crop predictions, test accuracy does not separate the two. a subset of the real training images chosen by a rule, for example by how hard a briefly trained network finds each image, to stand in for the whole set selection, meanwhile, evaluates with one-hot labels, which puts the two literatures on different scales. Dey et al. (2026) disentangle image quality, set size, label regime, and compute on ImageNet-1k, comparing every run against full-data training at matched compute. Qin et al. (2024) isolate the labels directly by holding the images fixed as random real ones.

Dey et al. show that once a student trains on a teacher's per-crop predictions, the choice of images stops mattering above about 10 images per class. On ImageNet-1k, real subsets of 50 to 700 images per class, random or selected by difficulty, train a ResNet-18 close to full-data accuracy at the same compute. At 50 and 100 images per class, every real subset lands within about 5 points of compute-matched full data. At 100 per class, one random subset and seven coresets span 34 points with one-hot labels, but only 1.3 points with per-crop teacher labels. Even with one fixed teacher label per image, random real images beat all five ImageNet distillation methods tested. With one-hot labels, image choice shows at every budget, and among those five distillation methods only (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 beats random images across budgets. Yet RDED does not clearly beat the best coreset. It is level at 50 per class, behind at 100, and at 10 leads the seven main-table coresets while trailing one added in the appendix. Qin et al. trace the gain from soft labels to the teacher's largest wrong-class probabilities, which turns soft-labeled training into knowledge distillation. Stored for every crop, those labels take 38 times the storage of the images (Cui et al., 2026). Dey et al. therefore recommend dropping per-crop labels from distillation evaluation. Their own test uses one-hot labels, full-data training at matched compute as the reference, and the best real subset of each size as the baseline, matching training on a chosen subset of the real examples in place of the whole set. Reading note: Choosing pretraining data.

Setting. A student network with weights θ\theta trains from scratch on a set S\mathcal S of images xx with class labels yy among CC classes. Evaluation uses the real validation set. Dividing the student's logits zz by a a number that divides the logits before the softmax; τ>1\tau\gt1 flattens the distribution and raises the small probabilities. Dey et al., like SRe2L, use τ=20\tau=20 with soft targets; with hard labels τ=1\tau=1 and the loss is the plain cross-entropy and applying softmax gives its predicted class probabilities the student's predicted probabilities of the CC classes for image xx, the softmax of z/τz/\tau. A teacher trained on the full dataset produces the teacher's predicted probabilities of the CC classes for image xx, softened by the same temperature τ\tau at the same temperature. Let AA be a random augmentation, a resized crop and flip. Training minimizes the mean KL divergence from a target distribution qq to the student's prediction on A(x)A(x):ℓ(θ)=Ex∈S, A KL(q ∥ pθ(⋅∣A(x))).\ell(\theta)=\mathbb E_{x\in\mathcal S,\,A}\,\mathrm{KL}\big(q\,\|\,p_\theta(\cdot\mid A(x))\big).The choice of qq defines three label regimes. HL in Dey et al.: q=eyq=e_y, the one-hot vector of the image's class; the loss is then the cross-entropy set q=eyq=e_y, the one-hot vector of class yy. SL in Dey et al.: q=pteach(⋅∣x)q=p_{\rm teach}(\cdot\mid x), one teacher prediction per image, computed once and reused for every crop set q=pteach(⋅∣x)q=p_{\rm teach}(\cdot\mid x) once per image. SL+KD in Dey et al.: q=pteach(⋅∣A(x))q=p_{\rm teach}(\cdot\mid A(x)), the teacher's prediction on each augmented and mixed crop; SRe2L precomputes and stores one per image per epoch set q=pteach(⋅∣A(x))q=p_{\rm teach}(\cdot\mid A(x)) on each crop the student sees, typically after an augmentation that pastes a rectangle cut from one training image into another; with soft labels the teacher labels the mixed image.

The gradient with respect to the student's logits explains why the label regime matters so much:∇z KL(q ∥ pθ)=1τ (pθ−q).\nabla_z\,\mathrm{KL}\big(q\,\|\,p_\theta\big)=\tfrac1\tau\,(p_\theta-q).The update pulls each class's predicted probability toward its entry in qq. A one-hot target pulls every wrong class toward zero identically. A soft target gives each wrong class its own probability, passing along the teacher's Hinton et al.'s (2015) term for the small probabilities a trained network gives the wrong classes, which say which classes it finds similar to the input about which classes resemble the input. Once the teacher supplies a fresh vector for every crop at every step, training becomes training a student network to match a teacher network's softened predictions on each input (Hinton et al., 2015), and S\mathcal S serves only as a small transfer set. Budgets are counted in IPC in the papers; 10 per class of ImageNet-1k is 10,000 images, under 1% of its 1.28 million training images, and compute in total images processed by the student.

Per-crop soft labels erase image choice. On ImageNet-1k, Dey et al. hold the student as ResNet-18 and keep each regime's recipe fixed while sweeping three axes. They vary set size from 10 to 700 images per class and compute equivalent to 2 to 50 full-dataset epochs. To vary image difficulty, they rank a larger random pool by a difficulty score (Paul et al., 2021): the size of a briefly trained network's prediction error on an example, ∥p−ey∥2\|p-e_y\|_2 with pp its predicted probabilities; large for hard or mislabeled examples and keep from 100% down to the easiest or hardest 20%. Every subset run is judged against full-data training at the same compute. With hard labels, accuracy climbs only when size, quality, and compute rise together. As in data pruning, the best subset shifts from easy toward harder examples as the budget grows. With per-crop soft labels, every size and difficulty curve above 10 images per class collapses onto the compute-matched full-data curve. In the 200-epoch table at 100 images per class, roughly 16 passes over ImageNet-1k (computed here), all eight real subsets land between 62.05% and 63.32%. Random images reach 62.87%, against 65.91% for full data at the same compute. Under hard labels, those same eight subsets span 12.75% to 47.18%. That near-full-data score is relative to 16 passes, well below a converged ResNet-18 at roughly 70%. At 10 images per class, image choice still matters under per-crop labels, with random images at 28.82% against 35.58% for the best coreset. The same flattening appears with a MobileNet-V2 teacher and a weaker ResNet-18 teacher, reported as curves only.

Fixed soft labels compress differences too. A single fixed teacher label per image falls between the hard and per-crop regimes. Size and compute still matter, yet above 10 images per class easy EL2N subsets and random subsets converge. At 100 per class, the eight real subsets span only 4.4 points, from 51.70% to 56.05%. Under fixed soft labels, random real images beat every tested distillation method at 10, 50, and 100 images per class. At 50 per class, random images reach 48.49% against 44.33% for (Su et al., 2024) clusters the latent codes of each class's real images and turns the cluster centers into images with a pretrained latent diffusion model, the best synthetic set. Dey et al. link this flattening to a soft-target EL2N score, defined as the distance between student and teacher predictions divided by τ\tau. Hard-label EL2N scores spread widely during training, whereas fixed soft-label scores cluster tightly, so examples contribute almost equally. Small-dataset distillation behaves the same way. On TinyImageNet with a four-layer ConvNet at 10 images per class, (Guo et al., 2024) trajectory matching restricted to a band of expert checkpoints, with soft labels learned along with the images. Reading note: Matching training trajectories beats a coreset rule: embed the real images with a network trained on them and pick images one at a time, each as far as possible from those already picked by 8 points with hard labels, 19.26% against 11.38%. Under shared teacher labels, that gap shrinks to 1.3 points, 28.43% against 27.11%, and at 50 per class the two tie. In those teacher-label comparisons, Dey et al. replace DATM's learned labels with the teacher's so only the images differ.

Hard labels separate the image sets. Under one-hot labels, image quality governs accuracy, and most distillation methods lose to random real images. Dey et al. test five ImageNet distillation methods: SRe2L, its weight-perturbation refinement (Du et al., 2024) SRe2L with directed perturbations of the teacher's weights during synthesis, for more varied images, D4M, (Gu et al., 2024) fine-tunes a diffusion transformer on groups of classes with two extra terms, one pulling samples toward representative real images and one pushing them away from each other, and RDED. They compare them against random subsets and seven data-pruning coresets spanning active-learning, submodular, forgetting-count, and difficulty criteria, including (He et al., 2024) keeps the examples whose predicted probability of the true class varies most over training and the band of EL2N difficulty that works best at each budget, found by trying windows of the ranking (Lee and Chung, 2024). SRe2L scores 2.82% at 10 images per class against 5.10% for random images, and 14.89% at 100 against 40.89%. The two diffusion methods beat random images only at 10 per class. Only RDED beats random images at all three budgets. Against the seven main-table coresets, RDED leads at 10 per class, scoring 14.34% against Dyn-Unc's 12.15%, and ties EL2N-Best at 50. At 100 per class it falls behind EL2N-Best, 44.36% against 47.18%. An eighth coreset added in the appendix, (Cho et al., 2025) a pruning score that combines an example's difficulty with the uncertainty of its prediction, computed early in training instead of over a full run, still tops RDED at 10 per class with 15.65%.

Why RDED stalls at larger budgets, and CA2D. Dey et al. trace RDED's slide at larger budgets to its crop selection score. Ranking patches by teacher confidence picks easy views, whereas larger budgets reward harder examples. Their method, CA2D, cuts RDED-style patches from source images matched to the student's compute budget via their a difficulty score: the spread of an example's EL2N over a few consecutive epochs near the end of a full-data run as long as the student's compute, averaged over a short window score. CA2D reaches 15.25%, 41.72%, and 46.32% at 10, 50, and 100 images per class. At 50 per class, that beats every coreset in the paper, where the best whole-image subset is CAD-Prune at 40.21%. At 10 per class it still trails DUAL at 15.65%. At 100 per class it trails both CAD-Prune at 47.40% and EL2N-Best at 47.76% in its own table. The paper's claim that CA2D beats the best coreset across budgets therefore holds at 50 only.

Early-stopped experts on random images (Qin et al., 2024). Holding the images fixed as random real ones isolates what the soft labels contribute. Qin et al. label each random image once with a checkpoint from a network trained on the full dataset, matching the checkpoint's epoch to the image budget. They then train the student to convergence across five seeds, tuning only the learning rate. On ImageNet-1k with ResNet-18, these single labels reach 23.9% at 10 images per class and 47.9% at 50. Both scores edge past SRe2L's published results, which rely on synthesized images and 300 stored labels per image. Qin et al. use at most a three-hundredth of that label storage. Small budgets favor early experts. For 10 images per class, the best labeler had 35.8% test accuracy, roughly half the 69.8% of the converged network; for 50 per class, it rose to 60.9%. Later checkpoints give sharper, near-one-hot targets. On TinyImageNet, raising the softmax temperature helps later checkpoints, yet the early checkpoint still wins. Early labels therefore carry useful structure beyond mere flatness.

What the soft labels actually teach. Four TinyImageNet experiments probe how soft labels work. First, swapping one of a label's largest probabilities with its smallest hurts accuracy, whereas swapping a tail probability barely changes it. The student learns from the few classes the teacher treats as similar, which cluster along the a lexical database that arranges English nouns in a hierarchy of more general terms; the ImageNet class names are WordNet nouns hierarchy. Second, deleting every image of a class while keeping its probability in other images' labels costs little accuracy on that class. Keeping its images while zeroing its probability elsewhere drops accuracy on that class to 0% at one image per class. Third, averaging ten experts' logits lifts accuracy at 10 images per class from 27.2% to 30.1%. A curve fit on TinyImageNet values expert labels at roughly a sixfold multiplier in image count. Fourth, learning soft labels directly on frozen random TinyImageNet images by backpropagating the real-data loss through training produces labels closest to an early-stopped expert. At one image per class, they match epoch 13 against a best stopping epoch of 11. On CIFAR-10 and CIFAR-100, trajectory matching and a bilevel method still beat this random-image baseline up to 50 images per class. On TinyImageNet, the baseline overtakes them at 10.

Storage cost and local semantic drift (Cui et al., 2026). Per-crop labels take more disk space than the images themselves. Storing fewer crops per image cuts storage, yet each stored crop and label is then reused across many steps. A partial crop of an object can also carry another class's label, an error Cui et al. call Cui et al.'s name for the error of labeling an image by only ss stored crops: with p^s\hat p_s the average of the stored crop labels, E∥p^s−ey∥2=∥pˉ−ey∥2+tr⁡Σ/s\mathbb E\|\hat p_s-e_y\|^2=\|\bar p-e_y\|^2+\operatorname{tr}\Sigma/s, where pˉ\bar p and Σ\Sigma are the mean and covariance of the teacher's label over all crops; the second term, and the chance that a wrong class outranks the true one, fall as ss grows. With label storage fixed at 190 MB and ResNet-18 trained for 300 epochs under an identical recipe, 50 random images per class with two stored labels each reach 26.9%. Ten random images per class with ten labels each beat them at 29.9%. Cui et al.'s fix, hard labels for alleviating local semantic drift (Cui et al., 2026): train on the stored soft labels, then on label-smoothed hard labels with fresh crops and CutMix, then on the soft labels again, inserts a stage of label-smoothed hard labels on fresh crops between two soft-label stages. That lifts the 50-per-class random set to 44.7%. At 10 per class and 190 MB, random real images with soft labels alone reach 29.9%, ahead of all four distillation methods in Cui et al.'s main comparison at 19.9% to 27.9%. Once HALD is applied to both, the best distillation method, (Cui et al., 2025) optimizes images that start from RDED's patches through a pretrained model, mixing the original patches back in at intervals, pulls ahead at 35.6% against 34.4%. Both comparisons are made here across their Tables 2 and 16.

Consequences. When a teacher is available and the budget exceeds roughly 10 images per class, random real images with per-crop teacher labels land within about a point of any distilled or selected set. At 100 images per class, they reach 62.87%, within about 3 points of compute-matched full-data training at 65.91%. That setup cuts dataset size and data access rather than training compute. Stored labels also dominate disk space unless the teacher runs online during training. Dey et al. note a model-stealing implication as well: repeated teacher queries on a small set of inputs nearly match a full-data student at the same compute. On Dey et al.'s hard-label test, the patch-selection methods RDED and CA2D are roughly level with good coresets. The synthesis methods tested fall below random real images from 50 images per class onward.

Limits of the evidence. Dey et al. compare label regimes with a single student architecture on ImageNet-1k, leave the main table's teacher unnamed, and report spreads without stating run counts. They also tune the hard-label recipe around a library and benchmark of coreset selection methods (Guo et al., 2022) while taking the soft-label recipe from (Shao et al., 2024) a study of the design choices in large-scale dataset distillation that tuned the student's training recipe for soft-label evaluation. Qin et al.'s mechanism experiments use small ConvNet experts on TinyImageNet, and the sixfold multiplier is a fit to that dataset alone. All results across these papers are restricted to image classification.

Terms

Label regimes
q=eyq=e_y (hard), q=pteach(⋅∣x)q=p_{\rm teach}(\cdot\mid x) (fixed soft), q=pteach(⋅∣A(x))q=p_{\rm teach}(\cdot\mid A(x)) (per crop, knowledge distillation).
Soft-label gradient
∇zKL(q∥pθ)=(pθ−q)/τ\nabla_z\mathrm{KL}(q\|p_\theta)=(p_\theta-q)/\tau: every class's probability is pulled toward the teacher's value for it.
Per-crop labels
Above about 10 images per class, image choice barely matters; accuracy follows the training compute (Dey et al.).
Spread at 100 per class
Eight real subsets: 34 points with hard labels, 4.4 with fixed soft labels, 1.3 with per-crop labels.
Hard-label test
Synthesis methods fall below random from 50 per class; RDED beats random and is roughly level with the best coreset; CA2D leads every coreset only at 50 per class.
Early experts
Few images learn best from an early checkpoint's labels: 35.8% test accuracy for 10 ImageNet images per class.
Structure
Swapping the largest probabilities hurts, swapping the tail does not; similar classes carry the information.
Storage
Per-crop labels take 38 times the image storage; fewer stored crops bring local semantic drift (Cui et al.).
Fair baseline
Hard labels, matched compute, the best coreset of the same size.

Sources

Connected notes

  • With effects θi\theta_i spread around a common mean, the posterior mean pulls each raw estimate toward that mean, and Lindley's version of James-Stein estimates both the mean and the amount of pulling from the spread of the estimates themselves. It beats the raw estimates in total squared error for every configuration of the θi\theta_i once there are four or more, and in Efron's batting example it cuts the total prediction error to 0.28 of that of the raw batting averages.

  • By the note's rough estimate the difference between two average pass@1 scores, over about 120 problems with 16 samples each, has a standard deviation of at most about 0.016 before any training-seed variation, so gaps of 0.01 to 0.02 between eviction methods are not resolved.

  • To name the better of two Gaussian arms with error at most δ\delta, sample arm 1 on the fraction σ1/(σ1+σ2)\sigma_1/(\sigma_1+\sigma_2) of rounds, which minimizes the variance of the difference of means, and stop once that difference exceeds 2β(t,δ)\sqrt{2\beta(t,\delta)} standard deviations; equal sampling costs up to twice as many samples, and with equal variances the rule is Robbins' sequential test.

  • ColBERTv2 beats single-vector models in its main table, yet no controlled experiment trains both architectures under the same cross-encoder distillation recipe to separate architecture from supervision.

Threads