All models

bagnet17_brainscore

A ResNet-50 variant that classifies images from small local patches without using their spatial ordering.

Image classification · 178 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (16 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Family
BagNet
Parameters
16.2M
Operations
178
Framework
PyTorch
Recurrent
No
Published
ICLR 2019
Cited by
323 (as of 21 October 2026)
Authors
Wieland Brendel, Matthias Bethge
License
MIT
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m3602
Graph hash
040214ac119876b50b794ed3164899669d0be1986f683a956d49cf2a6857812b
Skeleton hash
13849c48bab02adde678f3959c2d033f4680bea01b8d258277e927a9b4af9d64
Architecture hash
397278d9b220103682b5f880dd1ea3bc871bbf5e890175e4d5e9a1f16f661b46
Diagram SHA-256
f08b56bf10a0ebcbdf70b1a985a281c1db9753c2b8e11acaf37cc78a47eeb5de
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

This model is BagNet-17, limited to local patches of at most 17 × 17 pixels, a size the paper reports as reaching AlexNet performance on ImageNet (80.5% top-5).

About this model's family

BagNet is an image classifier that decides from small local image features alone, without taking into account their spatial ordering. The paper introduces it as an architecture for ImageNet whose decisions are considerably easier to explain, and describes it as a simple variant of ResNet-50.

The structure differs from other ResNets only in the replacement of many 3 × 3 convolutions by 1 × 1 convolutions, which limits the receptive field of the topmost convolutional layer to q × q pixels. A linear classifier turns the features of each patch into class evidence, and that evidence is averaged across all patches to give the image-level logits. Because the evidence is inferred patch by patch, the result is a heatmap that shows which parts of the image contribute most to a decision. The name carries the patch size: the last number is the maximum local patch size the network can integrate over.

The paper reports that patches of 17 × 17 pixels reach AlexNet performance on ImageNet (80.5% top-5), and that 33 × 33 pixel patches reach close to 87.6%. In its runtime comparison, BagNets reach around 155 images/s against 570 images/s for ResNet-50.

Key idea. The paper shows that BagNet, a ResNet-50 variant restricted to small local patches without their spatial ordering, reaches 87.6% top-5 on ImageNet with 33 x 33 px features.

  • bagnet
  • bagnets
  • bag-of-local-features
  • bag of features
  • bagnet9
  • bagnet17
  • bagnet33
  • image classification
  • interpretable cnn
  • local patches

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{brendel2019approximatingcnnsbagoflocalfeaturesmodels,
      title={Approximating CNNs with Bag-of-local-Features models works surprisingly well on ImageNet}, 
      author={Wieland Brendel and Matthias Bethge},
      year={2019},
      eprint={1904.00760},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/1904.00760}, 
}