Localizing Multi-scale Semantic Patches for Image Classification

Chuanguang Yang, Xiaolong Hu, Zhulin An, Hui Zhu, Yongjun XuarXiv 2020

Abstract

AnchorNet is a novel CNN framework designed to "un-black-box" deep learning by localizing multi-scale, informative patches in images and text using only category-level labels. By enforcing strict receptive field mapping and removing fully connected layers, the authors achieve high interpretability and a 2x inference speedup for downstream tasks with minimal loss in accuracy.

Introduction

Modern Convolutional Neural Networks (CNNs) are notoriously difficult to interpret, often described as "black boxes." Two specific architectural choices contribute to this lack of transparency. First, standard CNNs use zero-padding to maintain spatial resolution, but this causes the "receptive field"—the area of the input image a neuron "sees"—to expand beyond the actual image boundaries. This blurs the mathematical mapping between high-level features and specific input patches. Second, Fully Connected (FC) layers mix information from every part of the image, creating complex dependencies that make it impossible to determine which local patch contributed to a specific classification decision.

While object detection can identify specific regions, it typically requires expensive, manually annotated bounding boxes. AnchorNet seeks a way to localize informative regions using only "weak" supervision—the image-level labels already present in standard classification datasets.

The AnchorNet Architecture

AnchorNet introduces several key architectural innovations to ensure that every classification decision can be traced back to its source:

  • Strict Receptive Field (RF) Mapping: The authors eliminate all padding in convolutional layers. This ensures that every point in a high-level feature map corresponds to a mathematically precise, fixed-size patch in the original input.
  • Multi-scale Branches: To handle objects of different sizes, AnchorNet uses three parallel branches ($B^{63}, B^{95}, B^{111}$) with different accumulated RF sizes (e.g., 63x63 pixels). Narrower branches naturally specialize in fine-grained textures and small objects, while wider branches capture more global shapes.
  • Linear Spatial Aggregation: The standard FC classifier is replaced with Global Average Pooling (GAP) on class-specific feature maps. This treats each patch as an independent piece of evidence, allowing the model to "vote" on the final class based on the sum of individual patch contributions.
AnchorNet architecture featuring multi-scale branches and attention mechanisms for localizing informative patches.

To optimize inference, the authors developed the LIP (Localizing Informative Patches) algorithm. This greedy selection process identifies the top-$K$ most informative patches while using an Intersection over Union (IoU) threshold to ensure the patches are spatially distinct and cover diverse information.

Key Insights and Results

The model was evaluated on the ImageNet (ILSVRC 2012) dataset and the Movie Reviews (MR) dataset for text classification. The results demonstrate that independence between patches preserves interpretability without sacrificing significant performance.

Additive logic of AnchorNet: the final logit is the sum of contributions from individual localized patches in both image and text domains.

Interpretability and Debugging

By removing FC layers, the model's "reasoning" becomes transparent. You can see exactly which patch—such as a dog's ear or a specific texture—triggered the final label. This provides "aha" moments for misclassifications. For example, the model revealed that a "custard apple" was misclassified as "head cabbage" because it focused on the shared green color and round outline, while ignoring the specific skin texture.

Efficiency and Robustness

  • Inference Acceleration: On ImageNet, using AnchorNet-localized patches allowed downstream models to achieve a ~2x speedup (FLOPs reduction) with only a tiny drop in Top-1 accuracy (e.g., ResNet-50 dropped from 72.6% to 71.1%).
  • Text Efficiency: For text classification, the AnchorNet-T model achieved a massive 14x reduction in FLOPs while maintaining 81.7% accuracy.
  • Global Scrambling: Because the model views patches independently, it remains remarkably accurate even on "texturised" images where global structure is destroyed but local textures are preserved—a task where humans often fail.
  • Adversarial Robustness: AnchorNet proved more robust to adversarial attacks (like FGSM) than standard models, likely because an attacker must successfully fool multiple independent patch-wise decisions.

Conclusion

AnchorNet demonstrates that strict architectural constraints can lead to significant gains in interpretability and efficiency. While branches with smaller receptive fields can sometimes pick up background noise, the overall framework offers a powerful tool for "un-black-boxing" deep learning. Future work may extend this philosophy to other media types, such as audio and speech recognition, where local semantic "patches" carry specific weight.

Summary updated

BibTeX
@misc{yang2020localizing,
  author = {Chuanguang Yang and Xiaolong Hu and Zhulin An and Hui Zhu and Yongjun Xu},
  title = {{Localizing Multi-scale Semantic Patches for Image Classification}},
  year = {2020},
  url = {https://openreview.net/forum?id=r8GQUmUfFb},
}
Figure