A capsule network is a neural network built from capsules, groups of neurons whose activity vector represents the parameters of an object or object part. The length of that vector represents the probability that the entity exists, and its orientation encodes the entity's properties.
This page is for practitioners and technology leaders comparing CapsNet with a convolutional neural network (CNN). It covers how capsules work, the routing idea, the comparison, and a short first-steps list.
The paper Dynamic Routing Between Capsules by Sara Sabour, Nicholas Frosst and Geoffrey Hinton introduced the approach in its modern form. Lower-level capsules make predictions for higher-level capsules through transformation matrices. That structure lets the network keep information about where a part sits and how it is oriented, instead of reducing everything to whether a feature is present.
The paper uses an iterative process called routing by agreement. A lower-level capsule sends its output to the higher-level capsules whose activity vectors closely match its prediction. In the authors' words, when multiple predictions agree, a higher level capsule becomes active.
Dynamic routing, the name used in the paper title, is this agreement mechanism. It is the core of the idea and it is what separates capsules from a stack of ordinary layers.
The Stanford CS231n notes on convolutional networks describe what a CNN does: each neuron connects to only a local region of the input, neurons in a depth slice share weights, and pooling progressively reduces the spatial size of the representation. For example, 2 by 2 max pooling with stride 2 discards 75 per cent of the activations.
| Aspect | CNN | Capsule network |
|---|---|---|
| Unit of representation | A single neuron activation in a feature map | A capsule: a vector with length and orientation |
| How layers connect | Local connections with shared weights, plus pooling | Predictions through transformation matrices, routed by agreement |
| What is kept | Whether a feature is present, with spatial size reduced by pooling | The probability an entity exists and its properties |
| Reported result | Established, widely used | State-of-the-art MNIST result and better on highly overlapping digits, per the paper |
The authors report that a discriminatively trained, multi-layer capsule system achieves state-of-the-art performance on MNIST and is considerably better than a convolutional network at recognising highly overlapping digits. That is a research result on a specific benchmark. The sources read for this page do not show that capsule networks replace CNNs in general, so test them on your own data before choosing.
Agents that read images or sensor streams rely on a perception model, and CNNs or capsule networks are candidates for that role. On ElixirClaw, XenonStack's AI agents computing platform, a perception model is one component an agent can use. Pick it by measured accuracy, cost and robustness on your own images, and log which model produced each decision.
To map one decision your agents make, and the data and policy it depends on, book a Context Workshop. See what happens in the workshop.
It is a neural network built from capsules, groups of neurons whose activity vector encodes the properties of an object or part, with its length showing how likely the entity is to exist.
It is an iterative process in which a lower-level capsule sends its output to the higher-level capsules whose activity vectors closely match its prediction.
On MNIST the authors report state-of-the-art performance and better results on highly overlapping digits. That is one benchmark, so compare on your own data.
Sara Sabour, Nicholas Frosst and Geoffrey Hinton, in the paper Dynamic Routing Between Capsules.