Abstract
Knowledge distillation (KD) trains a compact student by attracting it towards a converged teacher. It is silent about which directions the teacher itself learned to suppress: repulsive and bias-aware objectives exist, but none exploits the teacher's own trajectory to identify what the student should avoid. We observe that the missing signal is already encoded in the teacher's optimization trajectory: features that an early-stage teacher emphasizes but that a converged teacher attenuates are precisely the shortcut directions worth pushing the student away from. We instantiate this observation as Anti-Shortcut Distillation (ASD), a push–pull KD framework that treats the converged teacher \(T_{\mathrm{final}}\) as a positive semantic anchor and an early-checkpoint teacher \(T_{\mathrm{early}}\) as a temporal negative reference. ASD couples two losses: a temporal contrastive loss (\(\mathcal{L}_{\mathrm{TC}}\)) that places the early-teacher feature as a same-sample negative against in-batch and memory-bank final-teacher features in an InfoNCE objective; and a shortcut suppression loss (\(\mathcal{L}_{\mathrm{SS}}\)) that penalizes student projection onto the top eigenvectors of \(\mathbb{E}[\Delta h\,\Delta h^{\top}]\), the uncentered second-moment matrix of early-to-final feature displacements. Across 13 teacher–student pairs on CIFAR-100, ImageNet-100, and TinyImageNet, ASD attains the highest clean top-1 accuracy on more than 10 pairs and outperforms standard KD on 12. On CIFAR-100-C corruption robustness, ASD obtains the lowest mean Corruption Error (86.1 mCE) on the most challenging cross-architecture pair (WRN-40-2→ShuffleNet-V2). Mechanistic diagnostics confirm the intended geometry: the ASD student is systematically anti-aligned with the shortcut direction, while its projection onto the robust subspace is substantially larger (0.45 vs. 0.12).
Method
Networks tend to pick up easy cues such as local texture, colour statistics and background early in training, and only later settle on shape-biased, semantically stable features. A converged teacher records where that process ended, but not the shortcut directions it passed through and then attenuated. ASD turns this trajectory into supervision. Two frozen snapshots of the same teacher are kept: the converged \(T_{\mathrm{final}}\) (what to imitate) and an early checkpoint \(T_{\mathrm{early}}\), taken at 15% of training (what to avoid). Only the student, plus a small projector when feature sizes differ, is trained. The projector is discarded at inference.
Temporal shortcut displacement
For each input, the change between teacher states is a label-free indicator of what convergence suppressed:
Per mini-batch, ASD forms the uncentered second moment \(\widehat{\mathbf{C}}_{\mathrm{sc}} = \tfrac{1}{|\mathcal{B}|}\sum_i \Delta h_i \Delta h_i^{\top}\) and keeps its top-\(K\) eigenvectors \(\mathbf{U}_K\) as the shortcut subspace. It is left uncentered because the mean displacement can itself be a dominant shortcut.
Temporal Contrastive loss \(\mathcal{L}_{\mathrm{TC}}\)
An InfoNCE objective in which the final-teacher feature is the positive and the same image's early-teacher feature is an explicit negative, alongside in-batch and memory-bank \(T_{\mathrm{final}}\) negatives:
Replacing the temporal negative with random in-batch negatives recovers a CRD-style objective; the temporal negative is what distinguishes ASD.
Shortcut Suppression loss \(\mathcal{L}_{\mathrm{SS}}\)
A batch-level geometric constraint: the normalized student feature is penalized when its projection onto the shortcut subspace exceeds a margin \(\varepsilon\):
When \(\mathcal{L}_{\mathrm{SS}}=0\), every student feature is at least \(\arccos(0.1)\approx 84.3^{\circ}\) away from the shortcut subspace.
Training objective
Both auxiliary terms are linearly warmed up, \(\beta(t)=\gamma(t)=\min(t/T_{\mathrm{warmup}},1)\), and combined with cross-entropy and standard logit distillation from \(T_{\mathrm{final}}\):
The two losses complement each other. \(\mathcal{L}_{\mathrm{TC}}\) gives a per-sample, relative push away from the early teacher, but it cannot stop the student from rediscovering shortcut directions from the data. \(\mathcal{L}_{\mathrm{SS}}\) constrains the whole subspace, but it carries no per-sample temporal signal.
Cost. ASD stores one extra frozen checkpoint and adds one \(T_{\mathrm{early}}\) forward pass per step and a per-batch eigendecomposition, roughly 15–20% more training time than standard KD. The projector is dropped, so inference cost is unchanged.
Limitations. ASD is below KD on ResNet-32×4→ResNet-8×4 (73.13 vs 73.32) and has higher mCE than KD on WRN-40-2→WRN-16-2 (94.2 vs 93.7).
Does the student follow the intended geometry?
Results
All results
Every table from the paper and the supplementary. Choose a table with the buttons. Values are mean ± std over 3 seeds unless noted; underlined = best in column.
| Teacher Student |
WRN-40-2ShuffleNet-V2 | WRN-40-2ShuffleNet-V1 | ResNet-32×4ShuffleNet-V1 | ResNet-32×4ShuffleNet-V2 | VGG-13MobileNet-V2 |
|---|---|---|---|---|---|
| Teacher | 76.49 | 76.49 | 79.72 | 79.72 | 76.15 |
| Student (CE only) | 63.26±0.27 | 71.46±0.38 | 71.46±0.38 | 63.26±0.27 | 64.12±0.31 |
| KD | 66.72±0.32 | 73.79±0.26 | 73.09±0.38 | 66.17±0.18 | 65.86±0.28 |
| FitNets | 67.07±0.15 | 74.27±0.04 | 73.20±0.50 | 66.07±0.36 | 66.18±0.22 |
| AT | 67.66±0.19 | 73.97±0.21 | 73.25±0.28 | 66.28±0.24 | 66.38±0.19 |
| DKD | 66.84±0.31 | 73.63±0.39 | 72.33±0.33 | 66.42±0.28 | 66.02±0.24 |
| CRD | 67.81±0.42 | 74.34±0.47 | 73.60±0.16 | 66.98±0.36 | 66.64±0.31 |
| CkptKD | 67.27±0.03 | 72.66±0.20 | 73.39±0.01 | 66.52±0.08 | 66.08±0.14 |
| ASD (ours) | 68.05±0.14 | 74.94±0.09 | 73.98±0.27 | 67.18±0.19 | 67.02±0.18 |
ASD is best on all five heterogeneous pairs. The largest gain over KD is on WRN-40-2→ShuffleNet-V2 (+1.33 pp). When teacher and student have different representational bases, push–pull supervision matters most.
| Teacher Student |
ResNet-34ResNet-18 | WRN-40-2WRN-16-2 | ResNet-32×4ResNet-8×4 | WRN-40-2WRN-40-1 | VGG-13VGG-8 |
|---|---|---|---|---|---|
| Teacher | 79.91 | 76.49 | 79.72 | 76.49 | 76.15 |
| Student | 78.79 | 73.33 | 71.90 | 71.49 | 71.10 |
| KD | 80.22±0.19 | 74.74±0.17 | 73.32±0.11 | 73.38±0.47 | 73.68±0.35 |
| FitNets | 80.32±0.17 | 74.94±0.24 | 73.55±0.04 | 73.54±0.18 | 73.91±0.11 |
| AT | 80.30±0.12 | 74.99±0.15 | 73.78±0.15 | 73.79±0.16 | 71.61±0.12 |
| DKD | 80.04±0.36 | 75.08±0.14 | 73.69±0.32 | 73.63±0.07 | 73.99±0.05 |
| CRD | 80.71±0.34 | 74.76±0.12 | 73.15±0.12 | 73.63±0.33 | 74.04±0.18 |
| CkptKD | 73.94±0.13 | 71.31±0.06 | 72.17±0.15 | 70.65±0.15 | 70.48±0.12 |
| ASD (ours) | 80.50±0.07 | 75.87±0.29 | 73.13±0.12 | 74.16±0.21 | 74.26±0.13 |
ASD improves over KD on 4 of 5 same-family pairs. On ResNet-34→ResNet-18, CRD is 0.21 pp higher, with almost 5× the seed standard deviation (±0.34 vs ±0.07). ResNet-32×4→ResNet-8×4 is the one pair where ASD is below KD (73.13 vs 73.32); for such aggressive compression, some low-level cues may serve as necessary scaffolding rather than shortcuts.
| Teacher → Student Dataset |
ResNet-50 → MobileNet-V2ImageNet-100 | ResNet-34 → ResNet-18TinyImageNet | ResNet-50 → ResNet-18ImageNet-100 |
|---|---|---|---|
| Teacher | 85.30 | 43.14 | 85.30 |
| Student (CE only) | 80.21±0.07 | 42.98±0.46 | 83.85±0.15 |
| KD | 82.43±0.41 | 44.36±1.23 | 84.72±0.35 |
| FitNets | 82.51±0.30 | 44.58±0.83 | 84.88±0.22 |
| AT | 82.90±0.30 | 44.42±0.91 | 84.92±0.26 |
| DKD | 82.54±0.18 | 45.44±1.11 | 84.85±0.18 |
| CRD | 83.01±0.18 | 45.02±1.08 | 85.24±0.19 |
| CkptKD | 82.70±0.30 | 44.75±1.02 | 84.80±0.28 |
| ASD (ours) | 83.24±0.13 | 46.00±1.45 | 85.48±0.15 |
The temporal shortcut signal still helps at higher resolution and with more classes: ASD is best on all three pairs. On TinyImageNet it beats CRD on 3 of 3 paired seeds (+0.62, +1.14, +1.18 pp).
Mean Corruption Error (mCE, %, lower is better) on CIFAR-100-C, all 15 corruption types at severity 5.
| Teacher Student |
ResNet-34ResNet-18 | WRN-40-2WRN-16-2 | ResNet-32×4ResNet-8×4 | WRN-40-2WRN-40-1 | VGG-13VGG-8 | WRN-40-2ShuffleNet-V2 |
|---|---|---|---|---|---|---|
| CE only | 87.0±0.3 | 95.9±0.2 | 99.6±0.4 | 93.7±0.4 | 87.0±0.3 | 88.5±0.4 |
| KD | 86.2±0.4 | 93.7±0.4 | 98.1±0.3 | 92.2±0.6 | 85.6±0.3 | 86.9±0.4 |
| FitNets | 86.0±0.4 | 93.6±0.1 | 98.0±0.3 | 92.1±0.3 | 85.5±0.2 | 86.8±0.3 |
| AT | 85.7±0.6 | 93.6±0.5 | 97.8±0.5 | 92.0±0.4 | 85.5±0.3 | 87.4±0.2 |
| DKD | 85.9±0.9 | 93.4±0.3 | 97.5±0.2 | 92.4±0.3 | 85.5±0.1 | 87.4±0.5 |
| CRD | 85.2±0.6 | 93.8±0.3 | 98.2±0.1 | 92.7±0.6 | 85.9±0.5 | 86.7±0.3 |
| CkptKD | 90.9±0.1 | 99.1±0.2 | 96.6±0.2 | 98.7±0.2 | 90.0±0.2 | 92.2±0.1 |
| ASD (ours) | 85.6±0.4 | 94.2±0.4 | 97.9±0.2 | 91.7±0.4 | 85.2±0.3 | 86.1±0.4 |
ASD has the lowest mCE on WRN-40-2→WRN-40-1, VGG-13→VGG-8 and the hardest cross-architecture pair, WRN-40-2→ShuffleNet-V2. CkptKD uses the same early checkpoint as an attractive teacher and degrades robustness on five of six pairs.
Targeted shortcut benchmarks (supplementary). The trained ImageNet-100 ResNet-50→MobileNet-V2 students are evaluated without retraining; top-1 (%).
| Method | ImageNet-R19 overlapping classes | Stylized-ImageNet-100full val set | ImageNet-A15 classes, at chance |
|---|---|---|---|
| CE only | 32.36±0.69 | 14.89±0.24 | 4.95±0.25 |
| KD | 36.32±0.81 | 18.69±0.64 | 6.08±0.73 |
| ASD (ours) | 37.50±0.76 | 19.53±0.85 | 5.39±0.49 |
ASD beats KD on ImageNet-R on all three seeds and on Stylized-ImageNet-100 by +0.84 on the mean. On ImageNet-A all methods sit near the 6.7% chance level of the 15-way overlap, so the differences there are not significant.
DeepLabv3 on ADE20K, ResNet-101 teacher, 512×512 inputs, 40k iterations. Both ASD losses are applied to the backbone feature map, with each spatial location treated as a sample.
| Teacher → Student | From scratch | KD | Af-DCD | UFD-KD | ASD (ours) | ||||
|---|---|---|---|---|---|---|---|---|---|
| T. mIoU | S. mIoU | pixAcc | mIoU | pixAcc | mIoU | mIoU | pixAcc | mIoU | |
| ResNet-101 → ResNet-18 | 42.70 | 33.91 | 76.32 | 34.88 | 77.43 | 36.21 | 36.89 | 78.92 | 38.87 |
| ResNet-101 → MobileNetV2 | 42.70 | 34.32 | 76.74 | 34.92 | 77.28 | 35.97 | 36.24 | 78.65 | 37.91 |
ASD reaches 38.87 mIoU with a ResNet-18 student (+1.98 over UFD-KD, +3.99 over from scratch) and 37.91 mIoU with MobileNetV2 (+1.67 over UFD-KD).
| Pair | Data | KD alignmentT_final / T_early | ASD alignmentT_final / T_early | Shortcut magnitude ↓ | Shape biasKD / ASD |
|---|---|---|---|---|---|
| P1 ResNet-34→ResNet-18 | CIFAR-100 | .31 / .33 | .90 / .61 | −15.8% | 47.4 / 49.0 |
| P5 VGG-13→VGG-8 | CIFAR-100 | .30 / .25 | .75 / .52 | −20.5% | 38.3 / 39.0 |
| P3 ResNet-32×4→ResNet-8×4 | CIFAR-100 | .38 / .41 | .80 / .73 | −28.3% | 33.1 / 34.1 |
| P12 ResNet-34→ResNet-18 | TinyImageNet | .42 / .37 | .52 / .34 | −17.0% | — |
Multi-pair diagnostics (supplementary, post hoc, no retraining). ASD aligns with \(T_{\mathrm{final}}\) over \(T_{\mathrm{early}}\) on every pair and reduces shortcut-subspace magnitude by 16–28%.
| P1 diagnostic | KD | ASD (ours) |
|---|---|---|
| Mean signed cosine \(\cos(h_S,\Delta h)\) | 0.003 | −0.361 |
| Samples on the shortcut-aligned side (threshold −0.1) | 89.0% | 11.7% |
| Projection onto the robust subspace (mean magnitude) | 0.12 | 0.45 |
| Stylized input: clean / stylized accuracy (degradation) | 80.2 / 48.1 (−32.11%) | 80.3 / 49.1 (−31.12%) |
For ASD, 99.9% of samples are closer to \(T_{\mathrm{final}}\) than to \(T_{\mathrm{early}}\) (binary InfoNCE bound 0.601 nats). The shortcut subspace is 65.3° from the \(T_{\mathrm{final}}\)-PCA subspace and 38.6° from the \(T_{\mathrm{early}}\)-PCA subspace.
| Teacher epoch (P1, ResNet-34) | 5 | 20 | 35 (T_early) | 90 | 150 | 210 | 240 |
|---|---|---|---|---|---|---|---|
| Shortcut-subspace energy | .178 | .160 | .253 | .153 | .160 | .129 | .128 |
| Robust-subspace energy | .111 | .112 | .129 | .121 | .117 | .104 | .106 |
Feature-energy trajectory of the P1 teacher (supplementary): shortcut energy peaks at the 15% checkpoint and declines ~49% to convergence, while robust energy stays flat.
All ablations on P1 (ResNet-34→ResNet-18, CIFAR-100). Each sweep changes one setting and keeps the rest at their defaults.
| Method (P1) | Clean Acc (%) ↑ | mCE (%) ↓ |
|---|---|---|
| KD | 80.22±0.19 | 86.2±0.4 |
| ASD w/o \(\mathcal{L}_{\mathrm{SS}}\) | 80.19±0.07 | 85.8±0.7 |
| ASD w/o \(\mathcal{L}_{\mathrm{TC}}\) | 80.15±0.19 | 85.9±0.4 |
| ASD (full) | 80.50±0.07 | 85.6±0.4 |
| \(T_{\mathrm{early}}\) epoch | % of training | Clean Acc (%) |
|---|---|---|
| 12 | 5% | 80.25 |
| 24 | 10% | 80.26 |
| 36 (default) | 15% | 80.50±0.07 |
| 48 | 20% | 80.16 |
| 72 | 30% | 80.56 |
Removing either loss lowers clean accuracy below KD; only the full model improves both accuracy and robustness. ASD is insensitive to the exact checkpoint within the early-to-middle part of training.
| Subspace dim. \(K\) | 1 | 2 | 4 (default) | 8 |
|---|---|---|---|---|
| Clean Acc (%) | 80.21 | 80.39 | 80.50 | 80.27 |
| mCE (%) ↓ | 86.0 | 85.7 | 85.6 | 85.9 |
| Margin \(\varepsilon\) | 0.05 | 0.1 (default) | 0.2 | 0.4 |
|---|---|---|---|---|
| Clean Acc (%) | 80.31 | 80.50 | 80.38 | 80.27 |
| mCE (%) ↓ | 85.7 | 85.6 | 86.0 | 86.1 |
| Memory queue \(M\) | 0 | 1024 | 4096 (default) | 16384 |
|---|---|---|---|---|
| Clean Acc (%) | 80.24 | 80.41 | 80.50 | 80.46 |
| Warm-up (epochs) | 0 | 10 | 20 (default) | 40 |
|---|---|---|---|---|
| Clean Acc (%) | 79.83 | 80.34 | 80.50 | 80.42 |
Hyperparameter sweeps from the supplementary (mean of 3 seeds).
BibTeX
@inproceedings{raza2026asd,
title = {Anti-Shortcut Distillation via Temporal Negative
Knowledge Transfer},
author = {Raza, Syed Muhammad and Tariq, Omer and Son, Jeongbae},
booktitle = {British Machine Vision Conference (BMVC)},
year = {2026}
}
