Abstract
There has been an ongoing cycle where stronger defenses against adversarial attacks are subsequently broken by a more advanced defense-aware attack. We present a new approach towards ending this cycle where we "deflect'' adversarial attacks by causing the attacker to produce an input that semantically resembles the attack's target class. To this end, we first propose a stronger defense based on Capsule Networks that combines three detection mechanisms to achieve state-of-the-art detection performance on both standard and defense-aware attacks. We then show that undetected attacks against our defense often perceptually resemble the adversarial target class by performing a human study where participants are asked to label images produced by the attack. These attack images can no longer be called "adversarial'' because our network classifies them the same way as humans do.
Introduction: The Adversarial Arms Race
For years, machine learning security has been locked in a "cat-and-mouse" game. Researchers develop a defense to stop adversarial attacks—small, often invisible perturbations that fool a model—and attackers immediately find a "defense-aware" way to bypass it. Most existing defenses fall into two categories:
- Defend: Attempting to correct the classification so the model sees the original class.
- Detect: Flagging the input as "fake" or "adversarial."
The fundamental flaw in these approaches is that clever attackers can often find a way to bypass these checks while keeping the image looking like the original class to a human. This paper introduces Deflection, a strategy that breaks this cycle by forcing the attacker to transform the input so significantly that it actually resembles the target class to a human observer.
As shown in the figure above, if an attacker wants to fool the model into seeing an "8" instead of a "0," the model's architecture forces the attacker to actually make the image look like an "8." If a human also perceives the image as an "8," the attack is no longer "adversarial" in the traditional sense—it has simply become a different image.
Methodology: Capsule Networks and Cycle-Consistency
The authors leverage Capsule Networks (CapsNets), which differ from standard Convolutional Neural Networks (CNNs) by representing entities through "capsules" that encode both the existence and the pose (position, size, orientation) of features.
Architecture and Reconstruction
The core of the approach involves a classification network coupled with a Reconstruction Network. Instead of just outputting a class label, the model attempts to reconstruct the input image based on the parameters of the "winning" capsule.
Cycle-Consistency Loss ($l_{cyc}$)
A key innovation is the Cycle-Consistency Loss. During training, the model is forced to ensure that if it reconstructs an image from a specific capsule (e.g., the "4" capsule), that reconstruction must also be classified as a "4" by the model itself. This creates a powerful prior: it is much harder for an attacker to find a perturbation that fools the classifier while simultaneously producing a clean, class-consistent reconstruction.
The Detection Trio
To catch attackers who attempt to bypass the reconstruction constraints, the system employs three simultaneous checks:
- Global Threshold Detector (GTD): Measures if the reconstruction error is too high, as adversarial images often produce blurry or incoherent reconstructions.
- Local Best Detector (LBD): Checks if the winning capsule is actually the one that produces the best reconstruction.
- Cycle-Consistency Detector (CCD): Verifies if the reconstruction of the input belongs to the same class as the input itself.
Evaluation and Results
The researchers evaluated their model on the SVHN (Street View House Numbers) and CIFAR-10 datasets. To test robustness, they designed a potent defense-aware attack called CC-PGD, specifically meant to fool the three detectors.
Human Study and Semantic Shift
A human study conducted via Amazon Mechanical Turk validated the deflection hypothesis. On the SVHN dataset, 69.7% of undetected black-box attacks against the model were labeled by humans as the target class (the class the attacker intended the model to see). In contrast, only 14.3% of attacks against a standard CNN were perceived as the target class by humans. This suggests that the model successfully forces a "semantic shift" in the attack.
Robust Detection Performance
Against defense-aware attacks on CIFAR-10, the proposed detection mechanism achieved an undetected rate of 28.9%. This significantly outperforms existing statistical and classifier-based detection methods, which were almost entirely bypassed (97-98% undetected rates) in similar scenarios.
Conclusion and Future Work
Deflection represents a paradigm shift in adversarial machine learning. By increasing the "cost" of an attack until the distortion becomes semantic, the attacker loses their "invisible" advantage. However, challenges remain. Capsule Networks are computationally expensive compared to standard CNNs, and while deflection worked remarkably well on digits (SVHN), results on more complex images (CIFAR-10) showed that humans could often tell the images were "messy." Scaling this approach to high-resolution datasets like ImageNet remains a significant frontier for future research.
Summary updated