Routing Towards Discriminative Power of Class Capsules

Haoyu Yang, Shuhe Li, Bei YuarXiv 2021

Introduction

Capsule Networks (CapsNets) represent a significant evolution in neural architecture, designed to overcome the limitations of Convolutional Neural Networks (CNNs) in handling spatial hierarchies. By grouping neurons into "capsules" that encapsulate both the presence of an entity and its instantiation parameters (e.g., pose, texture), CapsNets provide a more robust framework for object recognition. Central to their operation is the "routing" mechanism, which determines how information is propagated from lower-level capsules to higher-level ones.

The Routing Bottleneck

Traditional routing mechanisms, such as Dynamic Routing and EM Routing, are built on the principle of "routing-by-agreement." In these schemes, lower-level capsules connect to higher-level ones if their predictions "agree" on an output. However, this approach faces several critical challenges:

  1. Unsupervised Nature: It assumes capsules are correctly activated from the start without leveraging label information during the routing process.
  2. Positive-Only Influence: It typically assumes that low-level features only have a positive impact on high-level representations.
  3. Sub-optimal Convergence: Ignoring target labels during routing can lead to slower convergence and sub-optimal discriminative power.

Proposed Method: Discriminative Routing

To address these issues, this research proposes a shift from unsupervised agreement to discriminative routing. Instead of a heuristic iterative process, routing is formulated as a regularized optimization problem aimed at maximizing the network's classification performance.

Architecture of the proposed capsule routing mechanism, showing the flow from primary capsules (CAP) to output class capsules (OCAP).

Technical Formulation

The core of the proposal is a Quadratic Programming (QP) objective function. This function is designed to maximize the squared length of the capsule corresponding to the ground-truth label while simultaneously minimizing the lengths of all other class capsules.

To ensure stability and encourage efficient feature selection, the authors introduce two types of regularization:

  • $l_2$-regularization: Prevents routing coefficients from exploding and stabilizes the training process.
  • $l_1$-regularization: Promotes sparsity, allowing the network to automatically identify and prune unnecessary connections, effectively acting as a learned dropout mechanism.

Unlike the iterative softmax updates used in standard dynamic routing, this method utilizes gradient-based updates. By ascending the gradient of the discriminative objective, the routing coefficients are updated in a manner that is fully compatible with standard backpropagation, leading to more efficient training.

Experimental Results

The proposed discriminative routing was evaluated against standard Dynamic Routing (DR) on four benchmarks: MNIST, Fashion-MNIST, CIFAR-10, and MultiMNIST.

Performance and Efficiency

The results demonstrate consistent improvements across multiple dimensions:

  • Accuracy: On the Fashion-MNIST dataset, the error rate was reduced from 7.21% (DR) to 6.75% using $l_1$-regularized routing. Similarly, on CIFAR-10, the error rate improved from 15.3% to 14.04%.
  • Convergence: The discriminative objective allows the network to learn distinct features much faster, reaching peak accuracy in fewer iterations.
  • Computational Efficiency: The algorithm is leaner than its predecessors, achieving an approximate 20% reduction in training runtime per 100 steps compared to the original DR implementation.

Qualitative Analysis

The impact of the new routing mechanism is also visible in the quality of reconstructed images. While the primary goal is classification, the network's ability to reconstruct inputs from class capsules serves as a proxy for the richness of the learned features.

Reconstruction results on Fashion-MNIST comparing (a) original input, (b) standard dynamic routing, and (c) the proposed $l_2$-regularized routing.

Interestingly, the authors observed that the discriminative routing itself provides sufficient regularization, such that removing the traditional reconstruction sub-network sometimes improved classification performance.

Conclusion

By reframing capsule routing as a discriminative optimization problem rather than an unsupervised agreement process, this work significantly enhances the efficiency and accuracy of Capsule Networks. The introduction of $l_1$ and $l_2$ regularization provides a principled way to manage information flow and feature selection. Future research will focus on scaling this approach to larger datasets like ImageNet and exploring its performance in deeper capsule hierarchies.

Summary updated

BibTeX
@misc{yang2021routing,
  author = {Haoyu Yang and Shuhe Li and Bei Yu},
  title = {{Routing Towards Discriminative Power of Class Capsules}},
  year = {2021},
  eprint = {2103.04278},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2103.04278},
}
Figure