Abstract
Adversarial training is an approach of increasing the robustness of models to adversarial attacks by including adversarial examples in the training set. One major challenge of producing adversarial examples is the "semantic flip," where perturbations intended to be imperceptible actually change the underlying class of the image from a human (oracle) perspective. This paper introduces Calibrated Adversarial Training (CAT), which utilizes a learned pixel-level mask to calibrate perturbations, ensuring they remain semantically consistent while still challenging the model's robustness.
Introduction: The Semantic Flip Problem
Deep Neural Networks (DNNs) are highly susceptible to adversarial attacks—small, often invisible perturbations that cause misclassification. While Adversarial Training (AT) is the primary defense, it frequently suffers from a significant "robustness-accuracy trade-off." As the perturbation strength ($\epsilon$) increases, natural accuracy typically declines.
The authors posit that this decline is driven by the "semantic flip." Standard AT assumes that any image within an $\epsilon$-radius of a clean sample $x$ should share its label. However, as shown in Figure 1, the model's decision boundary may diverge from the "oracle" (human) decision boundary. If a perturbation pushes a sample across the oracle boundary (e.g., turning a '7' into a '1'), forcing the model to retain the original label introduces contradictory noise into the training process, damaging natural accuracy.
Calibrated Adversarial Training (CAT)
To mitigate semantic damage, the authors propose Calibrated Adversarial Training (CAT). The core innovation is a pixel-level calibration mechanism that "dials back" perturbations that might cross the oracle boundary.
The Calibration Mechanism
CAT follows a two-step generation process for adversarial examples:
- Initial Attack: A standard adversarial perturbation $\delta$ is generated using Projected Gradient Descent (PGD).
- Mask-Based Calibration: An auxiliary neural network $g_\phi$ predicts a soft, pixel-wise mask $M \in [0, 1]^d$. The final calibrated example is defined as $X_{cali} = X + M \odot \delta$.
This mask allows the model to selectively ignore perturbations on pixels critical to semantic identity (the "foreground") while maintaining them on less critical areas (the "background").
Objective Function
The training objective incorporates a weighted cross-entropy loss for natural images and a KL divergence term. The KL divergence encourages the model's prediction on the calibrated adversarial example to remain consistent with its prediction on the clean image, effectively smoothing the decision surface without forcing incorrect labels on semantically flipped samples.
Experimental Evaluation
The researchers evaluated CAT on MNIST and CIFAR-10 using PreAct ResNet-18 and WideResNet-34-10 architectures.
Key Results
CAT consistently outperformed state-of-the-art baselines like TRADES, MART, and FAT:
- MNIST: CAT achieved a natural accuracy of 99.2% and a robust accuracy (PGD-100) of 95.8%, significantly higher than the 92.3% robust accuracy of standard AT.
- CIFAR-10: Using WideResNet, CAT reached 86.4% natural accuracy and 58.7% robust accuracy, providing a superior trade-off compared to TRADES (84.9% natural / 55.1% robust).
Visualizing the Mask
Analysis of the learned mask $M$ confirmed the "semantic" intuition. On MNIST, the mask values were low on the digits themselves and high on the background, indicating that the model learned to protect the foreground strokes from excessive perturbation to avoid changing the digit's identity.
Conclusion and Future Work
Calibrated Adversarial Training offers a promising path toward resolving the robustness-accuracy trade-off by explicitly accounting for the oracle decision boundary. By learning to calibrate perturbations at the pixel level, CAT prevents the injection of semantically misleading data during training. While the auxiliary mask network adds some computational overhead, the gains in both natural and robust accuracy are substantial. Future work will focus on scaling this approach to high-resolution datasets like ImageNet and refining the auxiliary network's ability to approximate human semantic perception.
Summary updated