Abstract: A capsule is a collection of neurons which represents different variants of a pattern in the network. The routing scheme ensures only certain capsules which resemble lower counterparts in the higher layer should be activated. However, the computational complexity becomes a bottleneck for scaling up to larger networks, as lower capsules need to correspond to each and every higher capsule. To resolve this limitation, we approximate the routing process with two branches: a master branch which collects primary information from its direct contact in the lower layer and an aide branch that replenishes master based on pattern variants encoded in other lower capsules. Compared with previous iterative and unsupervised routing scheme, these two branches are communicated in a fast, supervised and one-time pass fashion. The complexity and runtime of the model are therefore decreased by a large margin. Motivated by the routing to make higher capsule have agreement with lower capsule, we extend the mechanism as a compensation for the rapid loss of information in nearby layers. We devise a feedback agreement unit to send back higher capsules as feedback. It could be regarded as an additional regularization to the network. The feedback agreement is achieved by comparing the optimal transport divergence between two distributions (lower and higher capsules). Such an add-on witnesses a unanimous gain in both capsule and vanilla networks. Our proposed EncapNet performs favorably better against previous state-of-the-arts on CIFAR10/100, SVHN and a subset of ImageNet.
Introduction
Capsule Networks (CapNets) were introduced to address a fundamental limitation in standard Convolutional Neural Networks (CNNs): the difficulty in handling spatial hierarchies and "pose" variations efficiently. While CNNs rely on pooling to achieve translation invariance, CapNets use vector-valued "capsules" to achieve equivariance, representing entities and their properties like orientation and texture. However, original CapNet designs were computationally expensive due to iterative agreement routing, where every lower-layer capsule communicates with every higher-layer capsule. This creates significant bottlenecks in parameter count and computational latency, making them difficult to scale to modern GPU-optimized workflows.
Approximate Routing with Master/Aide Interaction
To overcome the limitations of iterative routing, EncapNet introduces a streamlined, one-pass approximation. Instead of an unsupervised clustering process, it utilizes two distinct branches to simulate the agreement mechanism:
- Master Branch: This branch collects primary information from direct spatial contacts in the preceding layer, functioning similarly to a standard convolution.
- Aide Branch: This branch searches for pattern variants across different channels to "replenish" the master branch with auxiliary information.
These branches are intertwined using learned coefficients, allowing the network to achieve the benefits of "agreement" in a single forward pass. This supervised approach is significantly faster and more memory-efficient than traditional Dynamic or EM routing.
Feedback Agreement via Optimal Transport
Deep networks often suffer from rapid information loss across layers. To mitigate this, EncapNet introduces a Feedback Agreement Unit. This unit acts as a regularizer, forcing higher-layer capsules to maintain enough information to remain consistent with their lower-layer counterparts.
Agreement is measured using Sinkhorn Divergence, a computationally efficient approximation of Optimal Transport (Wasserstein distance). Unlike standard KL-divergence, Optimal Transport provides a more robust comparison of distributions even when they do not perfectly overlap. This feedback mechanism ensures that the "mass" of information is preserved throughout the network architecture.
Experimental Results
EncapNet was evaluated across several benchmarks, including CIFAR-10/100, SVHN, and a specialized "h-ImageNet" (Hard ImageNet) subset designed to test fine-grained pattern recognition.
- Efficiency: EncapNet is approximately 7x to 15x faster per batch than EM-routing CapNets and requires significantly less memory, enabling larger batch sizes.
- Accuracy: On CIFAR-10, EncapNet achieved a 3.10% error rate, a substantial improvement over previous capsule results (12.66%) and standard ResNet baselines (6.43%).
- Robustness: On the h-ImageNet benchmark, EncapNet (v3++) achieved a top-1 error of 40.05%, outperforming Wide Residual Networks (42.51%) and ResNet-101 (44.13%).
- Versatility: The Sinkhorn feedback unit provided a universal gain; adding it to a standard ResNet-18 reduced its CIFAR-10 error from 8.03% to 7.67%.
Conclusion
EncapNet transforms Capsule Networks into a practical architecture by replacing expensive iterative routing with an efficient Master/Aide structure and introducing a novel feedback mechanism based on Optimal Transport. While the Sinkhorn iterates add some training complexity, the resulting model is fast, scalable, and achieves state-of-the-art performance on complex image classification tasks. Future work may extend these "encapsulation" principles to object detection and segmentation.
Summary updated