AI Glossary / Deep learning / Advanced
Capsule neural network
Definition
A capsule neural network organizes groups of neurons into capsules that represent entities and their properties. Instead of passing only a single activation, a capsule can pass a structured collection of values. Connections between capsules aim to preserve useful relationships between parts and wholes. The influential vector-capsule architecture uses an activity vector's length to express entity presence and its direction to encode properties, with dynamic routing based on agreement between predictions.
What it means
Recognizing several features is not always enough to recognize a meaningful object. Their arrangement also matters. A capsule approach seeks to describe both what might be present and how its properties relate to those of a larger entity.
For a beginner, the useful distinction is between “a feature fired” and “a feature suggests an object with these properties.” Those properties are learned representations, however. One should not assume that every coordinate automatically acquires a convenient human label such as rotation or width. Capsule networks are an architectural family rather than one fixed model with guaranteed behavior.
How it works
In the vector-capsule formulation, a lower capsule's output is transformed into a prediction for a possible higher capsule. Predictions are combined using routing coefficients. A squashing operation controls the magnitude of the resulting output.
Dynamic routing repeatedly adjusts the coefficients according to how well the lower capsules' predictions agree with a higher capsule's output. More compatible predictions receive stronger routing towards that candidate. The learned transformation weights and the input-dependent routing coefficients play different roles.
This entry uses that formulation to explain the core idea. Other capsule designs use different representations and routing methods, so a description of one implementation should not be treated as the specification for all capsule networks.
Three practical examples
1. Shape research: an image team tests whether modeling relationships between small visual components helps distinguish intact symbols from rearranged versions containing similar components.
2. Overlap experiments: students construct images with two overlapping characters and compare a capsule model with a conventional image classifier under the same training and evaluation conditions.
3. Representation inspection: researchers vary an object's orientation in controlled images and examine changes in capsule outputs, checking whether useful structure appears rather than assigning meanings to coordinates in advance.
Think of it this way
Think of several witnesses describing not only a possible vehicle but also where its wheels and body should be. Consistent descriptions strengthen a shared interpretation. The analogy ends there: capsules do not reason as people do, and numerical agreement can still support a mistaken interpretation. Learning, input quality, and the architecture constrain what the network can represent.
Worked example
Consider two lower capsules making simplified two-dimensional predictions for the same higher capsule. Their prediction vectors are (2, 0) and (2, 0). If each contributes with coefficient 0.5, their weighted sum is (2, 0), whose length is 2.
Now change the second prediction to (−2, 0), keeping the coefficients unchanged. The weighted sum becomes (0, 0). Strong individual predictions cancel because their directions disagree.
For the agreeing sum, the vector-capsule squashing formula produces length 2 squared divided by (1 + 2 squared), or 4/5 = 0.8, while preserving its direction. A zero sum produces a zero output by the usual continuous definition.
This small calculation illustrates agreement and squashing. It omits learned transformations, other candidate parents, iterative coefficient updates, and training. It therefore cannot establish how a complete network would classify an image, nor whether its reported presence value is empirically calibrated.
Illustrative case study
Fictional case: Shape Pier evaluates a capsule model for sorting printed symbols photographed at different angles. Its first demonstration looks convincing because the test pictures resemble the controlled training setup. The team then creates separate sets involving unfamiliar backgrounds, changed lighting, partial occlusion, and rearranged components.
It records which changes each model handles, using a convolutional baseline trained with comparable data. The capsule approach is assessed alongside inference time and maintenance effort. No performance advantage is claimed. The case shows why a plausible architectural motivation needs task-specific evidence before it becomes a production recommendation.
Common misconceptions and mistakes
Capsules are not physical containers or a requirement to package software into separate services. The name refers to groups of neural units and their representation.
Routing is not simply a synonym for ordinary backpropagation. Routing chooses input-dependent contributions between capsules, while training adjusts model parameters using a learning procedure.
Preserving information about pose does not guarantee recognition under every possible transformation. Evaluate the transformations that matter for the intended application.
Finally, favorable results on a particular research dataset do not establish that capsule networks outperform every alternative, or that their outputs provide a complete explanation of a decision.
Business use
For business teams, capsule networks are most usefully considered as a research option when relationships among visual parts appear relevant to an unresolved problem. Define that problem concretely: for example, confusing a valid arrangement with a rearranged lookalike.
Compare architectures using the same data boundaries and appropriate baselines. Include difficult examples that represent actual operating conditions, and measure runtime as well as predictive performance. A more elaborate representation is worthwhile only when its benefits justify the added implementation and evaluation effort for the particular workflow.
People also ask
Is a capsule the same as a single neuron?
No. It is a group of units whose combined output represents an entity and its properties.
Does a capsule network avoid convolution entirely?
Not necessarily. Capsule architectures can include convolutional processing and convolutional capsule layers.
Are capsule coordinates automatically understandable?
No. Their meanings depend on learning and design; interpretation requires inspection and evidence.
Check your understanding
Two lower capsules produce large predictions pointing in opposite directions for the same parent. Does their size alone imply strong agreement?
Answer: No. Agreement concerns compatibility, including direction in the vector formulation. Their combined contribution can cancel, as in the worked example, despite large individual magnitudes.
Related terms
- Convolutional neural network
- Pose
- Dynamic routing
- routing by agreement
- feature representation
- equivariance
- vector activation
- part–whole relationship
Learn next
draw two possible arrangements containing the same component shapes and describe why their identities differ. Then inspect the dynamic-routing equations in the original paper, separating learned transformation matrices from coefficients recalculated for each input. Compare against a simple convolutional baseline on a controlled dataset.
More in Deep learning
- Bidirectional associative memory - Bidirectional associative memory, or BAM, is a neural associative-memory model that stores relationships between pairs of patterns and can use a cue on...
- Boltzmann Machine Network - A Boltzmann machine network is a stochastic neural model that assigns probabilities to configurations through an energy function.
- Calibration layer - A calibration layer is an adjustment applied after a model produces predictions, intended to make those predictions better agree with observed outcomes.
- Cellular neural network - A cellular neural network is a network of locally connected processing cells whose changing states collectively process information.
- CLEVER score - The CLEVER score is a statistical measure intended to estimate a neural classifier's local robustness to adversarial input changes.
- Committee machine - A committee machine combines the outputs of several predictive models into one overall response.
Sources
Sabour, Frosst, and Hinton, Dynamic Routing Between Capsules: https://arxiv.org/html/1710.09829v2 — primary full text consulted for vector capsules, squashing, and routing by agreement. Publication record: https://arxiv.org/abs/1710.09829. The technical scope follows this architecture; examples, calculations, fictional case, and evaluation suggestions are original teaching material. No claim of universal superiority or automatic interpretability is made.
Previous: Capacity Scaling Minimum Cost Flow Next: CAPTCHA