MoCo frames contrastive learning as a dictionary look-up problem — a query searches for its matching key in the dictionary while pushing away all other keys. It uses a queue to scale the dictionary to 65,536 entries and a momentum encoder to ensure the features across all keys are highly consistent. This was the first method to let unsupervised pretraining surpass supervised ImageNet pretraining across the board.
0. Notation#
| Symbol | Meaning |
|---|---|
| Original image | |
| Query image (one augmented view of ) | |
| Key image (another augmented view of ) | |
| Query encoder, updated normally via gradient descent | |
| Key encoder, updated via momentum (no gradient backpropagation) | |
| Query feature, dimension | |
| Positive key feature, dimension | |
| -th key in the dictionary (mostly negatives), | |
| Dictionary size (queue length), default 65536 | |
| Feature dimension, default 128 | |
| Batch size, default 256 | |
| Momentum coefficient, default 0.999 | |
| Temperature parameter, default 0.07 | |
| Parameters of | |
| Parameters of |
MoCo’s terminology: In MoCo’s dictionary look-up framing, the usual “anchor / positive / negative” nomenclature is replaced by “query / key (positive) / key (negative).” There is only one query, and a whole dictionary of keys.
1. Motivation: Why Visual Unsupervised Learning Lagged Behind NLP#
1.1 The landscape in 2019#
- NLP: BERT and GPT had already shown that large-scale unsupervised pretraining followed by light fine-tuning works extremely well. A key enabler — text is a discrete signal space (words, subwords), which naturally lends itself to building tokenized dictionaries.
- CV: Visual signals live in a continuous, high-dimensional space. The signal is dense and semantically uncompressed, making it much harder to build a clean dictionary the way NLP does. As a result, unsupervised pretraining in vision consistently lagged behind supervised pretraining.
1.2 What contrastive learning needs from a negative dictionary#
Contrastive learning (especially the instance discrimination pretext task) boils down to: given a query , make it similar to the positive key and dissimilar to all negative keys . This is essentially a -way classification problem — one positive vs negatives.
A good negative dictionary needs two properties:
| Property | Requirement | Failure mode |
|---|---|---|
| Large | must be big enough to cover varied visual features | Small lets the model take shortcuts (e.g. relying on color), leading to poor generalization |
| Consistent | All keys should come from the same or very similar encoders | Inconsistent encoders let the model learn “find keys produced by the same encoder” as a shortcut |
Every method before MoCo was limited by at least one of these:
| Method | Large dictionary? | Consistent? | Bottleneck |
|---|---|---|---|
| End-to-end (SimCLR lineage) | No | Yes | Batch size limits , max 8192 (needs TPU) |
| Memory Bank (InstDisc) | Yes (1.28M) | No | Updated only once per epoch, features are stale and highly inconsistent |
| MoCo | Yes | Yes | Queue decouples from , momentum encoder guarantees consistency |
2. Core Framework: Contrastive Learning as Dictionary Look-Up#
2.1 The dictionary look-up perspective#
This is MoCo’s most elegant abstraction. Instead of thinking of contrastive learning as “pull positives together, push negatives apart,” the paper reframes it as a dictionary look-up task:
Given a query q (the encoded feature of the current image)
Look up the key k+ that best matches q (the feature from another view of the same image)
All other keys in the dictionary are non-matchesplaintextThe objective — InfoNCE loss:
The numerator is the similarity between query and positive, the denominator is the sum of similarities with all keys in the dictionary (1 positive + negatives).
2.2 Framework diagram (paper Figure 1)#
+------------------+ +------------------+
| Query encoder | | Key encoder |
| f_q | | f_k |
| gradient update| | momentum update |
+--------+---------+ +--------+---------+
| q | k
| |
v v
+---------------------------------------------+
| Contrastive loss (InfoNCE) |
| q-k+ high q-k_i low (i != +) |
+---------------------------------------------+
|
v
+------------+
| Queue |
| (dictionary)|
| K = 65536 |
+------------+
enqueue(k) -> ->
<- <- dequeue(oldest)plaintext3. Three Key Design Choices#
3.1 Queue: Decoupling Dictionary Size from Batch Size — Solving “Dictionary Must Be Large”#
Problem: In end-to-end methods (SimCLR), negatives come only from the current batch, so dictionary size equals batch size . Growing means growing the batch, which blows up memory and makes optimization harder.
MoCo’s solution: Maintain a FIFO queue as the dictionary:
- Each training step, the current batch of keys is enqueued
- The oldest keys are dequeued from the tail
- Queue length , far larger than batch size
Key benefit: Dictionary size and batch size are fully decoupled. can be set arbitrarily large (up to memory limits) without increasing the batch.
Computational cost of the queue:
Most keys in the queue don’t need to be re-encoded every iteration — they are reused from previous batches. Only new keys are encoded per step, while old keys are reused directly. This makes maintaining a large dictionary computationally cheap.
A nice side effect: The queue continuously evicts the oldest keys. From a consistency standpoint, the oldest keys were produced by an encoder from many steps ago and have drifted the most — evicting them actually improves overall dictionary consistency.
3.2 Momentum Encoder: Solving “Dictionary Must Be Consistent”#
This is MoCo’s most elegant and impactful contribution.
The problem#
If the key encoder uses regular gradient updates like the query encoder , it changes quickly. The queue holds 65,536 keys coming from the past 256 batches — each batch was encoded by a slightly different . The result: keys in the dictionary come from 65,536 different encoding spaces that are not comparable. The model degenerates into learning a shortcut: “find keys from a similar encoder.”
The solution: momentum update#
where , very close to 1.
What this means:
| value | Information absorbed from per step | update speed |
|---|---|---|
| 0.999 | 0.1% (1 per mille) | Extremely slow — very smooth |
| 0.99 | 1% | Moderate |
| 0.9 | 10% | Fast — close to end-to-end |
Intuition: With , a key stays in the queue for steps. Over those 256 steps, changes minimally (it takes in only 1 per mille of per step). So all 65,536 keys in the queue come from nearly the same encoding space — dictionary consistency is very high.
Mathematical intuition (moving average): The momentum update is essentially an exponentially weighted moving average of ‘s history. means is a smoothed version of over roughly the past 1,000 steps. Since itself changes slowly (bounded by the learning rate), changes even less.
Inspiration: DQN’s target network. The original paper’s Related Work section explicitly cites the target network from DQN (Deep Q-Network, Mnih et al., 2015) as the inspiration.
Terminology clarification: DQN specifically refers to the concrete algorithm proposed in the Mnih et al. Nature paper — using a deep convolutional network to approximate the Q-function, combined with experience replay and a target network, to play Atari games. It is not a catch-all for “the deep Q-Learning family” (which includes many variants like Double DQN, Dueling DQN, Rainbow, etc.), but rather the pioneering instance within that space.
DQN maintains two Q-networks: an online network (normal gradient updates) and a target network (whose parameters are hard-copied from online every steps) to stabilize TD target computation. MoCo upgrades “hard copy” to “soft momentum” — instead of copying every steps, it shifts by only 1 per mille () at every step, replacing a piecewise constant function with an exponential moving average. Smoother, more elegant.
Background: From Q-Learning to DQN (a crash course in RL)
If you’re not familiar with reinforcement learning, here’s a quick explanation of what DQN’s target network actually solves:
What Q-Learning is: A model-free RL algorithm that learns the Q-function:
Core update (Bellman equation):
In plain terms: take an action, get a reward , enter a new state . The estimated best future return is — that’s the TD target. The gap between it and the current tells you how to correct.
Traditional Q-Learning’s bottleneck: It uses a table (Q-table) to store Q-values for all pairs. When the state space explodes (e.g., Atari game pixels), the table won’t fit.
Deep Q-Learning: Not a single algorithm, but a family of methods built around one core idea — use a deep neural network to approximate the Q-function instead of a table. The loss function is the MSE between the TD target and the current Q-value:
But this introduces two critical problems:
Problem Cause Consequence Highly correlated samples Consecutive frames are strongly correlated, not i.i.d. Gradient updates are unstable, the network easily diverges Moving target The TD target uses with the same parameters as the being updated Chasing a moving target — like a dog chasing its own tail
DQN (Deep Q-Network): Mnih et al. 2015 Nature, the most classic concrete algorithm in the deep Q-Learning family. It solves the two problems above with two innovations:
Innovation 1: Experience Replay — Solving “highly correlated samples”
Store each step in a replay buffer. During learning, sample a mini-batch randomly — this breaks the correlation between consecutive frames, making the data approximately i.i.d.
Innovation 2: Target Network — Solving “moving target” (this is the inspiration for MoCo’s momentum encoder)
Maintain two Q-networks:
- Online network : normal gradient updates
- Target network : hard-copied from online every steps
In the loss function, the TD target uses while the current estimate uses . Since stays fixed for steps, the TD target stops moving every step — training stabilizes.
plaintextParameter changes during training (assuming C=100): step: 0 100 200 300 400 500 ... theta: ████████████████████████████████████ (gradient update every step) theta-: ████________████________████________ (hard copy every C steps)Term hierarchy summary:
plaintextQ-Learning +-- Uses a table for Q-values, Bellman equation iterative update Deep Q-Learning +-- Method family: uses neural networks to approximate the Q-function | | | +-- DQN (Mnih 2015) <- Pioneer: Experience Replay + Target Network | +-- Double DQN (2016) <- Fixes Q-value overestimation | +-- Dueling DQN (2016) <- Separates V(s) and A(s,a) | +-- Prioritized ER <- Prioritized replay of important samples | +-- Rainbow (2018) <- All of the above combined | +-- ... more variantsDQN is a concrete instance of deep Q-Learning, just like ResNet is a concrete instance of CNN architectures.
Back to MoCo’s comparison:
DQN’s Target Network MoCo’s Momentum Encoder Two networks online Q-network + target Q-network query encoder + key encoder Online update Gradient descent Gradient descent Target update Hard copy: every steps Soft momentum: every step Parameter curve Step function (piecewise constant) Smooth curve (exponential moving average) Purpose Stabilize the TD target Maintain key consistency across the dictionary DQN’s hard copy means that by step , is already steps behind and the gap to the target is large. MoCo’s soft momentum moves only 1 per mille per step — all keys always come from nearly the same encoding space. A step function turned into a smooth curve.
Sensitivity experiment for (paper Table 3)#
| ImageNet Top-1 | Note | |
|---|---|---|
| 0.9 | Significant drop | Too fast, consistency breaks |
| 0.99 | ~58% | Works, but not optimal |
| 0.999 | 60.6% | Optimal |
| 0.9999 | Slight drop | Too slow, barely learns new information |
Conclusion: has a sweet spot — too fast breaks consistency, too slow and the encoder can’t learn new information. is the optimal balance.
3.3 Shuffling BN: Preventing BatchNorm Information Leakage#
Warning: This is a critical implementation detail that many online summaries completely miss. It’s also central to understanding MoCo’s engineering.
How BN causes “cheating” in contrastive learning#
The BN cheating mechanism is covered in detail in the SimCLR post. In short: per-GPU BatchNorm statistics embed a “GPU fingerprint” into features; since both views of an image land on the same GPU, the model learns to match BN offsets instead of learning semantics. Pretext accuracy looks great, representation quality is garbage.
MoCo’s Shuffle BN#
MoCo’s solution is elegant — shuffle the samples only during the key encoder’s forward pass:
Multi-GPU training (assuming 8 GPUs):
Step 1: Compute queries normally
GPU-0: x_q[0] -> f_q -> q[0] (local BN statistics)
GPU-1: x_q[1] -> f_q -> q[1]
...
Step 2: Shuffle the key samples
Original: GPU-0 has x_k[0:32], GPU-1 has x_k[32:64], ...
After shuffle: each GPU gets a mix of samples from different GPUs
Step 3: Compute keys using the shuffled samples
GPU-0: x_k_shuffled[0] -> f_k -> k_shuffled[0] (BN statistics from mixed samples)
...
Step 4: Unshuffle keys to restore the original order
k = unshuffle(k_shuffled) # restore the order matching q
Step 5: Compute the loss
loss = InfoNCE(q, k, queue)plaintextWhy this fixes the leak:
- The key’s BN statistics come from cross-GPU mixed samples, no longer from “the same GPU batch that produced the query.”
- The BN statistics for query and positive key are decoupled — the GPU fingerprint is no longer correlated.
- The query encoder’s BN is left normal (no shuffle), since the query side doesn’t need this defense.
Comparison with other BN strategies#
| Method | BN strategy | Cost |
|---|---|---|
| MoCo | Shuffle BN | Requires extra shuffle/unshuffle operations |
| SimCLR | Global BN (sync across GPUs) | Requires all-reduce communication |
| CPC v2 | Layer Norm instead of BN | LN is generally less effective than BN on CNNs |
A subtle point about Shuffle BN: Shuffle BN does not completely eliminate the leak — samples on the same GPU after shuffling still have some statistical correlation. But it reduces the leakage to a level the model can’t exploit. From the paper’s experiments, removing Shuffle BN causes a significant performance drop, showing it’s critical to MoCo’s success.
4. Loss Function: InfoNCE#
MoCo uses the InfoNCE loss (also called NT-Xent) with negative keys drawn from the queue:
This is a -way softmax cross-entropy — the correct answer is always (position 0), and the other keys are wrong classes. For a full derivation of InfoNCE from NCE, see the [[NCE]] and [[CPC]] posts.
Temperature : MoCo vs SimCLR#
The general role of is explained in the SimCLR post. The MoCo-specific insight is why rather than SimCLR’s :
MoCo’s smaller makes the model more sensitive to hard negatives. This is deliberate: MoCo’s queue holds 65,536 negatives where hard negatives are more prevalent — a smaller prevents the model from being overwhelmed. SimCLR has fewer negatives per batch (at most 8,191), so a larger distributes gradients more evenly. Two different negative strategies, two different optimal temperatures.
5. Algorithm Pseudocode and Implementation Details#
5.1 Complete pseudocode#
Paper Algorithm 1 with line-by-line annotations:
# Initialization: key encoder parameters copied from query encoder
f_k.params = f_q.params
for x in loader: # x: N unlabeled images, N = batch_size = 256
x_q = aug(x) # query augmented view (random crop + color distortion, etc.)
x_k = aug(x) # key augmented view (another random augmentation of the same image)
q = f_q.forward(x_q) # query features, shape NxC (256x128)
k = f_k.forward(x_k) # key features, shape NxC (requires Shuffle BN first)
k = k.detach() # keys don't participate in gradient computation!
# Positive logit: match between each image and its own augmented feature
l_pos = bmm(q.view(N,1,C), k.view(N,C,1)) # -> Nx1
# Negative logit: match between each query and all keys in the queue
l_neg = mm(q.view(N,C), queue.view(C,K)) # -> NxK (256x65536)
# Concatenate: positive is always at position 0
logits = cat([l_pos, l_neg], dim=1) # -> Nx(1+K)
# Ground truth: all zeros! Because the positive is always at position 0
labels = zeros(N) # -> N (all 0)
# InfoNCE = cross-entropy with temperature
loss = CrossEntropyLoss(logits / tau, labels)
# Backpropagation
loss.backward()
update(f_q.params) # only f_q is updated via gradients
# Momentum update of key encoder (no gradients!)
f_k.params = m * f_k.params + (1 - m) * f_q.params
# Update queue: enqueue current batch's keys, dequeue oldest
enqueue(queue, k) # add k (NxC) at the front
dequeue(queue) # pop N oldest from the tailpython5.2 Why ?#
| Aspect | Detail |
|---|---|
| Queue size | 65536 (), roughly 5% of ImageNet’s 1.28M training images |
| Batch size | 256 |
| ratio | 256x — each key lives in the queue for roughly 256 steps on average |
| Feature dimension | 128 |
| Queue memory | (tiny) |
Key clarification: is the dictionary size, not “over 65,000 images”. Some summaries vaguely say “over 60,000 images.” The precise statement: the dictionary holds 65,536 key feature vectors, each encoded by the key encoder from an augmented view of some image. These 65,536 keys come from the most recent 256 batches (each batch has 256 images). Since it’s a sliding window, the 65,536 keys correspond to roughly 65,536 different augmented samples (original images may repeat, but the random augmentations differ each time).
5.3 Implementation Notes from Hand-Written Code#
Common implementation details when writing contrastive learning from scratch:
- Positive logit computation: Use
bmm(batch matrix multiply) to compute per sample, giving an vector - Negative logit computation: Use
mm(matrix multiply) to compute all dot products between all queries and all keys in the queue at once, giving an matrix - The
labels = zeros(N)trick: Sincecatplacesl_posat column 0, the correct class ID for every positive sample is always 0 — so the ground truth is just a zero vector. This avoids building labels per sample.
6. Experimental Results#
6.1 Scaling behavior of three methods (paper Figure 3)#
The paper plots (number of negatives / dictionary size) on the x-axis against ImageNet Top-1 on the y-axis:
| Method | Max | Trend |
|---|---|---|
| End-to-end | At most 1024 (memory-bound) | Stops after 3 points; worse than MoCo at |
| Memory Bank | Up to 65536 | Improves with but always below MoCo (poor consistency) |
| MoCo | 65536 (and beyond) | Steadily improves with ; best at every value |
Core takeaway: MoCo is not only the best performer, but also the most hardware-friendly (works with small batches), and scales the best (can grow without adding GPUs).
6.2 ImageNet linear classification#
Using a frozen pretrained ResNet-50 representation with a single linear classifier:
| Method | Top-1 | Top-5 |
|---|---|---|
| MoCo | 60.6% | — |
| InstDisc | 54.0% | — |
| BigBiGAN | 56.6% | — |
| CMC | 60.0% | 82.3% |
| PIRL | 63.6% | — |
| CPC v2 | 63.8% | — |
| SimCLR (later, Feb 2020) | 69.3% | — |
MoCo v1’s 60.6% looks lower than SimCLR’s later 69.3%, but it was ahead of all concurrent methods from late 2019. MoCo v2 then quickly caught up to 71.1% by incorporating SimCLR’s improvements.
6.3 Transfer learning: first time surpassing supervised pretraining across the board#
This is the most striking result in the paper. Evaluated on 7 downstream tasks:
| Task | Random init | Supervised pretrain | MoCo pretrain | MoCo (IG-1B) |
|---|---|---|---|---|
| PASCAL VOC detection | 33.8 | 81.3 | 82.2 | 83.0 |
| COCO detection | — | — | Slightly above supervised | Higher |
| COCO instance segmentation | — | Slightly higher | Slightly lower | On par / slightly higher |
| COCO semantic segmentation | — | Slightly higher | Slightly lower | On par |
| COCO human keypoint detection | — | — | Higher | Higher |
Historical significance: This is the first time unsupervised pretraining comprehensively surpassed supervised pretraining in computer vision. Before this, the consensus was that unsupervised pretraining could at best approach supervised, never surpass it. MoCo broke that belief, demonstrating that unsupervised pretraining is not only viable but actually better for some tasks (especially detection and keypoint detection).
6.4 The 30x learning rate observation#
When fine-tuning a MoCo-pretrained model on downstream tasks, the optimal learning rate (lr=30) is much larger than the fine-tuning learning rate for supervised pretraining (lr=0.03).
What this means: MoCo learns a feature distribution that is fundamentally different from supervised pretraining. MoCo’s features are more spread out in the feature space (because the contrastive loss pushes different samples apart), requiring a larger learning rate to adjust them effectively during fine-tuning.
MoCo’s solution: Apply full BatchNorm normalization to the entire model (including the FPN structure for detection) — this unifies the feature distribution and lets you use the same hyperparameters as supervised pretraining for fine-tuning, without grid-searching the learning rate every time.
7. MoCo’s Evolution: v2 to v3#
7.1 MoCo v2 (March 2020): Absorbing SimCLR’s improvements#
Chen et al.’s MoCo v2 changed only three things to push ImageNet Top-1 from 60.6% to 71.1%:
| Improvement | Source | Effect |
|---|---|---|
| MLP projection head (2-layer FC + ReLU) | SimCLR | +~6% |
| Stronger data augmentation (blur + stronger color distortion) | SimCLR | +~3% |
| Cosine learning rate schedule | SimCLR | +~1.5% |
MoCo v2 still only needs a batch size of 256, nowhere near SimCLR’s 8192. This proves the architectural advantage of queue + momentum encoder — it can absorb the data augmentation improvements from end-to-end methods while keeping its memory efficiency.
7.2 MoCo v3 (April 2021): Adapting to ViT, discovering training instability#
MoCo v3 attempted to transfer the MoCo framework from ResNet to Vision Transformer (ViT):
Key changes:
- Encoder switched from ResNet to ViT
- Queue removed — switched to SimCLR-style in-batch negatives (batch size 4096)
- Momentum encoder retained
- Added an extra prediction head (inspired by BYOL)
Surprising discovery: training instability:
MoCo v3 shows sudden spikes/dips in the training curve when the batch size is large (4096+) — the loss suddenly spikes and then slowly recovers. This does not happen with small batch sizes.
MoCo v3 partially mitigates this by freezing the patch projection layer (ViT’s first linear projection), but the root cause is still not fully understood — it remains an open problem. Later methods like DINO and DINO v2 took the self-distillation route, partially bypassing this instability.
7.3 Evolution summary#
MoCo v1 (Nov 2019, CVPR 2020)
+-- Core contributions: queue + momentum encoder + Shuffle BN
+-- First to surpass supervised pretraining on multiple downstream tasks
|
+--> MoCo v2 (Mar 2020)
| +-- Absorbed SimCLR: MLP head + stronger augmentation + cosine lr
| +-- Proved: queue architecture is more efficient than large batches
|
+--> MoCo v3 (Apr 2021)
+-- Adapted to ViT, discovered contrastive learning instability on ViT
+-- Freezing patch projection layer as a mitigation
+-- Issue not fully resolved -> DINO/DINO v2 went the self-distillation routeplaintext8. Systematic Comparison with Concurrent Methods#
8.1 Fundamental differences between the three paradigms#
| Dimension | End-to-end (SimCLR) | Memory Bank (InstDisc) | MoCo |
|---|---|---|---|
| Negative source | Current batch | Stored features from the full dataset | Momentum encoder + sliding window queue |
| Dictionary size | (batch-limited) | Dataset (full) | 65536 (configurable) |
| Feature consistency | Very high (real-time updates) | Low (updated once per epoch) | High (momentum update, very smooth) |
| Memory scalability | Poor (needs large batch) | Poor (stores all features) | Good (queue stores only ) |
| Extra components | None | Proximal regularization on encoder | Momentum encoder + queue |
| Batch size | >= 4096 | 256 | 256 |
8.2 Who “won”?#
Looking back historically, there was no absolute winner — just convergence:
- SimCLR won on methodology: Data augmentation, projection head, large batch + long training — these design principles were absorbed by everyone.
- MoCo won on architecture: The momentum encoder was adopted by BYOL, SimSiam, MoCo v3, and others. It proved that “you don’t need large batches to do contrastive learning well.”
- Memory Bank faded out: Replaced by the queue, which only keeps a sliding window rather than the full dataset, scaling much better.
9. Strengths and Weaknesses#
Strengths#
-
Elegant architecture: Unifies contrastive learning under the dictionary look-up framework, bringing all previous methods into a single coherent perspective. The paper is only 4 pages (CVPR double-column), but the design is crystal clear.
-
Momentum encoder: Simple design with lasting impact. The value was adopted by almost all subsequent work — BYOL, SimSiam, DINO, and others. It was inspired by the target network from DQN (Deep Q-Network, Mnih et al. 2015), but the soft momentum is smoother and more elegant than hard copying.
-
Hardware-friendly: Requires only batch size 256, trainable on a single V100 16GB. On 8 V100s, 200 epochs takes about 53 hours. Compared to SimCLR’s need for TPU pods or 32+ V100s, the barrier to entry is extremely low — letting many more researchers work on contrastive learning.
-
Scalable: and are decoupled, so the dictionary can grow arbitrarily large. Performance keeps improving when pretraining on the Instagram 1B dataset.
-
First to break the unsupervised vs. supervised ceiling: Surpassed supervised pretraining on detection and keypoint detection tasks.
Weaknesses#
-
Extra components to maintain: The queue and momentum encoder add engineering complexity. Compared to SimCLR’s “pure end-to-end, no extras,” MoCo’s code is more involved.
-
Shuffle BN is a patch: It solves the BN leakage problem, but not in the most elegant way — it essentially admits that BN is problematic for contrastive learning while CNNs can’t live without it. In the Transformer era, Layer Norm naturally avoids the issue.
-
InfoNCE still needs negatives: Later work (BYOL, SimSiam) showed that you don’t even need negatives, as long as you can prevent representation collapse. MoCo’s reliance on negatives was later shown to be non-essential.
-
CNN-era methodology: Shuffle BN and queue design both depend heavily on the CNN + BN stack. The ViT + LN combination makes these problems naturally disappear. MoCo v3’s instability on ViT also suggests this methodology doesn’t fully transfer to Transformers.
-
The ceiling of contrastive learning: InfoNCE optimizes a lower bound on mutual information, but maximizing mutual information may not be sufficient for good representations. MAE went in the opposite direction (reconstructing pixels) and achieved better results on some tasks.
10. Related Notes#
- [[NCE]] — The mathematical roots of InfoNCE: from multi-class to binary classification
- [[CPC]] — The paper that introduced InfoNCE: contrastive prediction in representation space
- [[SimCLR]] — Concurrent contrastive learning method: end-to-end, large batch, simplicity-first
- [[BYOL]] — No negatives needed: proving the momentum encoder’s value is not about providing negatives
- [[SimSiam]] — Further simplification: stop-gradient alone is enough
- [[SSL]] — Self-supervised learning overview
11. References#
- He, K., Fan, H., Wu, Y., Xie, S., & Girshick, R. (2020). Momentum Contrast for Unsupervised Visual Representation Learning. CVPR 2020. arXiv:1911.05722.
- Chen, X., Fan, H., Girshick, R., & He, K. (2020). Improved Baselines with Momentum Contrastive Learning (MoCo v2). arXiv:2003.04297.
- Chen, X., Xie, S., & He, K. (2021). An Empirical Study of Training Self-Supervised Vision Transformers (MoCo v3). ICCV 2021. arXiv:2104.02057.
- Mnih, V. et al. (2015). Human-level control through deep reinforcement learning. Nature. — DQN target network, inspiration for the momentum encoder
- Wu, Z., Xiong, Y., Yu, S., & Lin, D. (2018). Unsupervised Feature Learning via Non-Parametric Instance Discrimination (InstDisc). CVPR 2018. — Memory Bank approach