Abstract
Convolutional Neural Networks (CNNs) are well-known for their vulnerability to adversarial attacks, posing significant security concerns. In response to these threats, various defense methods have emerged to bolster the model's robustness. However, most existing methods either focus on learning from adversarial perturbations, leading to overfitting to the adversarial examples, or aim to eliminate such perturbations during inference, inevitably increasing computational burdens. Conversely, clean training, which strengthens the model's robustness by relying solely on clean examples, can address the aforementioned issues. In this paper, we align with this methodological stream and enhance its generalizability to unknown adversarial examples. This enhancement is achieved by scrutinizing the behavior of latent features within the network. Recognizing that a correct prediction relies on the correctness of the latent feature's pattern, we introduce a novel and effective Feature Pattern Consistency Constraint (FPCC) method to reinforce the latent feature's capacity to maintain the correct feature pattern. Specifically, we propose Spatial-wise Feature Modification and Channel-wise Feature Selection to enhance latent features. Subsequently, we employ the Pattern Consistency Loss to constrain the similarity between the feature pattern of the latent features and the correct feature pattern. Our experiments demonstrate that the FPCC method empowers latent features to uphold correct feature patterns even in the face of adversarial examples, resulting in inherent adversarial robustness surpassing state-of-the-art models.
Introduction
Convolutional Neural Networks (CNNs) are easily misled by adversarial examples—tiny, invisible perturbations that flip a model's prediction. Traditionally, researchers have defended models in two ways: Adversarial Training (AT), which trains the model on actual adversarial examples but is slow and prone to overfitting, and Adversarial Purification, which uses secondary models to "clean" images but adds massive computational overhead during inference.
This paper explores a more efficient alternative: building robust models using only clean data. While existing "clean training" methods attempt to increase feature-space margins, these margins often collapse under real-world adversarial noise. The authors propose the Feature Pattern Consistency Constraint (FPCC) to address this by ensuring internal feature patterns remain stable regardless of input perturbations.
Methodology
The core premise of FPCC is that a correct prediction depends on a consistent Feature Pattern, defined as the relative magnitude of dimensions in a latent feature vector (calculated via z-score normalization). If the structural "shape" of the features remains consistent, the prediction remains correct.
The FPCC framework consists of three primary components:
- Spatial-wise Feature Modification (SFM): Random noise is added to the input during training to simulate the "interference" caused by an attack. Unlike AT, this noise is random and computationally inexpensive.
- Channel-wise Feature Selection (CFS): The model randomly drops a subset of features to simulate the loss of critical information that often occurs during an adversarial attack.
- Pattern-based Robustness Optimization (PRO): A novel loss function, the Pattern Consistency Loss ($\mathcal{L}_{PT}$), treats the ideal feature pattern for each class as a learnable parameter. The model is penalized if features from noisy or partial inputs deviate from this "correct" pattern.
Importantly, these constraints are only applied during training. The resulting model is a standard CNN with no additional inference latency.
Experimental Results
The authors evaluated FPCC on CIFAR-10 and CIFAR-100 using WRN-28-10, ResNet-50, and VGG-16 architectures. FPCC consistently outperformed both standard adversarial training and other state-of-the-art (SOTA) clean-training methods.
Key performance highlights include:
- Higher Clean Accuracy: On CIFAR-10 (WRN-28-10), FPCC achieved 88.64% clean accuracy, surpassing standard PGDAT (87.24%).
- Superior Robustness: Against PGD ($\ell_\infty$) attacks, FPCC reached 65.58% accuracy, significantly higher than other clean-training methods like SCORE (63.75%) or MARGIN (62.34%).
- Significant Gains on CIFAR-100: Using ResNet-50, FPCC improved robust accuracy against AutoPGD ($\ell_2$) by 28.94% compared to the previous clean-training SOTA, PROC.
Analysis and Insights
- Patterns over Values: Normalizing features allows the model to focus on structural relationships rather than absolute activation scales, which are more susceptible to noise.
- Simulating Attack Effects: By using random noise and feature dropping, FPCC mimics the consequences of an attack (noise injection and information loss) without the high cost of generating adversarial examples.
- Deep Layer Importance: Constraints applied to deeper layers were found to be significantly more effective than those applied to shallow layers.
- Intrinsic Robustness: Sanity checks on gradient norms confirmed that FPCC's robustness is intrinsic and not a result of gradient obfuscation.
Conclusion
FPCC demonstrates that state-of-the-art adversarial robustness can be achieved through clean training by enforcing feature pattern consistency. While a small gap remains between clean-training and the most expensive adversarial training techniques in high-noise scenarios, FPCC offers a highly efficient and effective alternative. Future work will explore the theoretical foundations of these pattern constraints and their application beyond image classification.
Summary updated