All models

EfficientCapsNet

Capsule networks: dynamic-routing CapsNet, EM routing, Efficient-CapsNet and stacked capsule autoencoders.

Image classification · 62 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 (28 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

Parameters
1.6M
Operations
62
Framework
PyTorch
Recurrent
No
Published
NeurIPS 2017
Cited by
4,080 (as of 17 October 2026)
Authors
Sara Sabour, Nicholas Frosst, Geoffrey E. Hinton
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
m897
Graph hash
4ec9d46033cac2362c9a94348ef31761121eb625f205fa43ab6156013ffcf03b
Skeleton hash
0cc96b3b15b151c052c0e482fed2d2cdbc4af3645f6e1120bcd2624a3820732a
Architecture hash
ded8483d03454739f793d56127175f2660cbac4affa23812e97e8483e1cebbb3
Diagram SHA-256
485fb4f2c023bec26fd96d4fa175dc0f8480ec721397b5eceb6d893b1cc794ef
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

Efficient-CapsNet, an extreme architecture with barely 160K parameters that replaces dynamic routing with a non-iterative, highly parallelizable routing algorithm.

About this model's family

A capsule is a group of neurons whose activity vector represents the instantiation parameters of a specific type of entity such as an object or an object part. The length of that activity vector represents the probability that the entity exists, and its orientation represents the instantiation parameters. Active capsules at one level make predictions, via transformation matrices, for the instantiation parameters of higher-level capsules, and when multiple predictions agree, a higher level capsule becomes active. The models traced here are PyTorch implementations of four capsule designs that grew from this idea.

The original CapsNet uses an iterative routing-by-agreement mechanism: a lower-level capsule prefers to send its output to higher level capsules whose activity vectors have a big scalar product with the prediction coming from the lower-level capsule. Its paper reports that a discriminatively trained, multi-layer capsule system achieves state-of-the-art performance on MNIST and is considerably better than a convolutional net at recognizing highly overlapping digits. The PyTorch port traced here departs from the paper by using MSE as the reconstruction loss. The Matrix Capsules with EM Routing member follows the paper of that name, and its README notes that the paper does not mention the specific scheduler for the inverse temperature, which the port fixes at 0.001.

Efficient-CapsNet pushes capsule capacity to the limits with an extreme architecture with barely 160K parameters, reporting state-of-the-art results on three different datasets with only 2% of the original CapsNet parameters. It replaces dynamic routing with a novel non-iterative, highly parallelizable routing algorithm. Its PyTorch implementation is based on the authors' original TensorFlow code and has been tested to match it numerically. Stacked Capsule Autoencoders take capsules unsupervised: in the first stage the model predicts presences and poses of part templates directly from the image and tries to reconstruct the image by arranging the templates. In the second stage it predicts parameters of a few object capsules, which are then used to reconstruct part poses. Object capsule presences turn out to be highly informative of the object class, which leads to state-of-the-art results for unsupervised classification on SVHN (55%) and MNIST (98.7%). The torch-scae port keeps the architecture of the model and the hyper-parameters the same as the official TensorFlow implementation.

Key idea. Capsules replace scalar feature detectors with activity vectors whose length gives the probability an entity exists and whose orientation gives its pose, routed between levels by agreement.

  • CapsNet
  • capsule network
  • capsules
  • dynamic routing
  • routing by agreement
  • Matrix Capsules
  • EM routing
  • Efficient-CapsNet
  • Stacked Capsule Autoencoders
  • SCAE
  • Hinton
  • Sabour
  • MNIST
  • smallNORB

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

Cite the paper

@misc{sabour2017dynamicroutingcapsules,
      title={Dynamic Routing Between Capsules}, 
      author={Sara Sabour and Nicholas Frosst and Geoffrey E Hinton},
      year={2017},
      eprint={1710.09829},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/1710.09829}, 
}