Evaluating Generalization Ability of Convolutional Neural Networks and Capsule Networks for Image Classification via Top-2 Classification

Hao Ren, Jianlin Su, Hong Lu

Introduction

Standard Convolutional Neural Networks (CNNs) have achieved remarkable success in image classification, yet they often exhibit a "brittleness" when faced with variations in visual context. While Capsule Networks (CapsNets) were introduced to better capture spatial hierarchies and part-whole relationships, their high parameter count has limited their scalability. This research addresses these challenges by proposing a novel Parameter-Sharing Capsule Network (PS CapsNet) and a rigorous Top-2 Classification task to evaluate true object "understanding" versus simple distribution memorization.

Methodology

The study introduces three primary technical contributions designed to improve and measure model generalization:

  1. Top-2 Classification Task: To move beyond standard single-label benchmarks, the authors developed a "stress test" where models are trained on single-object images but tested on images containing two distinct objects placed side-by-side. Success requires the model to correctly identify both labels, demonstrating an ability to recognize entities independently of their context.
  2. Parameter-Sharing (PS) Capsule Layer: To address the efficiency issues of traditional CapsNets, the authors propose sharing transformation matrices across all low-level capsules. This approach treats the matrix as a universal feature selector, significantly reducing the parameter overhead while maintaining the benefits of capsule-based representation.
  3. ProbAM (Probability-guided Activation Mapping): A new visualization technique that leverages internal routing probabilities to highlight image regions of interest during a single forward pass, providing insights into the model's focus without requiring gradient calculations.
The proposed architecture for the Top-2 classification task, featuring a shared feature extractor and specialized classifiers.

Experimental Setup

The proposed PS CapsNet was evaluated against standard CNNs and fully connected (FC) CapsNets across five benchmark datasets: MNIST, FashionMNIST, SVHN, CIFAR10, and STL10. For each dataset, a "Two-Label" (TL) test set was generated by randomly pairing images with different labels to facilitate the Top-2 classification task.

Results and Discussion

The experimental results reveal a significant performance gap between traditional CNNs and the proposed PS CapsNet:

  • Generalization Performance: On the FashionMNIST Top-2 task, CNN accuracy plummeted to 33.44%, whereas the PS CapsNet maintained a high accuracy of 88.34%. This suggests that CNNs are often "context-blind," struggling to disentangle multiple objects in a single scene.
  • Confidence and Reliability: Using the "TCA" metric (accuracy with at least 50% confidence), the CNN achieved only 9.64% on the SVHN dataset, compared to 84.10% for the PS CapsNet.
  • Efficiency: The PS CapsNet demonstrated superior parameter efficiency. On CIFAR10, it utilized approximately 0.27M parameters, roughly half the count of a comparable CNN (~0.53M) and less than a standard FC CapsNet (~0.35M).
Test accuracy comparison across different models and tasks over 100 epochs.

Qualitative analysis via ProbAM further confirmed that PS CapsNets effectively focus on both objects in a two-label image, while CNNs frequently focus on irrelevant background features or only a single object.

Conclusion

The findings underscore the superior generalization capabilities of Capsule Networks, particularly when enhanced with parameter-sharing mechanisms. While performance on complex datasets like STL10 (54.25% Top-2 accuracy) indicates room for improvement, the PS CapsNet represents a significant step toward more robust and efficient computer vision models. Future research will explore scaling these architectures to large-scale datasets like ImageNet.

Summary updated

BibTeX
@misc{ren2019evaluating,
  author = {Hao Ren and Jianlin Su and Hong Lu},
  title = {{Evaluating Generalization Ability of Convolutional Neural Networks and Capsule Networks for Image Classification via Top-2 Classification}},
  year = {2019},
  eprint = {1901.10112},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1901.10112},
}
Figure