Skip to main content
QUICK REVIEW

[Paper Review] On the Pros and Cons of Momentum Encoder in Self-Supervised Visual Representation Learning

Trung Pham, Chaoning Zhang|arXiv (Cornell University)|Aug 11, 2022
Digital Imaging for Blood DiseasesComputer Science5 citations
TL;DR

This paper investigates the role of momentum encoders in self-supervised visual representation learning and proposes projector-only momentum as a more efficient alternative to full-network momentum. By analyzing gradient instability in deeper layers, the authors show that momentum applied only to the final projector—rather than the entire encoder—maintains performance gains while reducing computational cost by avoiding double forward passes on the backbone.

ABSTRACT

Exponential Moving Average (EMA or momentum) is widely used in modern self-supervised learning (SSL) approaches, such as MoCo, for enhancing performance. We demonstrate that such momentum can also be plugged into momentum-free SSL frameworks, such as SimCLR, for a performance boost. Despite its wide use as a fundamental component in modern SSL frameworks, the benefit caused by momentum is not well understood. We find that its success can be at least partly attributed to the stability effect. In the first attempt, we analyze how EMA affects each part of the encoder and reveal that the portion near the encoder's input plays an insignificant role while the latter parts have much more influence. By monitoring the gradient of the overall loss with respect to the output of each block in the encoder, we observe that the final layers tend to fluctuate much more than other layers during backpropagation, i.e. less stability. Interestingly, we show that using EMA to the final part of the SSL encoder, i.e. projector, instead of the whole deep network encoder can give comparable or preferable performance. Our proposed projector-only momentum helps maintain the benefit of EMA but avoids the double forward computation.

Motivation & Objective

  • To understand the empirical benefits of momentum encoders in self-supervised learning beyond existing motivations.
  • To investigate whether momentum's performance gain stems from stability, particularly in deeper network layers.
  • To reduce the computational overhead of momentum by isolating it to the projector instead of the full encoder.
  • To validate that projector-only momentum achieves comparable or better performance with significantly reduced forward computation.

Proposed method

  • Dissect the momentum encoder into individual blocks of the backbone and analyze gradient fluctuations across layers.
  • Monitor the gradient of the overall loss with respect to each block's output to quantify instability.
  • Propose a projector-only momentum mechanism where only the final MLP projector uses EMA, while the backbone weights are shared.
  • Apply batch normalization (BN) to the final layers (block 4 and projector) to further stabilize training.
  • Compare linear evaluation accuracy between full EMA (e.g., BYOL), projector-only EMA, and baseline models on CIFAR-10 and CIFAR-100.
  • Visualize filter weights over training steps to demonstrate stability with and without EMA.

Experimental results

Research questions

  • RQ1What is the primary mechanism behind the performance gain of momentum encoders in self-supervised learning?
  • RQ2How does the influence of momentum vary across different stages of the encoder network?
  • RQ3Can the performance benefit of momentum be preserved while reducing computational cost?
  • RQ4Is it possible to apply momentum only to the projector without sacrificing performance?
  • RQ5How does batch normalization interact with projector-only momentum to improve training stability?

Key findings

  • The performance gain from momentum is largely due to improved training stability, particularly in the final layers of the encoder.
  • Gradient fluctuations are significantly higher in the final layers (e.g., block 4 and projector), indicating lower stability, which momentum helps mitigate.
  • Projector-only momentum achieves 88.45% linear evaluation accuracy on CIFAR-100, matching the baseline BYOL performance while avoiding double forward passes on the backbone.
  • Applying batch normalization to the output of block 4 and the projector further improves projector-only EMA, achieving 88.45% accuracy—nearly matching the full BYOL baseline.
  • Visualizations show that without momentum, filters exhibit unstable spikes (e.g., at step ~10k), while EMA leads to consistently smooth learning curves.
  • Momentum applied to early encoder stages has minimal impact, confirming that the final layers are the primary source of benefit.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.