Equivariance, invariance and symmetry groups
10 questions on equivariance versus invariance, transformations of outputs, segmentation, orientation and the four rules that define a symmetry group.
- 10 questions
- Stopwatch
- Instant feedback
Sample questions
Play now ↑Answers stay hidden. Start the quiz to play them.
Sample 1
A network reports the orientation angle of an object in an image. The object is rotated by 30 degrees. What should an equivariant network report?
- The same angle as before
- Zero
- The original angle increased by 30 degrees
How it works
- One question per screen. An answer is final once sent.
- You see right away whether you were right, with a short explanation.
- The stopwatch runs: on equal scores, the faster player ranks first.
- Only your best attempt counts, so replaying is never risky.
About this quiz
Move a cat across a photograph and a good classifier still says cat. Move the cat across the photograph and a good segmentation program, which paints every pixel that belongs to the cat, should move its painted region by exactly the same amount. Both programs respect the symmetry of shifting the picture, yet they respond in opposite ways: one output stays the same, the other follows the input. The first behaviour is called invariance, the second equivariance, and telling them apart is one of the most useful ideas in the design of neural networks.
This quiz builds the distinction from scenarios. You will decide which of several tasks calls for an output that does not change and which calls for one that moves with the input. You will see how the output does not always change in the same way as the input: a coarse segmentation map shifts by fewer cells than the image shifts pixels, and a program that measures the orientation of an object responds to a rotation by adding to a single number. You will also see how invariance fits inside equivariance as the special case in which the output transformation does nothing.
The second theme is the mathematical language of symmetry. Transformations that leave a property unchanged form a structure called a group, defined by four plain rules. The quiz tests these rules with everyday examples, such as the turns of a square and the shifts of a picture, and asks you to spot a set of transformations that fails the test. This vocabulary is the entrance to geometric deep learning, an approach that builds symmetries directly into network design.
Common slips are worth anticipating. People often use invariance when they need equivariance, for example by demanding that a segmentation never change when the object moves. They forget that the output transformation can differ from the input transformation. And they treat the group rules as abstract decoration, when they are exactly the properties that make symmetries composable and reversible. Equivariance also appears well beyond pictures. A model of molecules should give a prediction that does not depend on how the atoms are numbered, a model of a physical system should not care which way the coordinate axes point, and a model of a road map should treat the junctions the same however they are listed. In each case the designer asks the same two questions: what is the symmetry, and should the output stay put or move along with the input? Having the vocabulary to ask them is the first step towards answering them well.
The quiz suits learners meeting convolutional networks, segmentation or geometric deep learning, and it needs no mathematics beyond following simple examples. There are 10 questions, each with an explanation, and it takes about four minutes.
Questions and answers
›How long does the quiz take?
About 3 to 4 minutes for 10 questions, at roughly 20 seconds each. An explanation follows every answer, so the quiz doubles as a short introduction to the topic.
›Do I need to know group theory?
No. The quiz explains the four rules in plain language and applies them to examples such as turning a square and sliding a picture. If you can follow what happens when you do one transformation and then another, you can answer every question.
›What is the difference between invariance and equivariance?
With invariance, the output is unchanged when the input is transformed, as when a classifier gives the same label for a shifted object. With equivariance, the output is transformed too, in a corresponding way, as when a segmentation map shifts along with the object. The right choice depends on what the task wants to report.
›Why is invariance a special case of equivariance?
Equivariance says that transforming the input and then applying the network gives the same result as applying the network and then transforming the output. If the transformation of the output is the identity, meaning that it does nothing, the statement reduces to the output staying the same. That is exactly invariance.
›Can the output transformation differ from the input transformation?
Yes. If the output lives in a different space, the corresponding transformation there can be different. A segmentation map with lower resolution moves by a smaller number of cells than the image moves in pixels. A single number describing orientation is increased or decreased when the object is rotated. In all such cases, the outputs transform in a predictable way.
›What is a symmetry?
It is a transformation that leaves some property unchanged. Sliding a picture does not change what objects it contains, and turning a square by a quarter turn does not change its shape. The collection of all transformations that preserve a given property forms a group, which is what lets symmetries be combined and undone in an orderly way.
›What are the four rules of a group?
First, closure: combining any two elements gives another element of the set. Second, associativity: when combining three, the grouping of the steps does not matter. Third, an identity element exists that changes nothing. Fourth, every element has an inverse that undoes it. Together they guarantee that transformations can be chained and reversed.
›Why does this matter for neural networks?
If you know that a task has a symmetry, you can design the network so that its behaviour respects it automatically, which saves data and improves generalisation. The alternative is to leave the network free and to show it enough transformed examples that it discovers the symmetry for itself, which costs far more data and still gives no guarantee. Convolutional networks do this for shifts of an image. The field that studies how to do it systematically for many symmetries is called geometric deep learning.