Effective and Efficient Vote Attack on Capsule Networks

Jindong Gu, Baoyuan Wu, Volker Tresp

Introduction

Capsule Networks (CapsNets) have long been considered more robust against adversarial perturbations than standard Convolutional Neural Networks (CNNs). However, this paper reveals a significant "Achilles' heel" in their architecture. By introducing the Vote Attack, which targets the intermediate "votes" of the network rather than its final output, the authors demonstrate that CapsNets are both more vulnerable and easier to fool than previously believed. Furthermore, this novel attack method can successfully bypass the network's built-in adversarial detection mechanisms.

The Illusion of Robustness

Standard CNNs are notoriously fragile; a tiny, invisible tweak to an image can trick them into misclassifying an object entirely. Capsule Networks were proposed as a more robust, biologically inspired alternative that uses "dynamic routing" to recognize parts of an object and their spatial relationships.

Evaluating the true robustness of CapsNets, however, has been difficult due to two main factors:

  1. Computational Cost: The iterative routing mechanism makes calculating the gradients needed to generate adversarial attacks extremely slow.
  2. Gradient Obfuscation: The routing process can "hide" the gradients, making standard attacks appear less effective than they actually are. This phenomenon creates a "fake sense of security."

The authors set out to determine if CapsNets are genuinely robust, or if prior evaluation methods simply haven't been attacking them efficiently.

Methods: The Vote Attack

To bypass the challenges of gradient obfuscation and computational overhead, the researchers propose the Vote Attack.

In a standard CapsNet, "primary capsules" produce intermediate votes for what the higher-level objects might be. These votes then go through an iterative routing process to reach an agreement at the output layer.

Capsule Network Architecture
  • Standard Attack (Caps-Attack): Traditional attacks attempt to manipulate the final output capsules. This requires backpropagating through the expensive, multi-step routing loop, which obfuscates the gradient.
  • Vote Attack (The Innovation): Instead of waiting for the routing to finish, this attack targets the intermediate votes directly. By averaging the votes and applying the network's "squash" activation function, the attacker creates a surrogate loss.

Because this method skips the routing process during the gradient calculation, it is significantly faster and avoids the gradient obfuscation caused by the routing iterations. Additionally, the authors integrated this into a detection-aware framework to bypass the reconstruction-based defense that CapsNets use to spot adversarial images.

Key Insights and Results

The study evaluated the attack across several standard computer vision benchmarks, including CIFAR-10, SVHN, MNIST, AffNIST, and FMNIST. The results highlight several critical vulnerabilities in CapsNets:

  • The Routing Shield is Thin: The perceived robustness of CapsNets is largely due to the routing mechanism making it hard for standard algorithms to find a good "direction" for the attack. By attacking the votes directly, the Vote Attack effectively bypasses this shield.
  • Higher Success Rate: The Vote Attack is significantly more devastating than standard attacks. On the CIFAR-10 dataset, a standard PGD attack (Caps-Attack) left the network with 17.3% accuracy. The Vote Attack dropped that accuracy to just 4.83%.
Accuracy under various attacks
  • Faster Execution: Because the Vote Attack doesn't differentiate through the routing loop, it generates adversarial examples much faster. On CIFAR-10, it was roughly 12% faster than attacking the capsules directly.
  • Superior Transferability: Adversarial images created by the Vote Attack were more likely to fool other models (such as VGG19 or ResNet18) compared to those created by standard Caps-Attacks.
  • Bypassing Defenses: CapsNets often use a "reconstruction" sub-network to check if an image looks "real." By adding a secondary goal to the Vote Attack (minimizing reconstruction error), the authors achieved an "Undetected Rate" of 86.1% on the FMNIST dataset, meaning the vast majority of successful attacks were completely missed by the network's internal detection system.

Limitations and Future Work

While the paper proves CapsNets are more vulnerable than previously thought, it notes that they still generally perform better than vanilla CNNs under the same attack conditions (where CNNs often drop to near 0% accuracy, as seen with ResNet in the results).

The authors suggest that future work should focus on adapting this attack for matrix-based capsules (like EM-Routing), which would require slight mathematical adjustments. More importantly, now that the "Vote" vulnerability is known, the research community must search for stronger defenses to harden the voting process itself against manipulation, moving beyond empirical defenses toward formal mathematical certifications of robustness.

Summary updated

BibTeX
@inproceedings{gu2021effective,
  author = {Jindong Gu and Baoyuan Wu and Volker Tresp},
  title = {{Effective and Efficient Vote Attack on Capsule Networks}},
  booktitle = {International Conference on Learning Representations},
  year = {2021},
  url = {https://openreview.net/forum?id=erRDFqiR2v},
}
Figure