PrunedCaps: A Case For Primary Capsules Discrimination
Ramin Sharifi, Pouya Shiri, Amirali Baniasadi
TL;DR
This paper demonstrates that pruning Primary Capsules in Capsule Networks can yield substantial speedups and FLOPS reductions with only minor accuracy loss. By applying a Taylor expansion-based ranking that combines activation and gradient information, the PrunedCaps method removes up to 95% of capsules while maintaining performance on MNIST-like datasets and achieving large efficiency gains on more complex datasets. The approach shows up to 9.90x inference-time improvements and over 95% FLOPS reduction, with dataset complexity influencing the prune threshold. These results provide a path toward practical, resource-efficient CapsNets for diverse image-classification tasks.
Abstract
Capsule Networks (CapsNets) are a generation of image classifiers with proven advantages over Convolutional Neural Networks (CNNs). Better robustness to affine transformation and overlapping image detection are some of the benefits associated with CapsNets. However, CapsNets cannot be classified as resource-efficient deep learning architecture due to the high number of Primary Capsules (PCs). In addition, CapsNets' training and testing are slow and resource hungry. This paper investigates the possibility of Primary Capsules pruning in CapsNets on MNIST handwritten digits, Fashion-MNIST, CIFAR-10, and SVHN datasets. We show that a pruned version of CapsNet performs up to 9.90 times faster than the conventional architecture by removing 95 percent of Capsules without a loss of accuracy. Also, our pruned architecture saves on more than 95.36 percent of floating-point operations in the dynamic routing stage of the architecture. Moreover, we provide insight into why some datasets benefit significantly from pruning while others fall behind.
