Distilling Adversarial Robustness Using Heterogeneous Teachers

Jieren Deng, Aaron Palmer, Rigel Mahmood, Ethan Rathbun, Jinbo Bi, Kaleel Mahmood, Derek Aguiar

TL;DR

DARHT (Distilling Adversarial Robustness using Heterogeneous Teachers) improves neural network security by training a "student" model using a diverse faculty of "teacher" models. By leveraging teachers with different architectures (like CNNs and Vision Transformers) that don't share the same vulnerabilities, the student achieves significantly higher robustness against adversarial attacks than models trained with traditional, uniform methods.

What Problem Does This Paper Address?

Deep neural networks are notoriously fragile when faced with adversarial examples—inputs specifically crafted to trick a model into making a wrong prediction. While "adversarial training" (training on these tricky examples) helps, it is computationally expensive. A popular alternative is adversarial distillation, where a small "student" model learns robustness from a pre-trained, robust "teacher."

However, existing distillation methods usually use a single teacher or multiple teachers with the same architecture (e.g., all ResNets). The problem is adversarial transferability: models with similar architectures often share the same "blind spots" or adversarial subspaces. If a teacher is fooled by a specific perturbation, a student learning from it will likely inherit that exact weakness. The authors set out to break this cycle by using a diverse set of teachers to provide "complementary robustness."

Methods

The authors introduce the DARHT framework, which stands out through three main components:

  1. Heterogeneous Teachers: Instead of using identical architectures, DARHT uses a mix of Convolutional Neural Networks (CNNs) and Vision Transformers (ViTs). Because these architectures process information differently, their adversarial subspaces have low intersection—meaning an attack that fools the CNN is unlikely to fool the ViT.
  2. Logit-Feature Map Distillation: Rather than just matching the final output probabilities, the student model is designed with a dedicated "student-teacher feature map." This allows the student to explicitly represent and learn from the internal logit distributions of each teacher.
  3. Dynamic Weighting: Not all teachers are equally helpful for every training sample. DARHT uses a weighting mechanism where a teacher’s influence on the distillation loss is inversely proportional to its cross-entropy loss on that specific sample. If a teacher is struggling with an example, the student listens to it less.
Figure 1: Distilling adversarial robustness using heterogeneous teachers (DARHT). Adversarial examples are generated by applying an adversarial training algorithm to the clean examples using the student model. Subsequently, DARHT selects adversarial or clean examples as input for both the student model and heterogeneous teachers. The knowledge distillation loss (LK) is calculated using the teacher logits and the student-teacher feature map. The classification loss (LC) is computed as the cross-entropy between the student logits and the labels.

Additionally, the student employs Monte Carlo Dropout during training and inference to further model uncertainty and harden the defense.

Datasets

The framework was evaluated on three standard computer vision benchmarks:

  • CIFAR-10: 10 classes of small images.
  • CIFAR-100: 100 classes of small images.
  • Tiny ImageNet: A subset of the massive ImageNet dataset, featuring 200 classes at a higher resolution than CIFAR.

Key Insights and Ideas

  • Complementary Robustness: This is the paper's central thesis. By combining teachers that fail in different ways, the student learns a more holistic and robust decision boundary. The authors proved this by showing that transferability between student and teachers is lower in heterogeneous setups compared to homogeneous ones.
  • Diversity Over Raw Accuracy: Interestingly, a teacher that is slightly less accurate but architecturally different can be more valuable for distillation than a highly accurate teacher that shares the student's architecture.
  • Logit Representation Matters: Explicitly modeling the teachers' logits in the student's architecture (as seen in Figure 2) provides a richer signal for transferring robustness than standard soft-label distillation.
Figure 2: Distilling knowledge from teacher logits to student- teacher feature map. An example (x) passed to the student (Sθ) and three teachers (T1, T2, and T3) models.

Key Results

DARHT consistently outperformed state-of-the-art (SOTA) distillation methods like RSLAD and MTARD, as well as standard adversarial training algorithms (FAT, TRADES).

  • Tiny ImageNet Gains: DARHT showed its strongest performance here, achieving a 25.75% improvement in weighted robust accuracy for Auto-PGD attacks compared to competing distillation methods.
  • W-Robust Performance: On CIFAR-100, DARHT achieved the highest "Weighted Robust Accuracy" (the average of clean and robust accuracy) across all tested white-box and black-box attacks.
  • Scalability with Teachers: Experiments showed that adding more teachers generally improves performance, especially when those teachers are architecturally diverse.
Figure 3: The performance of the student (ResNet-18) on training accuracy and W-Robust metrics under FGSM, PGD, and CW∞ attacks is evaluated with three distinct groups of teachers: Homo-ResNet, Hetero-Mix, and Homo-ViT on the CIFAR-100 dataset.

Limitations and Future Work

  • Computational Overhead: Training against multiple teachers, especially large Vision Transformers, increases the computational cost and memory requirements during the distillation phase.
  • Teacher Selection: While the paper provides guidelines (aiming for 75-90% accuracy), finding the "optimal" mix of teachers for a new dataset remains somewhat empirical.
  • Scaling to Full ImageNet: The experiments were limited to Tiny ImageNet. Testing DARHT on full-scale ImageNet would be a significant next step to prove its viability for industrial-scale applications like autonomous driving.

Summary updated

BibTeX
@misc{deng2024distilling,
  author = {Jieren Deng and Aaron Palmer and Rigel Mahmood and Ethan Rathbun and Jinbo Bi and Kaleel Mahmood and Derek Aguiar},
  title = {{Distilling Adversarial Robustness Using Heterogeneous Teachers}},
  year = {2024},
  eprint = {2402.15586},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2402.15586},
}
Figure