Abstract
Capsule networks have gained a lot of popularity in short time due to its unique approach to model equivariant class specific properties as capsules from images. However the dynamic routing algorithm comes with a steep computational complexity. In the proposed approach we aim to create scalable versions of the capsule networks that are much faster and provide better accuracy in problems with higher number of classes. By using dynamic routing to extract intermediate features instead of generating output class specific capsules, a large increase in the computational speed has been observed. Moreover, by extracting equivariant feature capsules instead of class specific capsules, the generalization capability of the network has also increased as a result of which there is a boost in accuracy.
Introduction
Convolutional Neural Networks (CNNs) are the industry standard for vision tasks, yet they often struggle with "invariance"—recognizing objects based on the presence of features while ignoring their spatial relationships. Capsule Networks (CapsNets) were introduced to achieve "equivariance," using vectors (capsules) to represent the properties and poses of objects.
However, the original CapsNet architecture faces a significant scaling bottleneck. Its core mechanism, dynamic routing, is typically performed at the final layer to create one capsule for every possible class. As the number of classes grows (e.g., from 10 to 1,000), the computational complexity and memory usage explode. This leads to glacial training speeds and a tendency to overfit on complex data.
Proposed Methodology
The authors propose a novel architectural modification: decoupling the computationally expensive dynamic routing process from the final classification layer. Instead of generating class-specific capsules, the routing algorithm is used to extract a fixed, smaller set of intermediate feature capsules.
In this proposed approach, the network flow is modified as follows:
- Primary Capsules: Initial features are extracted from the input image via convolutional blocks.
- Dynamic Routing to Feature Capsules: A fixed number of feature capsules ($N_{features}$) are generated, regardless of the total number of classes ($N_{class}$).
- Classification: These feature capsules are flattened and passed through fully connected (FC) layers to produce the final output distribution.
By setting $N_{features} \ll N_{class}$, the dynamic routing phase becomes invariant to the total number of categories. To ensure these feature capsules still capture the essential spatial relationships, the authors retain a decoder network. This decoder attempts to reconstruct the original input image from the feature capsules, acting as a regularizer that forces the capsules to learn meaningful physical properties.
Experimental Results
The researchers evaluated the model on five Indic handwritten datasets, including simple 10-class numerals and the highly complex 199-class Bangla Compound Character dataset.
The results on the 199-class dataset were particularly significant:
- Accuracy: The proposed method achieved 87.44% accuracy, significantly outperforming the standard CapsNet (79.34%) and specialized variants like LeNet+CapsNet (79.9%).
- Training Speed: Training time per epoch dropped from 1206.99 seconds to just 59.65 seconds—a 20x speedup.
- Memory Efficiency: The GPU memory footprint per sample was reduced from 2057 MB to approximately 693 MB.
By funneling information through a bottleneck of fewer feature capsules, the model also demonstrated improved generalization, avoiding the overfitting typically seen in standard high-class-count CapsNets.
Conclusion
This paper demonstrates that dynamic routing is a powerful tool for grouping low-level parts into high-level concepts, even when those concepts are intermediate "meta-features" rather than final classes. This architectural shift allows Capsule Networks to scale to real-world datasets with hundreds of classes while maintaining their unique advantages in modeling spatial relationships. Future work may explore ways to regain class-specific reconstructions to improve the interpretability lost in this bottlenecked approach.
Summary updated