CC-Dist
Extend CC-IBP with feature distillation from an adversarially trained teacher.
The frozen teacher is evaluated on clean inputs in evaluation mode. Student features and their bounds come from the same CC-IBP graph and adversarial BatchNorm pass. Setting distillation_weight=0 gives the CC-IBP control. Other arguments and optional returns follow get_expressive_ibp_loss.
Source code in CTRAIN/train/certified/losses/cc_dist.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | |
Align adversarial and bounded student features with clean teacher features.
The loss averages the sum of the worst squared endpoint distances after mixing adversarial features and interval endpoints with weight alpha. A missing weight uses 5 divided by the feature width. Teacher features are detached, so the loss updates only the student.
Source code in CTRAIN/train/certified/losses/cc_dist.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | |