Can Dataset Distillation Produce Adversarially Robust Models?
A tiny synthetic training set can carry robustness, not just accuracy, if the model it is distilled from has a flat loss surface around real images.
By Eric Xue, Haohan Wang, and others · · About our AAAI 2025 paper
Dataset distillation shrinks a large training set into a few synthetic images per class, so that a model trained on them comes close to one trained on the full data. Methods are judged almost only on clean accuracy, which leaves a practical question open: can dataset distillation produce adversarially robust models, or does a model trained on distilled data fall to tiny, deliberate input changes? Our paper Towards Adversarially Robust Dataset Distillation by Curvature Regularization, by Eric Xue, Yijiang Li, Haoyang Liu, Peiran Wang, Yifan Shen and Haohan Wang (University of Toronto, UC San Diego and University of Illinois Urbana-Champaign), published at AAAI 2025, shows that it can, partly. Plain distilled data gave a ResNet18 4.76% accuracy on ImageNette under a PGD attack; data distilled with our method, GUARD, gave 23.87%, and clean accuracy rose too.
Key findings
- In the AAAI 2025 paper Towards Adversarially Robust Dataset Distillation by Curvature Regularization (Xue, Li, Liu, Wang, Shen and Wang), a ResNet18 trained on 10 distilled images per class of ImageNette scored 23.87% under a PGD-100 attack with GUARD, against 4.76% with the SRe2L method it builds on, while clean accuracy rose from 42.42% to 57.93%.
- With 50 distilled images per class of ImageNette, GUARD raised AutoAttack accuracy from 12.91% to 42.47% and kept clean accuracy level (80.86% vs 80.15%), according to Table 2 of the AAAI 2025 paper.
- Simply distilling from an adversarially trained model backfired: with SRe2L on ImageNette at 10 images per class, clean accuracy fell from 42.42% to 12.81%, and robust accuracy stayed near 10% (AAAI 2025 paper, Table 1).
- GUARD's curvature regularizer slowed each distillation iteration by about 4x relative to plain SRe2L on an NVIDIA A100, while embedding adversarial training slowed it by about 50x (Table 7).
Are models trained on distilled datasets robust to adversarial attacks?
Dataset distillation was introduced in 2018 with a striking demonstration: 10 synthetic MNIST images, one per class, could train a network to close to its usual accuracy. Since then the field has scaled to ImageNet, and the scoreboard has stayed the same: test accuracy of a model trained on the small set. If distilled datasets are to replace full ones for cheap training, architecture search or privacy-preserving data sharing, the models they produce also need to behave sensibly under attack.
The paper's own baseline shows the problem. A ResNet18 trained on ImageNet-1K data distilled by SRe2L (10 images per class) reached 21.30% clean accuracy but only 0.55% under a 100-step PGD attack and 0.34% under AutoAttack, at a perturbation budget of just 1/255 per pixel. On Tiny ImageNet at 50 images per class, the same baseline went from 56.42% clean to 0.27% under PGD. An independent benchmark, DD-RobustBench, likewise reports relatively low robustness for SRe2L-distilled ImageNet-1K data (see the comparison section below).
Key terms
- Dataset distillation (dataset condensation)
- Synthesizing a small set of training examples so that a model trained on them performs close to a model trained on the original, much larger dataset.
- Images per class (IPC)
- The usual measure of a distilled dataset's size: 10 IPC on ImageNet-1K means 10,000 synthetic images in total.
- Adversarial robustness
- A model's accuracy on inputs that an attacker has changed slightly, within a fixed budget ε, to cause mistakes.
- PGD and AutoAttack
- PGD (projected gradient descent) is a standard iterative white-box attack; AutoAttack is a parameter-free ensemble of four attacks widely used to evaluate defenses.
- Adversarial training
- Training on attacked versions of the training inputs, which is the standard defense but costs an inner attack loop at every step.
- Loss curvature
- How sharply the loss bends as the input moves; low curvature means the loss changes nearly linearly, so a small perturbation cannot cause a large jump in loss.
- SRe2L
- Squeeze, Recover and Relabel, a dataset distillation method that trains a model on real data, synthesizes images from it, and relabels them with soft labels; GUARD is built on top of it.
Why doesn't adversarial training work for dataset distillation?
The obvious recipe is to make the model that the distilled data is copied from robust, by training it adversarially. Most distillation methods compare against a model trained on real data, so the change is easy to make. The paper tried this with SRe2L on ImageNette, using only a weak PGD attack (ε = 1/255) during adversarial training. The result was worse on almost every count:
| ImageNette, 10 IPC | Clean | PGD-100 | AutoAttack | Square | MIM |
|---|---|---|---|---|---|
| SRe2L | 42.42 | 4.76 | 4.99 | 22.77 | 4.76 |
| SRe2L + adversarial training | 12.81 | 9.93 | 9.96 | 11.46 | 9.96 |
| GUARD | 57.93 | 23.87 | 19.69 | 44.07 | 21.80 |
Accuracy (%) of a ResNet18, from Table 1 of the paper. ImageNette has 10 classes, so 10% is chance level. Adversarial training collapsed clean accuracy to near chance and gave inconsistent robustness gains. The authors' explanation is that adversarial perturbations can change what an image shows, and that this damage is magnified when the whole dataset is squeezed into a handful of images whose distribution is already far from the original. Robust distillation, written out directly, is also a three-level optimization problem (an attack inside model training inside dataset synthesis), which is expensive to solve.
How does curvature regularization make distilled data robust?
The paper takes a geometric route instead. Using a second-order Taylor expansion of the loss, it bounds the adversarial loss of a model trained on distilled data by three terms: the ordinary loss, the size of the loss gradient, and the largest eigenvalue of the loss Hessian around real images, which measures curvature. Distillation methods already keep the first term small, and for a well-trained model near a minimum the gradient term is small too, so the bound is driven mostly by curvature. The analysis also shows that the bound for real data and for distilled data differ only by a constant that depends on how well the distilled set matches the real one.
GUARD (Geometric Regularization for Adversarially Robust Dataset) turns this into a cheap penalty. Computing Hessian eigenvalues is expensive, so it uses an approximation from earlier work on curvature regularization: move each real image a small step h along its normalized gradient direction and penalize how much the loss changes. This costs one extra forward pass per step. In the SRe2L implementation the penalty is added only to the first, “squeeze” step, where a model is trained on real data; the synthetic images and soft labels are then recovered from that flatter model as usual (h = 3 and λ = 100 in the paper's ImageNet experiments). The model trained on the final distilled set uses ordinary training, with no attacks.
The paper's appendix plots the sorted Hessian eigenvalues at real images for a model trained on standard distilled data and one trained on GUARD data; the GUARD curve is flatter, which is the intended effect.
How robust are the models trained on GUARD's distilled data?
All numbers below are top-1 accuracy (%) of a ResNet18 trained on the distilled data and evaluated on the original validation set, with attacks at ε = 1/255 (Table 2 of the paper). MTT and TESLA use the ConvNet architecture from their own papers.
| Dataset, IPC | Method | Clean | PGD-100 | AutoAttack | Square |
|---|---|---|---|---|---|
| ImageNette, 10 | GUARD | 57.93 | 23.87 | 19.69 | 44.07 |
| SRe2L | 42.42 | 4.76 | 4.99 | 22.77 | |
| MTT | 58.43 | 39.85 | 33.72 | 34.79 | |
| TESLA | 36.84 | 28.10 | 24.48 | 24.61 | |
| ImageNette, 50 | GUARD | 80.86 | 41.42 | 42.47 | 72.81 |
| SRe2L | 80.15 | 12.30 | 12.91 | 61.50 | |
| MTT | 59.69 | 41.13 | 35.46 | 36.72 | |
| TESLA | 36.21 | 28.72 | 27.21 | 25.34 | |
| ImageNette, 100 | GUARD | 83.39 | 57.50 | 64.84 | 77.68 |
| SRe2L | 85.83 | 31.65 | 17.93 | 19.18 | |
| Tiny ImageNet, 50 | GUARD | 55.61 | 15.63 | 13.84 | 36.93 |
| SRe2L | 56.42 | 0.27 | 0.16 | 15.50 | |
| ImageNet-1K, 10 | GUARD | 27.25 | 5.25 | 3.33 | 17.88 |
| SRe2L | 21.30 | 0.55 | 0.34 | 18.02 | |
| ImageNet-1K, 50 | GUARD | 39.89 | 9.77 | 7.03 | 28.39 |
| SRe2L | 46.80 | 0.59 | 0.47 | 32.40 |
Against its own baseline, GUARD raised accuracy under every white-box attack in every setting in the table. The picture against other distillation methods is more mixed: at 10 images per class on ImageNette, models trained on MTT data were more robust under PGD and AutoAttack, and at 50 images per class GUARD and MTT were close under PGD (41.42 vs 41.13) while GUARD was far ahead on clean accuracy (80.86 vs 59.69). On ImageNet-1K at 50 images per class, GUARD cost 6.9 points of clean accuracy.
Two further checks support the curvature idea specifically. Penalizing the gradient size instead of the curvature, at five different strengths, was always weaker than GUARD on ImageNette (Table 3). And adding the same regularizer to two other distillation methods on CIFAR-10, the early gradient-matching method DC and the large-scale method CDA, raised both clean and robust accuracy in most settings; for CDA at 10 images per class, PGD accuracy went from 14.60% to 24.33% and clean accuracy from 20.55% to 30.65% (Table 5).
How much does robust dataset distillation cost?
Embedding adversarial training needs an attack loop inside every distillation step. GUARD needs one extra forward pass. The paper measured the slowdown each one adds to SRe2L per iteration on ImageNette at three image sizes and two GPUs (Table 7):
| Slowdown vs SRe2L | A100, 160 px | A100, 320 px | A100, original | RTX 4090, 160 px | RTX 4090, 320 px | RTX 4090, original |
|---|---|---|---|---|---|---|
| GUARD | 4.63x | 3.96x | 4.54x | 2.37x | 3.26x | 2.81x |
| Adversarial training | 49.83x | 49.96x | 53.40x | 35.14x | 53.22x | 41.23x |
Peak GPU memory was also lower with GUARD than with embedded adversarial training in the paper's measurement (3,851 MiB vs 4,211 MiB at batch size 32, Table 4). Distillation is a one-off cost: once the robust distilled set exists, every model trained on it uses ordinary training.
How does this compare with other work on robust dataset distillation?
- Where the field started. Dataset Distillation by Tongzhou Wang, Jun-Yan Zhu, Antonio Torralba and Alexei A. Efros (arXiv 2018) compressed 60,000 MNIST training images into 10 synthetic ones with close to the original performance, for a fixed network initialization. It framed the problem that robust distillation now extends.
- The method GUARD builds on. Squeeze, Recover and Relabel (SRe2L) by Zeyuan Yin, Eric Xing and Zhiqiang Shen (NeurIPS 2023) made distillation practical at ImageNet scale, reporting 60.8% ImageNet-1K accuracy at 50 images per class with a recovery budget of 4K iterations. Its decoupled design, with a separate squeeze step, is what lets GUARD change only the model being distilled from.
- Measuring robustness of distilled data. DD-RobustBench: An Adversarial Robustness Benchmark for Dataset Distillation by Yifan Wu, Jiawei Du, Ping Liu, Yuewei Lin, Wei Xu and Wenqing Cheng (arXiv 2024) evaluated many distillation methods under PGD, AutoAttack and other attacks. It found that distilled datasets often give more robust models than the original datasets, with robustness tending to decline as images per class increase, and relatively low robustness for SRe2L on ImageNet-1K. That last point agrees with the baseline numbers in our paper. The benchmark asks how robust existing distilled data is; GUARD asks how to make it more robust.
- A second benchmark. BEARD: Benchmarking the Adversarial Robustness for Dataset Distillation by Zheng Zhou, Wenquan Feng, Shuchang Lyu, Guangliang Cheng, Xiaowei Huang and Qi Zhao (arXiv 2024) frames the evaluation as an adversarial game, with metrics such as a Robustness Ratio, across CIFAR-10/100 and Tiny ImageNet and several IPC settings, and keeps a public leaderboard. GUARD is not among the methods it evaluates, so the two cannot be compared directly from these papers.
- Adversarial training, done inside trajectory matching. Robust Dataset Distillation by Matching Adversarial Trajectories (MAT) by Wei Lai, Tianyu Ding, Dongdong Ren, Lei Wang, Jing Huo, Yang Gao and Wenbin Li (arXiv 2025) adds adversarial samples while generating the expert training trajectories that trajectory-matching distillation copies, and reports that models trained normally on its data gain robustness. This differs from the negative result in our Table 1, which used SRe2L rather than trajectory matching; the two papers do not test each other's setting, so it remains open which route works better where.
- The curvature idea itself. Robustness via curvature regularization, and vice versa (CURE) by Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, Jonathan Uesato and Pascal Frossard (CVPR 2019) showed that adversarial training mainly lowers the curvature of the loss with respect to inputs, and that penalizing curvature directly gives robustness on par with adversarial training. GUARD carries this observation over to dataset distillation, with a bound that links curvature at real images to the robustness of models trained on synthetic ones.
What this does not show
- Small attack budget. All attacks except CW use ε = 1/255, smaller than the budgets common in ImageNet robustness benchmarks. Robust accuracy also stays far below clean accuracy, especially on ImageNet-1K (5.25% under PGD at 10 images per class). This is a step toward robust distilled data, not a replacement for adversarial training on full data.
- Not the most robust method in every setting. MTT and TESLA, which use a different ConvNet architecture, were more robust than GUARD under PGD and AutoAttack at 10 images per class on ImageNette, and at 1 image per class on Tiny ImageNet (appendix Table 6).
- Clean accuracy can drop. On ImageNet-1K at 50 images per class GUARD scored 39.89% clean against 46.80% for SRe2L, and Square-attack accuracy was also lower (28.39% vs 32.40%).
- Strong theoretical assumptions. The bound assumes a convex loss and a feature map with a linear relation, and drops the gradient term; the authors note these assumptions are strong and support them empirically rather than prove they hold for deep networks.
- Limited scope. The main experiments use ResNet18 on ImageNette, Tiny ImageNet and ImageNet-1K, built on SRe2L; the transfer experiments with DC and CDA are on CIFAR-10. Other architectures, data types and threat models are not tested.
Frequently asked questions
Are models trained on distilled datasets robust to adversarial attacks?
Not reliably; it depends on the distillation method. In the AAAI 2025 paper by Xue, Li, Liu, Wang, Shen and Wang, a ResNet18 trained on SRe2L-distilled ImageNette (10 images per class) kept only 4.76% accuracy under a PGD-100 attack at epsilon 1/255, and an ImageNet-1K model kept 0.55%. Benchmarks such as DD-RobustBench find that robustness varies widely across distillation methods and dataset sizes.
Why not just add adversarial training to dataset distillation?
Because in the paper's tests it hurt more than it helped. Distilling SRe2L from an adversarially trained teacher, even with a weak 1/255 PGD attack, dropped clean ImageNette accuracy at 10 images per class from 42.42% to 12.81%, and it slowed each distillation iteration by about 50x on an A100.
What is GUARD in dataset distillation?
GUARD (Geometric Regularization for Adversarially Robust Dataset) is a method from the AAAI 2025 paper Towards Adversarially Robust Dataset Distillation by Curvature Regularization. It adds a penalty on the curvature of the loss around real images while training the teacher model that dataset distillation copies from, so the tiny synthetic dataset it produces trains more robust models with ordinary training.
How much does robust dataset distillation cost?
With GUARD, the paper reports a slowdown of about 2.4x to 4.6x per iteration relative to plain SRe2L, against about 35x to 53x for embedding adversarial training (Table 7, ImageNette on A100 and RTX 4090 GPUs). The regularizer needs only one extra forward pass per training step.
Citation
@inproceedings{xue2025guard,
title = {Towards Adversarially Robust Dataset Distillation by Curvature Regularization},
author = {Xue, Eric and Li, Yijiang and Liu, Haoyang and Wang, Peiran and Shen, Yifan and Wang, Haohan},
booktitle = {Proceedings of the AAAI Conference on Artificial Intelligence},
volume = {39},
number = {9},
pages = {9041--9049},
year = {2025},
doi = {10.1609/aaai.v39i9.32978}
}
Related from our lab
- The AAAI 2025 paper on adversarially robust dataset distillation in our publication list
- Dataset Distillation via the Wasserstein Metric (ICCV 2025), our distribution-matching approach to dataset distillation
- Can knowledge distillation transfer robustness from CLIP? Distilling a model, rather than a dataset, for out-of-distribution robustness
- Vision transformer robustness: the input changes a ViT cannot see, and how to use them for fine-tuning
- A unified view of trustworthy AI, an essay by Haohan Wang