Interpretable Graph Capsule Networks for Object Recognition

Jindong Gu, Volker Tresp

TL;DR

This paper introduces GraCapsNets, a novel architecture that replaces the traditional routing mechanism in Capsule Networks with a multi-head attention-based graph pooling approach. This modification not only makes Capsule Networks more interpretable by providing built-in visual attention explanations but also leads to improved classification performance, fewer parameters, and enhanced adversarial robustness compared to existing Capsule Networks.

What Problem Does This Paper Address?

Convolutional Neural Networks (CNNs) have been the dominant force in object recognition for years, but they suffer from two key weaknesses: adversarial vulnerability (being easily fooled by imperceptible image perturbations) and a lack of interpretability (their decisions are based on entangled representations). Capsule Networks (CapsNets) emerged as a promising alternative, offering more human-aligned, disentangled representations and robustness to affine transformations. However, a significant challenge remained: explaining why a CapsNet made a particular classification. Existing methods for explaining CNNs, like Grad-CAM, are often incompatible with CapsNets due to their unique iterative routing mechanism. This paper aims to bridge this interpretability gap by proposing a new CapsNet architecture that inherently supports explanation generation.

Methods

The core innovation of this work is the introduction of Interpretable Graph Capsule Networks (GraCapsNets). Instead of the iterative routing mechanism found in traditional CapsNets, GraCapsNets employ a multi-head attention-based Graph Pooling approach. Here's a breakdown:

  • Graph Modeling: Primary capsules (representing object parts) are modeled as nodes in a graph. The spatial relationships between these primary capsules are captured by an adjacency matrix.
  • Multi-Head Attention-based Graph Pooling: This mechanism aggregates information from the graph nodes (primary capsules) to form votes for higher-level capsules. Each "head" in the multi-head system learns a different aspect of the relationships, and their outputs are averaged for the final prediction. The attention mechanism within this pooling directly provides visual cues about which input features are most relevant for a given classification.
  • Replacement of Routing: The complex, iterative routing-by-agreement process is entirely replaced by this graph pooling strategy.

This architectural change allows for direct generation of explanations through the learned attention weights, making the model inherently interpretable.

Datasets

The paper evaluates GraCapsNets on several standard image recognition datasets:

  • MNIST: A classic dataset of handwritten digits.
  • Fashion-MNIST: A dataset of clothing items, serving as a more challenging grayscale image benchmark.
  • CIFAR10: A dataset of small color images across 10 classes.
  • SVHN (Street View House Numbers): Used for adversarial robustness experiments.
  • AffNIST: A benchmark for testing robustness to affine transformations.

The authors also mention using a basic architecture from Section 4.1 for interpretability experiments, implying a standard setup for comparison.

Key Insights and Ideas

  • Interpretability as a Built-in Feature: The most significant insight is that replacing the routing mechanism with graph pooling naturally leads to interpretable explanations via attention maps. This is a departure from post-hoc explanation methods that often struggle with CapsNets.
  • Graph Structure Captures Part-Part Relationships: Modeling primary capsules as graphs explicitly leverages the spatial relationships between object parts, which is crucial for robust object recognition.
  • Routing is Not Essential for CapsNet Advantages: Surprisingly, GraCapsNets achieve better performance and robustness without the traditional routing mechanism, suggesting that the core benefits of CapsNets (disentangled representations, affine robustness) are not solely dependent on routing.
  • Parameter Efficiency: The proposed architecture achieves comparable or better performance with significantly fewer parameters than standard CapsNets.
  • Improved Adversarial Robustness: GraCapsNets demonstrate enhanced resilience to adversarial attacks, likely due to the attention mechanism's ability to filter out noisy or misleading input features.

Key Results

  • Classification Performance: GraCapsNets achieve slightly better performance on grayscale datasets (MNIST, Fashion-MNIST) and significantly better performance on CIFAR10 compared to original CapsNets, all while using fewer parameters. For instance, on CIFAR10, GraCapsNets achieve 82.21% accuracy with 1.18M parameters, outperforming CapsNets (74.64% with 7.66M parameters).
  • Interpretability: Visual attention maps generated by GraCapsNets effectively highlight discriminative input features (e.g., handbag handles, plane wings) and are quantitatively evaluated to perform better than standard saliency methods like Grad-CAM on F-MNIST and CIFAR10 using the AOPC metric.
  • Adversarial Robustness: GraCapsNets show lower attack success rates under FGSM and C&W attacks compared to both CNNs and other CapsNet variants, indicating improved robustness.
  • Disentangled Representations: The model retains the ability to produce disentangled representations, as demonstrated by reconstructing images from perturbed capsule dimensions.
  • Affine Transformation Robustness: GraCapsNets also show improved performance on the AffNIST benchmark, maintaining robustness to affine transformations.

Limitations and Future Work

  • Ablation Study on Multiple Heads: While GraCapsNets benefit from multiple heads, the paper notes that using too many heads can slightly degrade performance, possibly because the primary capsule dimensions become too small to capture sufficient information. This suggests a need for careful tuning of the number of heads.
  • Quantitative Evaluation of Saliency Maps: The authors acknowledge that the quantitative evaluation of saliency map explanations is an ongoing research area, and their chosen metric (AOPC) is a widely used but not definitive measure.
  • Future Work: The paper implicitly suggests that further exploration of graph pooling strategies and their integration with other neural network architectures could be fruitful. The success of GraCapsNets without routing also opens avenues for re-evaluating the necessity of routing in other CapsNet applications. The authors also mention that their method is orthogonal to other advanced interpretation methods and can be combined with them.

Summary updated

Abstract

Capsule Networks, as alternatives to Convolutional Neural Networks, have been proposed to recognize objects from images. The current literature demonstrates many advantages of CapsNets over CNNs. However, how to create explanations for individual classifications of CapsNets has not been well explored. The widely used saliency methods are mainly proposed for explaining CNN-based classifications; they create saliency map explanations by combining activation values and the corresponding gradients, e.g., Grad-CAM. These saliency methods require a specific architecture of the underlying classifiers and cannot be trivially applied to CapsNets due to the iterative routing mechanism therein. To overcome the lack of interpretability, we can either propose new post-hoc interpretation methods for CapsNets or modifying the model to have build-in explanations. In this work, we explore the latter. Specifically, we propose interpretable Graph Capsule Networks (GraCapsNets), where we replace the routing part with a multi-head attention-based Graph Pooling approach. In the proposed model, individual classification explanations can be created effectively and efficiently. Our model also demonstrates some unexpected benefits, even though it replaces the fundamental part of CapsNets. Our GraCapsNets achieve better classification performance with fewer parameters and better adversarial robustness, when compared to CapsNets. Besides, GraCapsNets also keep other advantages of CapsNets, namely, disentangled representations and affine transformation robustness.
BibTeX
@inproceedings{gu2021interpretable,
  author = {Jindong Gu and Volker Tresp},
  title = {{Interpretable Graph Capsule Networks for Object Recognition}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2021},
  doi = {10.1609/aaai.v35i2.16237},
}
Figure