An Adaptive Capsule Network Based on 3D Convolution-Based Attention
摘要
CapsNets offer the advantage of preserving spatial relationships between features, thus enhancing their robustness to images undergoing affine transformations. However, in traditional CapsNets, directly utilizing capsule information for prediction during the feature learning process leads to redundancy in feature information and insufficient capacity to process highly correlated features. Consequently, suboptimal performance persists in processing such affine images. In an effort to bolster traditional CapsNets for greater robustness, we introduce a dynamic selection mechanism. This mechanism enables CapsNet to adaptively adjust the size of the initial capsule information on the basis of inputs, providing a more effective and reasonable approach than the manual size division in traditional CapsNets does, thereby facilitating more efficient feature learning. We also propose the subsequent integration of a 3D convolution-based attention module into CapsNet. This module allows the model to focus more on feature information with high relevance while preserving spatial information. Through classification comparison experiments on four public datasets, namely, MNIST, Fashion-MNIST, CIFAR-10, and SVHN, the results demonstrate that the proposed CapsNet achieves better classification results, with improvements of 0.24%, 5.22%, 11.01%, and 4.06%, respectively. Finally, in robustness comparison experiments based on the smallNORB and affNIST datasets, the results reveal that integrating the proposed module into traditional CapsNets significantly enhances affine transformation robustness. In summary, the experimental findings indicate that the CapsNet proposed in this paper notably improves both robustness and classification accuracy.