TL;DR
Most machine learning systems learn one large function from one large dataset. This paper asks a different question: if the data was produced by several separate processes, can a model find those processes on its own, without labels? The authors assume each process is an independent causal mechanism, a transformation that does not depend on the others. They train a small committee of networks called experts. For each image, the experts compete, and only the best match is updated, so each expert ends up undoing one transformation. The learned inverses work on digits they were never shown in their exact form, and they carry over to a different alphabet of characters.
Builds on: Causal Inference, Directed Acyclic Graph, Mixture of Experts, Generative Adversarial Network · Leads to: Transfer Learning, Domain Adaptation, Out-of-Distribution Generalization
Why it mattered
The paper sits where three ideas meet: causal modeling, which says that a system is a chain of mechanisms; mixture-of-experts models, which split a task among specialists; and adversarial training, which gives a learning signal without labels. Its claim is that a model built from modules that each capture one mechanism should be easier to reuse. A change in one part of the world (a new lighting setup, a new font) then needs only one module to change. The paper frames this as a route to transfer and lifelong learning, not as a finished product. Its own related-work section places it next to large expert systems such as a mixture of 1000 experts with a gate that selects only a few for each input, and next to unsupervised domain adaptation methods that usually need some labeled data.
History
Mixtures of experts date to the early 1990s, when models that split a task among several local specialists were proposed and then extended with gating networks. Generative adversarial networks, introduced in 2014, gave a way to train a generator without labels by pitting it against a discriminator. This paper, posted in 2017, combined the two: the expert competition from mixtures of experts, and the adversarial discriminator as the score. The independent mechanisms idea was already part of causal modeling; the paper's contribution is to learn such mechanisms from unlabeled deep-network data.
The problem
Start with the causal view. A joint distribution over variables can often be written as a product of conditional distributions, one per variable, each conditioned on that variable's parents in a directed graph:
If the graph is causal, each factor is a mechanism: the process that produces from its causes. The independent mechanisms assumption says these factors are autonomous. Knowing one of them tells you nothing about another, and if one changes (because of a distribution shift), the others tend to stay the same. This is why such a model can transfer: the parts that did not change are still valid.
Now the learning problem. Suppose a clean dataset (for example, handwritten digits) is passed through several unknown mechanisms , such as shifts, contrast inversions and added noise. What you observe is one big pile of transformed images with no record of which mechanism made each one. The job is to recover the mechanisms, or at least their inverses, and to do it without labels and without knowing .
Two things make this hard. The first is that the data is mixed: a point does not tell you which mechanism produced it. The second is that the number of mechanisms is not given in advance, and clustering methods have the same problem.
How it works
The paper's method, traced on a tiny toy problem. Canonical data is the value 3 (and a few values close to it). Mechanism adds 4 to each value, and mechanism subtracts 4. The observed pile holds values such as 7 (from ) and (from ). Two experts start near the identity map: and . A score stands in for the discriminator: values near the canonical data score high.
- Draw an observed point. Take one transformed value, . Its true origin is , and its ideal inverse is "subtract 4."
- Every expert answers. and . Both experts see the point in parallel.
- Score each answer. and . Check: , .
- The best-scoring expert wins. scores higher, so is the winner. Only is updated, to push its output further toward the canonical data. is left unchanged.
- Draw another point. Take , from . Now with score , and with score . wins this time.
- Repeat with the discriminator. In the full method the score is learned: a discriminator is trained to tell canonical samples from expert outputs, and the winning expert is trained to fool it. The toy fixes the score, so it shows only the competition.
- Read the result. After many rounds, each expert wins mostly the points from one mechanism and undoes it. Nobody told the experts which mechanism was which. The competition sorted them out.
The diagram shows one round.
flowchart LR X[Transformed point x'] --> E1[Expert 1] X --> E2[Expert 2] X --> EN[Expert N'] E1 --> S[Score c from discriminator] E2 --> S EN --> S S --> W[Highest score wins] W --> U[Update only the winner]
Worked examples
Use the toy from How it works. Canonical data is 3. The score is . The experts are and . The observed point is .
- Expert 1 outputs .
- Expert 2 outputs .
- Score for expert 1: .
- Score for expert 2: .
- Expert 2 has the higher score, , so expert 2 wins.
- Only expert 2 gets an update. Expert 1 keeps its parameters.
Interpretation: the point is closer to the canonical value when expert 2 shifts it down, so expert 2 is the one that takes it.
The paper's test has 10 transformations. Suppose only 6 experts are trained on them.
- If each expert covered exactly one transformation, 10 experts would be needed, one per transformation.
- With 6 experts, each covering at most one transformation, only 6 transformations can be handled alone. The other transformations must share an expert.
- One split that fits: 4 experts each take two transformations, and 2 experts each take one. Check: transformations, using experts.
- The paper reports this pattern: with 6 experts, a few experts are assigned to multiple tasks, and the pretrained classifier does not exceed 72 percent accuracy on the processed digits.
Interpretation: when there are fewer experts than mechanisms, sharing is forced, and a shared expert cannot undo either transformation as cleanly as a specialist.
The paper's main test uses MNIST digits transformed by ten mechanisms: eight shifts of four pixels, a contrast inversion, and added noise. A pretrained classifier that reads clean digits reaches about 99 percent accuracy on them. On the transformed digits, the same classifier reaches only about 40 percent. The question is how much of the gap the experts close.
- At the start, the experts are trained to act as the identity, so their output is close to the transformed input. The classifier's accuracy is about 40 percent, the same as no processing, because the experts still leave the input almost unchanged.
- As training continues, the winning experts learn to undo their transformations. The classifier's accuracy on the processed digits rises.
- The paper reports that after about 600 iterations, the accuracy has almost reached the clean-digit upper bound of about 99 percent.
- The starting point matters: without the identity initialization, several experts fail to specialize.
Interpretation: the experts recover the information the classifier needs, and they do it with no labels. The gain is measured against a classifier that was never retrained on transformed digits.
Try it: the transformed digits start at 40 percent and the clean upper bound is about 99 percent. If the processed digits reach 90 percent, what fraction of the gap is closed? Answer: the gap is points, the closed part is points, and , so about 85 percent of the gap is closed.
The math
A mechanism is a function . Applying it to a distribution gives a new one. This is the pushforward: draw from , output , and the outputs form a distribution we call .
Given a canonical distribution , mechanisms with , and experts with parameters , the method maximizes a score that is high on the support of and low elsewhere. For each observed point , only the expert with the highest score is updated.
Step 1 in symbols: the observed data
The observed points come from the mixture , with each point drawn from one of the . The canonical sample is drawn separately from . The learner never sees which a point came from.
Step 2 in symbols: the winner
For an observed point , each expert gives a score . The winner is
and the overall training objective is
In words: the expected value, over observed points, of the best expert's score. Only receives a gradient step for that point. This is what drives specialization.
Step 3 in symbols: the discriminator
In the paper's experiments is a discriminator , a network that outputs a number between 0 and 1. It is trained to give canonical samples a high value and expert outputs a low value:
The first term rewards recognizing canonical data. The second term punishes the outputs of all experts, not only the winner, so that the discriminator cannot be fooled by a single expert alone. The winning expert is updated to raise its own score, which means it is trained to make its output look like canonical data.
Results
The main findings, with the paper's own numbers.
- Specialization. In 7 of 10 runs, each expert correctly inverted exactly one mechanism. In the other 3 runs the result was only slightly worse: one expert covered two tasks, one covered none, and the rest still covered one task each. Figure 4 plots each expert's discriminator score on each of the ten tasks, so a specialized expert shows a high score on one task.
- Classifier accuracy. On the transformed test digits the classifier reaches about 40 percent. On the digits after the experts, accuracy approaches the clean-digit level of about 99 percent. The curve starts at about 40 percent because the experts begin as near-identity maps.
- Generalization. Each expert, trained only on MNIST, applies the same transformation to Omniglot letters it never saw, across the transformations the paper tests.
- Combinations. Experts trained on single transformations can undo three transformations applied at once, when the user supplies which ones were used.
- Baseline. A single network with 32, 64 or 128 filters per layer, trained with the same settings, did not learn more than one inverse mechanism. It did well on contrast inversion and poorly on the other tasks.
- Few examples. When the canonical sample shrinks from 30,000 examples to 64, all experts still specialize and the classifier reaches 96 percent accuracy, though the outputs are less clean and less sharp.
What the results do not show: the tests use image transformations that are simple and known, on MNIST and Omniglot. The paper gives no automatic rule for the number of experts. The method learns inverse mechanisms, and the authors say a forward version appears feasible but is not shown here.
Common mistakes and tradeoffs
It is tempting to think the experts are clusters of images that look alike. In fact they cluster by transformation: the paper's Figure 5 shows how much of each transformation each expert wins on the test digits.
It is tempting to think the method measures how independent the mechanisms are and then minimizes that. In fact the training objective has no explicit independence term; the paper analyzes independence separately, in Appendix D, using algorithmic complexity. The competition works when the data contains independent mechanisms to begin with, because it rewards each expert for specializing on the points it can handle best.
It is tempting to think more experts is always safer. In fact with too many experts, for most tasks only one expert wins all the examples and the rest do not specialize, so they can be removed (the paper's test uses 16 experts for 10 tasks). With too few, some experts must cover two tasks at once, which lowers accuracy (with 6 experts for 10 tasks, the classifier accuracy does not exceed 72 percent). The paper gives no automatic rule for choosing the number; it can be found only by trying values.
When to use this approach: when data is known or suspected to come from several separate processes, labels are scarce, and you want modules that can be reused. When not to use it: when the transformations are not independent, when you can afford labels or a dedicated domain adaptation method, or when the cost of evaluating every expert on every input is too high. The paper notes that evaluation cost grows linearly with the number of experts, though the experts run in parallel. The authors also report that variational autoencoders gave similar results in preliminary experiments, though they focus on adversarial training.
Reading guide
The paper's sections in order, with the lessons each one needs.
- 1 Introduction. Needs Causal Inference, Joint Distribution and Causal Mechanism. The factorization in Equation 1 is the joint distribution written as a product of conditionals.
- 2 Related work. Needs Mixture of Experts, Domain Adaptation and Transfer Learning. The paper contrasts itself with methods that use labels or match feature distributions.
- 3 Method. Needs Generative Adversarial Network and Cross-Entropy Loss. Read the pushforward definition in 3.1 with the math section above, then the competition in 3.2.
- 4 Experiments. Needs Convolutional Neural Network, Batch Normalization and Adam Optimizer. Algorithm 1 is a training loop; the Adam updates are the same as in any deep network.
- 5 Results. Needs Covariate Shift and Out-of-Distribution Generalization to read the generalization claims, and Generative Adversarial Network for how the discriminator score is used.
- Appendix D. Needs Statistical Independence and Conditional Independence. It defines independence of mechanisms through algorithmic complexity, a more formal notion than the one used in training.
Recap
- A joint distribution can be written as a product of mechanisms, each depending on its causes. The independent mechanisms assumption says those pieces are autonomous and can change separately.
- Observed data is a mixture of outputs of unknown mechanisms, with no labels and no record of origin.
- A committee of experts competes for each point. Only the best-scoring expert is updated, which drives each expert to specialize on one mechanism.
- A discriminator provides the score: canonical data scores high, expert outputs score low.
- The learned inverses recover classifier accuracy on MNIST transformations and generalize to Omniglot letters.
Read next: Transfer Learning and Domain Adaptation for the setting this paper aims at, and Out-of-Distribution Generalization for why modules that survive a shift matter.
Check yourself
QuestionRecall: what does the independent mechanisms assumption say about two causal mechanisms in the same graph?Show answer
It says that the mechanisms are autonomous: knowing one gives no information about the other, and if one changes because of a distribution shift, the other tends to stay invariant. This is what lets modules be reused and transferred.
QuestionComputation: in the toy with , which expert wins the point if and ?Show answer
Expert 1 outputs with score . Expert 2 outputs with score . The score is higher, so expert 2 wins.
QuestionWhy: why does the method update only the winning expert, and what would go wrong if every expert were updated for every point?Show answer
Updating only the winner makes the experts specialize: each becomes better at the points it already handles, so the others are free to take other mechanisms. If every expert were updated on every point, they would all converge to the same average behavior, and no expert would learn a single mechanism.
QuestionApplied: a team has unlabeled photos from three cameras that each add a different, known-to-be-independent color shift. They want one module per camera. Which idea from this paper applies, and what should they check first?Show answer
The competitive-expert idea applies: train one expert per camera and let them compete on the mixed photos, with a discriminator against clean reference photos. They should first check that the color shifts really are independent and that the number of experts is not much larger or smaller than three, because the paper shows both errors hurt specialization.
Sources
- Parascandolo, G., Kilbertus, N., Rojas-Carulla, M., and Schölkopf, B. Learning Independent Causal Mechanisms. arXiv:1712.00961. https://arxiv.org/abs/1712.00961
- Goodfellow, I., et al. Generative Adversarial Nets. arXiv:1406.2661. https://arxiv.org/abs/1406.2661
- Mixture of experts. Wikipedia. https://en.wikipedia.org/wiki/Mixture_of_experts