Paper · 2020-11-11 · cs.CV
Unsupervised Learning of Dense Visual Representations
Learns per-pixel features without labels: two augmented views are matched pixel to pixel via their known geometry, and an InfoNCE loss pulls matches together against a MoCo queue of 65,536 negatives. Author-reported: with frozen features it beats MoCo and ImageNet-supervised ResNet-50 on VOC mIoU and NYU depth RMSE, and beats MoCo on all nine COCO Mask R-CNN metrics.
Contrastive learningSelf-supervised learningSemantic segmentationTransfer learningself-supervised-learningdense-predictioncontrastive-learning
AI-compiled by claude-haiku-5-5 on 2026-10-19, not yet reviewed by a human. Every claim cites its source; check it when a detail matters.
In plain words
Most self-supervised image models learn one summary vector per picture. That works for "what is in this photo", but tasks such as outlining objects, guessing depth or following a point through a video need an answer for every pixel.
The authors take two randomly altered copies of the same picture, such as a crop, a colour change or a blur. Because the crop and resize are known, they know which pixel in one copy shows the same spot as which pixel in the other. The network is trained so that these matching pixels get similar descriptions, and other pixels get different ones. No person labels anything.
The result is a network that gives each pixel a description useful for dense tasks. The authors report that its frozen features do better than those of comparable self-supervised models on several such tasks.
TL;DR
VADeR is a contrastive method applied per pixel instead of per image. Pixel correspondences come for free from the view generation. The encoder is a ResNet-50 feature pyramid with a decoder that outputs a 128-channel map at 1/4 resolution, initialised from MoCo v2 for the encoder. With frozen features it beats MoCo and ImageNet-supervised ResNet-50 on VOC segmentation and NYU depth, and it beats MoCo on all COCO Mask R-CNN metrics reported. All results are author-reported. No official code was found.
Problem
Contrastive methods that compare one global vector per image are efficient, but the global vector is invariant to pixel-level changes §1. The authors argue this is enough for some tasks, such as classification, but not for dense prediction such as segmentation, depth, optical flow, keypoints and correspondence §1. Dense methods that did exist usually needed labelled data or specialised architectures §2. The paper assumes that augmentations give known pixel correspondences between views §1 §3.1 §3.2.
Method
VADeR learns an embedding per pixel such that the same scene location seen under two views has a similar embedding and different locations do not §3.1.
- Pixel representation. A pixel
uof imagexis the tuple(x, u). A viewvmaps it to(vx, vu). Views mix appearance changes (noise, illumination, saturation, blur, hue) and geometric changes (affine, homography, non-parametric warps) §3.1. The implementation uses Gaussian blur, colour jitter and/or greyscale, plus random crop and resize to 224×224, the same transforms as MoCo §3.2. - Invariance goal. Two encoders
fandgmap each pixel to ad-dimensional embedding. Their parameters may be shared, partly shared or separate §3.1. The ideal constraint is that a pixel's embedding under one view is more compatible with the same pixel under another view than with any other pixel, for all pixels and view pairs eq. 1 §3.1. - Loss. The loss is a noise-contrastive (NCE) loss over pixels. For a pixel
u, the positive is the same pixel under a second view. TheNnegatives are random pixelsu'from other images, and the loss is the negative log of the positive's softmax share eq. 2 §3.1. - Compatibility.
cis a cosine similarity divided by temperatureτ, with no learned parameters §3.1. The paper setsτ = 0.07§3.2. - Positive pairs. Each training image gives a random pair of views. The two views must share at least 32 pixels. The correspondence map between them gives matching pixel pairs, and each matching pair is a positive sample §3.2. For each training sample, 32 pairs are drawn at random from all matches §3.2.
- Negatives. Negatives come from other images, held in a MoCo queue of 65,536 entries with momentum 0.999 §3.2. The authors tried negatives from the same image and could not make them work in preliminary experiments §3.2.
- Encoder and decoder. Both are the same FPN-based network: a ResNet-50 backbone, an FPN with four pyramid levels at 1/32 to 1/4 resolution and 256 channels, and per-level upsampling blocks that bring every level to 128 channels at 1/4 resolution. Blocks are summed and passed through a 1×1 convolution. For a 224×224 input the output is 128×56×56 §3.2.
- Update rule.
fis trained with SGD.gis a moving average of the weights off§3.2. The decoder is trained from random initialisation, while the encoder starts from MoCo §3.2.
Pseudocode for one training step, reconstructed from the text. The paper gives no algorithm box, so the loop order and the queue update are reconstructed.
# One VADeR training step [§3.1] [§3.2] (reconstructed from text)
# Input: image (3, 224, 224); queue of negative pixel keys (65536, 128)
# Output: scalar loss; updates f (SGD) and g (moving average)
def training_step(image, queue):
# Sample two views; resample until >= 32 pixels are in both [§3.2]
view_1, view_2, match = sample_views_min_overlap(image, 32)
# Draw 32 matched pixel pairs at random as positives [§3.2]
pairs = random_subset(match, 32)
# Queries from f on view 1; keys from g on view 2 [§3.1] [§3.2]
queries = f(view_1) # (128, 56, 56)
keys = g(view_2) # (128, 56, 56)
# Cosine similarity divided by temperature 0.07 [§3.1] [§3.2]
positive = cosine(queries[pairs.q], keys[pairs.k]) / 0.07
# (32,)
negative = cosine(queries[pairs.q], queue) / 0.07
# (32, 65536)
# NCE over one positive and the queue, scaled by 10 [eq. 2] [§3.2]
loss = -10 * log(exp(positive) / (exp(positive) + sum(exp(negative))))
# Encoder f: SGD (lr 3e-7); decoder: SGD (lr 3e-3) [§3.2]
f = sgd_step(f, loss, learning_rate=3e-7)
# g: moving average of f with momentum 0.999 [§3.2]
g = momentum_update(g, f, 0.999)
# Not stated which keys enter the queue; the sampled keys are assumed
queue = enqueue(queue, keys[pairs.k], max_size=65536)
return lossThe paper states "SGD with weight decay 0.0001 and momentum 0.9" for f
§3.2; the pseudocode above omits these. The per-group learning rates are
also stated only as values, not as a schedule §3.2.
Key equations:
c(f_{v_1 u},\, g_{v_2 u}) > c(f_{v_1 u},\, g_{u'}) \quad \forall\, u, u', v_1, v_2 eq. 1
\mathcal{L}(u, \mathcal{U}^-) = -\mathbb{E}_{(v_1, v_2)\sim\mathcal{V}_u} \left[ \log \frac{\exp(c(f_{v_1 u}, g_{v_2 u}))}{\exp(c(f_{v_1 u}, g_{v_2 u})) + \sum_{u' \in \mathcal{U}^-} \exp(c(f_{v_1 u}, g_{u'}))} \right] eq. 2
Hyperparameters
Pretraining is on ImageNet-1K train (about 1.28M images) §3.2. Feature extraction and fine-tuning settings are in the appendix app. A.1 app. A.2.
| Name | Value | Where | Notes |
|---|---|---|---|
| Pretraining dataset | ImageNet-1K train, ~1.28M images | §3.2 | labels not used |
| Backbone | ResNet-50 inside FPN | §3.2 | |
| FPN pyramid | 4 levels, 1/32 to 1/4, 256 channels | §3.2 | |
| Decoder output | 128 channels at 1/4 resolution | §3.2 | upsampling blocks: 3 for 1/32, 1 for 1/8 |
| Upsampling block | 3×3 conv, GroupNorm, ReLU, 2× bilinear | §3.2 | |
| Final head | 1×1 conv after summing levels | §3.2 | |
| Input size | 224×224 | §3.2 | output 128×56×56 |
| Temperature τ | 0.07 | §3.2 | |
| Loss scale | ×10 on eq. 2 | §3.2 | stated as helping small-label fine-tuning |
| Queue size | 65,536 | §3.2 | follows MoCo |
| Momentum (g) | 0.999 | §3.2 | |
| Positive pairs per sample | 32 (chosen at random) | §3.2 | |
| Minimum shared pixels per pair | 32 | §3.2 | "no quantitative difference" for other values |
| Optimizer | SGD | §3.2 | |
| Weight decay | 0.0001 | §3.2 | |
| SGD momentum | 0.9 | §3.2 | distinct from the 0.999 above |
| Learning rate, encoder f | 3e-7 | §3.2 | schedule not stated |
| Learning rate, decoder | 3e-3 | §3.2 | schedule not stated |
| GPUs | 4 | §3.2 | |
| Batch size | 128 | §3.2 | per GPU or total not stated |
| Iterations | about 6M | §3.2 | |
| Video propagation model | 2.4M iterations | §4.1 | chosen for video only |
| Encoder initialisation | MoCo v2 | §3.2 | footnote 1 |
| Decoder initialisation | random | §3.2 | |
| Extra parameters vs MoCo | about 2M | §3.2 | from decoder |
| Frozen-feature segmentation | 1×1 conv, cross-entropy, SGD lr 0.005 (VOC) / 0.01 (Cityscapes), batch 64 / 16, 60 / 100 epochs | app. A.1 | decay ×10 at epochs 42, 55 (VOC) and 70, 90 (Cityscapes); crop 512 / 768 |
| Frozen-feature depth | 1×1 conv, Huber loss, SGD lr 0.005, batch 16, 30 epochs | app. A.1 | decay ×10 at epochs 10, 20; momentum 0.9; weight decay 0.0001 |
| Video propagation evaluation | average of predictions over frames [t−7, t]; k-NN with k = 5 | app. A.1 | protocol of [wang2019learning] |
| Fine-tuning setup | Sync BN; BN on all FPN layers | §4.2 | follows MoCo's detection setup |
| Fine-tuning segmentation | SGD lr 0.005 / 0.01, batch 64 / 16, 60 / 100 epochs | app. A.2 | |
| Fine-tuning depth | SGD lr 0.005, batch 16, 30 epochs | app. A.2 | decay ×10 at epochs 10, 20 |
| Detection and keypoints | Mask R-CNN with FPN, Detectron2 defaults, about 12 epochs (1×), COCO val2017 | §4.3 | defaults tuned for ImageNet-supervised pretraining |
| Repetitions | 5 trials, mean reported | §4.1 §4.2 §4.3 | standard deviations only in plots |
Results
Author-reported. Setup: VADeR pretrained on ImageNet-1K. Frozen-feature experiments use a linear 1×1 convolution on the 128-channel output §4.1. Baselines are ResNet-50 variants adapted to the same 1/4 resolution, with dilated convolutions replacing strided ones §4.1. Table numbers below follow the order in which the paper's captions appear.
Frozen features, dense prediction (mIoU, higher is better; RMSE, lower is better; 5 trials averaged) tab. 1:
| Setting | VOC mIoU | Cityscapes mIoU | NYU-d v2 RMSE | Source |
|---|---|---|---|---|
| random | 4.9 | 10.6 | 1.261 | tab. 1 |
| sup. IN | 54.4 | 47.1 | 0.994 | tab. 1 |
| MoCo | 43.0 | 32.3 | 1.136 | tab. 1 |
| VADeR | 56.7 | 44.3 | 0.964 | tab. 1 |
Video instance propagation, DAVIS-2017 val (J = region similarity, F = contour accuracy; mean; 320 / 480 px input) tab. 2:
| Method | J 320 | J 480 | F 320 | F 480 | Source |
|---|---|---|---|---|---|
| SIFT Flow | 33.0 | - | 35.0 | - | tab. 2 |
| Video Colorization | 34.6 | - | 32.7 | - | tab. 2 |
| TimeCycle | 41.9 | 46.4 | 39.4 | 50.0 | tab. 2 |
| CorrFlow | - | 47.7 | - | 51.3 | tab. 2 |
| UVC | 52.0 | 56.8 | 52.6 | 59.5 | tab. 2 |
| sup. IN | 50.3 | 53.2 | 49.2 | 56.2 | tab. 2 |
| MoCo | 42.3 | 51.4 | 40.5 | 54.7 | tab. 2 |
| VADeR | 52.4 | 54.7 | 55.1 | 58.4 | tab. 2 |
View sampling ablation (VOC mIoU, DAVIS J; "fix." = frozen features, "f.t." = fine-tuned) tab. 3:
| View sampling | Seg. fix. | Seg. f.t. | Corr. J (fix.) | Source |
|---|---|---|---|---|
| unmatched pixel pairs | 32.4 | 74.1 | 9.8 | tab. 3 |
| same crop | 48.0 | 75.2 | 46.7 | tab. 3 |
| different crop (default) | 56.7 | 75.4 | 52.4 | tab. 3 |
Mask R-CNN on COCO val2017 (fine-tuned; 5 trials averaged) tab. 4. The
source header for the mask AP50 column reads AP^mk_55; read here as AP50.
| Method | AP^bb | AP50^bb | AP75^bb | AP^mk | AP50^mk | AP75^mk | AP^kp | AP50^kp | AP75^kp | Source |
|---|---|---|---|---|---|---|---|---|---|---|
| random | 31.0 | 49.5 | 33.2 | 28.5 | 46.8 | 30.4 | 65.4 | 85.8 | 70.8 | tab. 4 |
| sup. IN | 39.0 | 59.8 | 42.5 | 35.4 | 56.6 | 37.8 | 65.3 | 87.0 | 71.0 | tab. 4 |
| MoCo | 38.9 | 59.4 | 42.5 | 35.4 | 56.3 | 37.8 | 65.7 | 86.8 | 71.7 | tab. 4 |
| VADeR | 39.2 | 59.7 | 42.7 | 35.6 | 56.7 | 38.2 | 66.1 | 87.3 | 72.1 | tab. 4 |
Fine-tuning with varying labelled data (mean of 5 trials) app. A.3:
| Data (%) | 2 | 5 | 10 | 20 | 50 | 100 | Source |
|---|---|---|---|---|---|---|---|
| VOC mIoU, sup. IN | 37.4 | 48.4 | 53.7 | 59.0 | 69.3 | 73.9 | app. A.3 |
| VOC mIoU, MoCo | 44.7 | 53.3 | 57.2 | 59.3 | 70.1 | 75.3 | app. A.3 |
| VOC mIoU, VADeR | 47.7 | 56.9 | 60.6 | 60.8 | 70.9 | 75.4 | app. A.3 |
| NYU RMSE, sup. IN | 1.288 | 1.060 | 0.999 | 0.896 | 0.805 | 0.731 | app. A.3 |
| NYU RMSE, MoCo | 1.383 | 1.340 | 0.897 | 0.804 | 0.707 | 0.640 | app. A.3 |
| NYU RMSE, VADeR | 1.128 | 0.951 | 0.868 | 0.791 | 0.700 | 0.641 | app. A.3 |
The text says VADeR matches MoCo at 100% of labels with no statistical difference, and beats supervised pretraining at that level §4.2. The fine-tuning figure itself, with standard deviations, is fig. 4.
Qualitative results: the paper shows pixel retrieval fig. 2, task examples fig. 3 and PCA-to-RGB feature maps where MoCo is shown beside VADeR fig. 5. The paper describes these qualitatively and reports no numbers for them.
Paper vs code
No official code. Searched the paper's TeX source, the arXiv abstract page
(no code or project links; the only repository links in the source are
TimeCycle and Detectron2, which are third-party), and GitHub: the query
VADeR, the query view-agnostic dense representations, the query
VADeR org:ElementAI (zero results), a direct check of
github.com/ElementAI/VADeR (HTTP 404), and a keyword query combining
"pixel-level contrastive dense correspondence" with the first author's name
(zero results). The GitHub search for VADeR returned repositories with
other meanings only. The web search tool was not permitted in this run, so
the search of the open web beyond GitHub is incomplete.
Two differences between text and tables, not code:
- Paper text: "consistently outperform MoCo (and the supervised baseline)" on Mask R-CNN §4.3. Table 4 has supervised ImageNet at 59.8 AP50^bb against VADeR's 59.7 tab. 4.
- Paper text: VADeR's video results come from a 2.4M-iteration model §4.1, while pretraining is stated as about 6M iterations §3.2. The paper does not say which checkpoint the other tables use.
Pitfalls
- Pixel correspondence is not fully specified. The paper says correspondences come from known view geometry §3.2. It does not say how a 224×224 input's correspondences map to the 56×56 output grid, nor how the 1/4-stride cells are matched. An implementer has to choose a rounding convention.
- Which keys enter the queue is not stated. The text says the dictionary is updated §3.2. It is not clear whether all positives' keys, all pixels, or a subsample enter the MoCo queue, or how many per image.
- Learning-rate schedule and warm-up are not stated. Only the peak values are given for the encoder (3e-7) and decoder (3e-3) §3.2. The learning-rate gap of four orders of magnitude is not explained.
- Loss scale of 10 interacts with the learning rate. The paper multiplies the loss by 10 for stability in small-label fine-tuning §3.2. The text sits inside the pretraining paragraph. Whether the scale is used during pretraining, fine-tuning or both is ambiguous. Treat it as a pretraining-time factor unless the implementer confirms otherwise.
- Batch size and GPU count are ambiguous. "Batch size 128" on 4 GPUs is not said to be per GPU or in total §3.2. This changes the effective number of negatives and matches per step.
- Cost is hidden. Only 32 positive pairs per image are used per step §3.2. Each step still computes dense features for both views. The paper gives no wall-clock time or memory use.
- Dependence on MoCo. The encoder starts from MoCo v2 §3.2, and the baselines are MoCo v2 §3.2, footnote 1. Reported gains are measured on top of a MoCo initialisation. Behaviour from random encoder initialisation is not reported.
- Baselines are adapted. To match resolution, the baselines drop the last average pooling and use dilated convolutions §4.1. This is the authors' choice. The baselines' own designs would give different output resolutions.
- Detection uses a different FPN. The paper describes its FPN, but the detection experiments use Detectron2's default FPN, which the footnote states §4.3. The defaults were tuned for ImageNet-supervised pretraining §4.3. Both choices may favour the supervised baseline.
- Result reporting. Tables report means over 5 trials without standard deviations §4.1 §4.2 §4.3. The fine-tuning plot has standard deviations fig. 4. Claims of "no statistical difference" at 100% labels §4.2 are therefore not checkable from the tables alone.
- Small gap at full labels. At 100% NYU data, MoCo's RMSE (0.640) is marginally lower than VADeR's (0.641) app. A.3.
- Table header typo. The Mask R-CNN mask-AP50 column header reads
AP^mk_55in the source tab. 4. - Figure, table and appendix numbers are counted from the LaTeX source. Table and figure numbers follow caption order; appendix labels A.1 to A.3 follow the section structure. Check all of them against the compiled PDF before publication.
- Privacy and misuse. The broader-impact statement names privacy and freedom-of-expression risks for surveillance-type uses of self-supervised image models §6.
Lineage
- Builds on: MoCo [he2019momentum] for the momentum encoder, the queue of negatives and the encoder initialisation (MoCo v2 is the one used) §3.2. Feature pyramid networks [lin2017feature] for the encoder-decoder §3.2. Noise-contrastive estimation [gutmann2010noise] and [oord2018representation] for the loss §3.1.
- Compared against: random initialisation, supervised ImageNet ResNet-50, MoCo v2 §4.1 §4.2 §4.3. For video propagation: SIFT Flow, Video Colorization, TimeCycle, CorrFlow and UVC tab. 2.
- Superseded by: not stated in this card's sources.
Source and license
Adapted from “Unsupervised Learning of Dense Visual Representations” by Pedro O. Pinheiro, Amjad Almahairi, Ryan Y. Benmalek, Florian Golemo, Aaron Courville (arXiv:2011.05499), used under CC BY 4.0. Changes: condensed and restructured for implementation, with tables, equations and algorithms taken from the paper and its code, each cited to its source. Not affiliated with or endorsed by the authors.