TL;DR
Capsule Networks (CapsNets) offer excellent spatial awareness and explainability but suffer from massive computational overhead and poor scalability. This paper tackles this bottleneck by combining CapsNets with structurally pruned CNN backbones, drastically reducing the number of primary capsules and routing complexity. The result is a highly efficient hybrid network that maintains or even improves classification accuracy while slashing memory usage, FLOPs, and training time.
What Problem Does This Paper Address?
While Convolutional Neural Networks (CNNs) dominate computer vision, they have a fundamental flaw: they throw away spatial relationships. Thanks to max-pooling, a CNN might look at an image with a mouth above a nose and still classify it as a human face.
Capsule Networks (CapsNets) fix this by replacing scalar neurons with vector "capsules" that encode both the presence of a feature and its specific properties (like position, size, and orientation). They use an iterative "routing-by-agreement" mechanism to build a hierarchy of parts and wholes.
Unfortunately, CapsNets don't scale well. Stacking multiple capsule layers or adding more capsules to handle high-resolution, complex datasets makes the routing algorithm highly unstable and computationally unsustainable. This paper addresses this scalability crisis, aiming to make CapsNets viable for real-world, complex datasets without requiring massive hardware resources.
Methods
Instead of building a "pure" deep capsule network, the authors use a hybrid approach: a standard CNN backbone (like ResNet-50 or MobileNetV1) acts as an early feature extractor, and its output is reshaped into the primary capsule layer.
The core novelty lies in applying structured pruning to this CNN backbone using a state-of-the-art strategy called EagleEye. Unlike unstructured pruning (which zeroes out random weights and creates sparse matrices that are hard to optimize), structured pruning removes entire channels or filters.
As shown in Figure 1, pruning the backbone directly shrinks the size of the output feature maps. Because the number of primary capsules is directly dependent on the size of these feature maps, pruning the CNN automatically and dynamically reduces the number of capsules entering the routing phase (Figure 2). This drastically simplifies the most computationally expensive part of the CapsNet.
The authors evaluate two training paradigms:
- Frozen Backbone: The pruned backbone's weights are locked, acting purely as a fixed feature extractor.
- Finetuned Backbone: The entire network is trained end-to-end.
Datasets
The authors evaluate their approach on two challenging image datasets:
- CIFAR10: Resized to $64 \times 64$ pixels to accommodate deeper backbones.
- Tiny ImageNet: Consisting of $224 \times 224$ pixel images across 200 distinct classes.
Key Insights and Ideas
- The Routing Bottleneck is Solved Externally: The most elegant insight is that you don't need to prune the capsule layers directly to make a CapsNet efficient. By pruning the preceding CNN layers, you naturally starve the capsule layer of redundant inputs, reducing the complexity of the routing algorithm.
- The Finetuning Necessity: Freezing a pretrained CNN backbone yields terrible performance (Figure 3). Standard CNNs aren't trained to preserve the explicit pose and spatial properties that capsules expect. End-to-end finetuning is mandatory so the backbone can learn to map features into a valid capsule space.
- Less is More (The Low-Pruning Paradox): Intriguingly, removing 25% of the backbone's FLOPs actually improves accuracy compared to the unpruned baseline. The authors point out two reasons for this:
- Having too many capsules actually inhibits learning because the routing coupling coefficients become diluted, hurting gradient flow.
- Pruned bottlenecks exhibit higher average entropy, meaning they propagate more general, less overfitted features that capsules can better exploit.
Key Results
The quantitative benefits of this approach are striking, particularly on the complex Tiny ImageNet dataset using a finetuned ResNet-50 backbone:
- The Sweet Spot (25% Pruning): Boosted accuracy from 78% to 80% while dropping total FLOPs from 12.9 Billion to 9.8 Billion.
- The Efficiency Play (50% Pruning): Maintained the baseline accuracy of 78% while cutting total FLOPs nearly in half (6.7 Billion) and reducing GPU memory consumption from 47.02 GB to 39.42 GB.
- Extreme Compression (75% Pruning): Slashed FLOPs to 3.2 Billion and cut GPU memory usage by more than half (to 20.11 GB), with only a modest drop in accuracy to 74%.
Detailed metrics can be seen in the extracted data table below:
Limitations and Future Work
While this work successfully scales CapsNets using efficient backbones, a notable limitation is that the pruning is entirely confined to the CNN portion of the network. The capsule layers themselves remain unpruned.
The authors note that future work will focus on developing specific structured pruning methods tailored directly for capsule layers and their internal routing mechanisms. Additionally, while this hybrid approach works well, it still relies heavily on standard CNN architectures for early feature extraction, leaving the door open for fully-capsule-based deep networks if routing efficiency can be solved natively.
Summary updated