Mean Teacher is a semi-supervised learning method that also learns from unlabeled images by using as targets the predictions of a "teacher" model built by averaging the weights of the model being trained. It was proposed in 2017 by Tarvainen and Valpola at The Curious AI Company.
It builds on "consistency regularization", which trains a model so that its prediction does not change when the same image is slightly altered. The Π-model and Temporal Ensembling used as targets another prediction from the same model or the average of predictions from past epochs. Mean Teacher improved on this by making the model that produces the targets itself better.
The mechanism runs two models side by side.
- Student model: The model trained in the usual way. Its weights are updated so that it matches the labels on labeled images and the teacher's predictions on all images.
- Teacher model: Same architecture as the student, with weights equal to an exponential moving average of the student's weights. It is not trained; each time the student takes a step, its weights move slightly toward the student's.
As an analogy, the teacher is "the average of the student over the last few thousand steps". The student's weights at any single step fluctuate with mini-batch bias, but averaging cancels out the fluctuations and yields more accurate predictions. Using these stable predictions as targets lets the student learn from good targets, and the improved student in turn improves the teacher, creating a virtuous cycle.
In the paper, with the same network as Temporal Ensembling, it reached a 4.35% error rate on SVHN with 250 labels. This is lower than the 4.42% that Temporal Ensembling achieved with 1,000 labels. The idea of building the teacher from averaged weights was later adopted for the target network in self-supervised methods such as BYOL and DINO.

