On the Vulnerability of Capsule Networks to Adversarial Attacks

Felix Michels, Tobias Uelwer, Eric Upschulte, Stefan HarmelingarXiv 2019

Abstract

Capsule Networks (CapsNets) were introduced as a promising architecture for computer vision, potentially offering greater robustness than standard Convolutional Neural Networks (ConvNets) due to their use of dynamic routing and spatial relationship modeling. This paper presents a rigorous evaluation of CapsNet robustness against a variety of adversarial attacks across four benchmark datasets. Our results demonstrate that CapsNets are not inherently more robust; they are susceptible to human-imperceptible perturbations and exhibit failure modes distinct from, yet as severe as, those of ConvNets.

Introduction

Adversarial attacks involve small, often invisible modifications to input data that cause machine learning models to make incorrect predictions. Early hypotheses suggested that Capsule Networks might be naturally resistant to these attacks because they represent objects as sets of capsules (vectors) and use dynamic routing to establish part-whole relationships. This study investigates whether this structural difference translates to increased security or if it merely necessitates more sophisticated attack strategies.

Methodology

We compared the performance of CapsNets and ConvNets under four distinct adversarial attack methods:

  • Carlini-Wagner (CW): A white-box optimization attack that seeks the minimum perturbation required for a targeted misclassification.
  • Boundary Attack: A black-box attack that starts from a misclassified image and iteratively reduces noise while staying outside the correct decision boundary.
  • DeepFool: An efficient white-box attack that finds the shortest path to a decision boundary.
  • Universal Adversarial Perturbations: A single, image-agnostic noise pattern that can fool a model across many different inputs.

Evaluation was performed on the MNIST, Fashion-MNIST, SVHN, and CIFAR10 datasets.

Robustness and Visibility

The primary finding is that CapsNets are highly vulnerable to adversarial perturbations. In many instances, the noise required to induce misclassification is completely imperceptible to humans.

Adversarial examples generated using CW, Boundary, DeepFool, and Universal attacks. The middle column shows the perturbed images, which appear identical to the originals on the left.

Furthermore, adversarial examples are transferable between architectures. A perturbation designed for a ConvNet often succeeds against a CapsNet, suggesting that both models learn similar high-level decision boundaries despite their different internal mechanisms.

Distinct Failure Modes

Despite their shared vulnerabilities, CapsNets and ConvNets fail in fundamentally different ways. By applying t-SNE visualization to universal perturbations, we observed that the noise patterns effective against CapsNets form clusters distinct from those effective against ConvNets. This indicates that the internal representations and the specific features exploited by the attacks differ between the two architectures.

t-SNE visualization of universal perturbations. The distinct clustering of CapsNet perturbations (lower left) versus ConvNet perturbations (upper right) highlights their different internal failure modes.

Quantitative Results

Quantitative metrics further underscore the vulnerability of CapsNets. On the CIFAR10 dataset, the average Euclidean norm of the CW perturbation was 0.23 for CapsNets, compared to 0.37 for ConvNets, indicating that CapsNets were actually easier to fool in this specific scenario. Universal perturbations were also highly effective, achieving a 53.4% fooling rate on the SVHN dataset and reducing model accuracy to below 50%.

Conclusion

This study concludes that Capsule Networks do not inherently solve the problem of adversarial vulnerability in deep learning. While they model spatial relationships differently than ConvNets, they remain susceptible to both targeted and universal attacks. Future work should investigate whether the unique properties of dynamic routing, such as the "none-of-the-above" classification, can be explicitly engineered to improve defensive robustness.

Summary updated

BibTeX
@misc{michels2019vulnerability,
  author = {Felix Michels and Tobias Uelwer and Eric Upschulte and Stefan Harmeling},
  title = {{On the Vulnerability of Capsule Networks to Adversarial Attacks}},
  year = {2019},
  eprint = {1906.03612},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1906.03612},
}
Figure