Research Article
From Spatial to Spectral Domain, a New Perspective for Detecting Adversarial Examples
Algorithm 1
HLFD adversarial detection algorithm
| Input: | | Original samples, | | Adversarial samples | | The number of samples | | Selected high-level representation layer | | Model trained by | | Output: | | Detector | 1 | For in do | 2 | # the th feature map | 3 | XL | 4 | XadvL | 5 | XLH getHighFrequencyComponent(XL) | 6 | XadvLH getHighFrequencyComponent(XL) | 7 | XLH_list.append(XLH.flatten()) | 8 | XadvLH_list.append(XadvLH.flatten()) | 9 | End | 10 | Trained with XLH_list, XadvLH_list | 11 | Return |
|