BayesAT: Bayes-Guided Progressive Distillation for Semi-Supervised Adversarial Training

Yimo Guo, Lilin Zhang, Li Penglin, Jinhui Hao, Xianggen LiuNeurIPS 2026

TL;DR

Training neural networks to resist adversarial attacks usually requires mountains of labeled data, or a "teacher" model to label unlabeled data on the fly. However, most existing methods rely on rigid, unchanging guidance from the teacher, which eventually bottlenecks the student model. BayesAT solves this by dynamically "warming up" the teacher's labels—starting with sharp, confident answers to build basic intuition, and gradually transitioning to softer, nuanced probabilities—pushing both clean accuracy and adversarial robustness to new heights.

What Problem Does This Paper Address?

Deep neural networks are notoriously fragile; tiny, imperceptible pixel tweaks (adversarial perturbations) can completely fool them. The gold-standard defense is Adversarial Training (AT)—feeding the model attacked images during training so it learns to resist them. Unfortunately, AT is data-hungry, and human labels are expensive.

Enter Semi-Supervised Adversarial Training (SSAT), which pairs a small labeled dataset with a massive unlabeled one. Typically, a "teacher" model generates pseudo-labels on the unlabeled data to train a robust "student" model.

Here is the catch: existing SSAT methods use static supervision. Whether the teacher outputs hard one-hot labels (e.g., "100% cat") or softened probability distributions at a fixed "temperature" (a parameter controlling how spread out probabilities are), the style of teaching never changes. As the teacher trains, its accuracy plateaus and its predictions become overly confident and hypersensitive to noise. Meanwhile, the student's needs evolve: early on, it needs crisp, clear rules to draw basic decision boundaries; later, it needs nuanced, smoother signals to understand how classes relate without overfitting to the teacher's noisy overconfidence. Static teaching creates a supply-demand mismatch, trapping models beneath a performance ceiling.

Figure 1: (a) Robust accuracy and output smoothness of the teacher model during training. After sufficient training, the teacher enters a plateau and produces increasingly over-confident predictions. (b) Performance comparison on CIFAR-10. Existing SSAT methods concentrate within a constrained frontier, consistent with the limitation of static supervision.

Methods

To fix this mismatch, the authors reframe SSAT mathematically as knowledge distillation from an ideal "Bayes teacher" (an oracle knowing the true underlying class probabilities) and analyze the student's generalization error through a bias–variance tradeoff.

Guided by this theory, they propose BayesAT, a two-phase framework built on top of standard architectures (specifically Mean Teacher for Phase 1, and a contrastive-learning SSAT backbone called WSCAT for Phase 2):

  1. Phase 1 (Standard): Train a reliable teacher model on labeled and unlabeled data, then freeze it.
  2. Phase 2 (Novel): Train the student against adversarial examples using two complementary, dynamic mechanisms:
  3. Low-to-High Temperature Warming: Instead of a fixed temperature ($\tau$), BayesAT linearly increases $\tau$ over training epochs (e.g., from $\tau=1$ to $\tau=4$). Low early temperatures keep bias low so the student quickly learns sharp boundaries. Higher temperatures later smooth out the teacher's probabilities, taming variance and exposing inter-class similarities.
  4. Confidence-Adaptive Sample Reweighting: Every sample's loss is weighted by the teacher's raw confidence (calculated at $\tau=1$). This down-weights ambiguous, noisy pseudo-labels so the student focuses on reliable examples first.
Figure 3: Overview of the BayesAT framework. Phase 1 (top) trains the teacher using labeled and unlabeled data via a Mean Teacher objective. Phase 2 (bottom) adversarially trains the student with temperature-adjusted soft pseudo-labels and confidence-adaptive reweighting. Together, these mechanisms progressively refine supervision to balance bias and variance for improved robust generalization.

Datasets

The authors evaluate BayesAT on three standard image classification benchmarks split into labeled/unlabeled subsets (no new datasets are introduced):

  • CIFAR-10: 4k labeled / 46k unlabeled images.
  • CIFAR-100: 10k labeled / 40k unlabeled images.
  • ImageNet-200: A 200-class subset of ImageNet (resized to $64\times64$), using 10k labeled / 240k unlabeled images.

Key Insights and Ideas

  • Flipping the Knowledge Distillation Script: In traditional knowledge distillation, practitioners often use cooling schedules (high-to-low temperature). BayesAT shows that SSAT requires the exact opposite—warming—because SSAT teachers aren't giant, well-calibrated oracles; they are plateaued models generating noisy pseudo-labels under adversarial stress.
  • Variance is a Moving Target: The authors prove that the variance of the student's generalization bound depends on a covariance term that spikes mid-training and stays elevated. Because variance grows into the dominant bottleneck later in training, supervision must become smoother over time to keep it in check.
  • Orthogonal Fixes: Temperature warming operates across time (globally smoothing distributions as epochs tick by), while confidence weighting operates across samples (filtering noise within a single batch). Combining them balances bias and variance far better than either alone.

Key Results

Evaluated against standard adversarial attacks—FGSM, PGD, CW, and AutoAttack (AA)—using WideResNet-28-10 models, BayesAT breaks past the traditional accuracy–robustness tradeoff frontier:

  • CIFAR-10: Achieves 81.36% natural accuracy and 60.95% PGD robust accuracy (and 52.58% on AutoAttack), beating the strongest baseline (WSCAT) by +4.48 percentage points on PGD while simultaneously improving clean accuracy (+1.26%).
  • CIFAR-100: Reaches 58.41% natural accuracy (+3.14% over WSCAT) and 30.41% PGD accuracy (+5.13% over WSCAT).
  • ImageNet-200: Hits 31.24% natural accuracy and 14.42% PGD accuracy (+5.18% over WSCAT).
  • Teacher Sensitivity: Remarkably, using a practical Mean Teacher in BayesAT performs nearly identically to using an oracle Ground-Truth teacher (64.27% vs. 64.34% mean accuracy across metrics on CIFAR-10).
Figure 4: Natural vs. PGD robust accu- racy on CIFAR-10 for different methods. BayesAT pushes the performance fron- tier further toward the top-right.

Limitations and Future Work

  • Two-Phase Overhead: Requiring a separately pre-trained teacher slows down the pipeline in compute-constrained environments; joint end-to-end training is a logical next step.
  • Manual Tuning: The temperature bounds ($\tau_{\min}, \tau_{\max}$) are manually chosen per dataset. Future work could estimate the bias–variance tradeoff online to adjust temperature automatically.
  • Confidently Wrong Teachers: Confidence weighting filters out uncertain teacher predictions, and temperature warming redistributes probability mass, but neither can fix a teacher whose top prediction is both confident and dead wrong.
  • Scope: Experiments focus strictly on $\ell_\infty$-norm image perturbations; extending this Bayesian perspective to other threat models and data modalities remains open.

Summary updated

Abstract

Existing semi-supervised adversarial training (SSAT) methods typically employ a teacher-student framework where a teacher model provides supervisory signals for unlabeled data. However, they rely on static supervision---either hard pseudo-labels or soft labels with fixed temperature---which maintains constant learning difficulty throughout training. This rigidity fails to accommodate the student's evolving capability, especially when the teacher's performance plateaus. To address this, we reframe SSAT as knowledge distillation from a Bayes teacher and formalize a stage-dependent bias-variance tradeoff. This analysis reveals a temperature-governed bias–variance tradeoff: low temperatures reduce bias, while higher temperatures control the variance term in the robust generalization bound. Guided by this insight, we propose BayesAT, a Bayes-guided progressive distillation framework that jointly employs a low-to-high temperature warming schedule and confidence-adaptive sample reweighting. BayesAT allows the student to first learn from sharp, high-confidence supervision to establish reliable decision boundaries, then progressively from smoother distributions that encourage exploration of inter-class relationships. Extensive experiments on CIFAR-10, CIFAR-100, and ImageNet-200 demonstrate that BayesAT consistently improves robust accuracy while maintaining natural accuracy over existing SSAT methods, highlighting the importance of dynamic, theory-driven supervision for effective knowledge transfer in semi-supervised adversarial training. Our code is available at https://github.com/Sherlockssa/BayesAT.
BibTeX
@inproceedings{guo2026bayesat,
  author = {Yimo Guo and Lilin Zhang and Li Penglin and Jinhui Hao and Xianggen Liu},
  title = {{BayesAT: Bayes-Guided Progressive Distillation for Semi-Supervised Adversarial Training}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=h1DIkm1KJC},
}
Figure