Contrastive self-supervised learning trains an image encoder by pulling two augmented views of the same image together and pushing every other image in the batch away. When two different images in a batch actually show the same kind of object, the loss still pushes them apart. These false negatives, or semantic collisions, are known to hurt, and a large literature detects and removes them. That literature treats the collision force as a single thing. It is really two. One part is a systematic bias: on average, same-class images are repelled. The other is batch-to-batch fluctuation: which same-class images happen to share a batch, and how many, changes at every step. Work on stochastic gradient descent (SGD) shows that fluctuations of this kind are often helpful. They steer training toward flat, well-generalizing solutions.
We propose to measure these two parts separately and ask which one does the damage. The central hypothesis is that false-negative harm is mostly bias. The collision fluctuation is closer to ordinary, curvature-aligned SGD noise. Errors made by false-negative detectors, by contrast, inject a third kind of noise that is not aligned with curvature, and that noise is what makes treating detected false negatives as positives ("attraction") unstable. If this holds, it resolves a direct disagreement in the literature. It also says what a correction should do: remove the expected collision force, average it over time, and leave the natural fluctuation in place. Per-sample hard decisions should be avoided.
Core Claim
Write the minibatch gradient of the InfoNCE loss as
$$g_t = \bar g_t + b_t + \xi_t + \epsilon_t,$$
where $\bar g_t$ is the gradient the loss would have with all same-class negatives removed, $b_t = \mathbb{E}[g^{\text{coll}}_t]$ is the expected gradient contributed by same-class negatives (the collision bias), $\xi_t = g^{\text{coll}}_t - b_t$ is its zero-mean batch-to-batch fluctuation, and $\epsilon_t$ is the extra term introduced when a detector misclassifies pairs (zero for vanilla training and for oracle removal).
The claim has three parts. Removing $b_t$ recovers most of the gain of oracle false-negative elimination. Removing $\xi_t$ alone does not help, and may hurt, in multi-epoch training. The noise from detection errors, $\epsilon_t$, has lower alignment with the loss curvature than $\xi_t$. Curvature alignment is measured by the escaping-efficiency quantity $\text{Tr}(H\Sigma)$ from The Anisotropic Noise in Stochastic Gradient Descent, where $H$ is the loss Hessian (the matrix of second derivatives) and $\Sigma$ the noise covariance. That paper shows this alignment is what makes SGD noise beneficial.
This differs from all existing work. Detection methods treat collisions as samples to prune or relabel. They never ask which component of the force they are removing. The one noise-manipulating optimizer studied for corrupted supervision works only in supervised learning, and it adds noise rather than subtracting bias.
Why This Is Open
Two groups of false-negative papers disagree. Incremental False Negative Detection (IFND, clustering-based detection with a ramped acceptance schedule) reports that eliminating detected false negatives from the loss denominator is far more stable than attracting them. Attraction, they find, corrupts the embedding when cluster assignments are noisy. False Negative Cancellation (FNC, detection via multi-crop support sets) reports the opposite: attraction gives +1.75% on ImageNet against +1.02% for elimination. Neither paper measures detection error rate as a variable, and neither looks at optimization dynamics. Our decomposition predicts that the sign of the attraction-minus-elimination gap depends on detection error rate, through the misalignment of $\epsilon_t$.
The population-level analysis in Debiased contrastive learning (DCL) supplies half of our method. DCL corrects the negative expectation with a class prior $\tau^+$. In our language, it is a bias-only correction, but it is applied per anchor from the same batch's samples, so it carries its own estimation noise. It has also never been compared against a noise-preserving alternative.
On the optimization side, several papers establish that minibatch noise helps through its covariance structure: On the Noisy Gradient Descent that Generalizes as SGD, the anisotropy paper above, and SGD Generalizes Better Than GD. All of this work is supervised. Mini-Batch Optimization of Contrastive Loss shows that minibatch InfoNCE differs from its full-batch counterpart and proposes high-loss batch grouping. It does not separate false negatives from hard negatives, and it does not study noise structure.
One paper constrains the proposal. Beyond Implicit Bias shows that SGD noise matters little in single-epoch online training. We therefore predict that the value of preserving $\xi_t$ shrinks as training approaches one pass over the data. We test this rather than assume noise always helps.
Research Program
The first stage is a controlled decomposition using ground-truth labels, on data where collisions can be identified exactly. We use CIFAR-100 and Tiny-ImageNet with a ResNet-18 SimCLR encoder. At every step we compute the collision gradient $g^{\text{coll}}_t$ with a separate backward pass over the same-class-negative terms only. We keep an exponential moving average of it as the estimate of $b_t$.
We then train five variants that differ only in which components they keep:
- Vanilla keeps all components.
- Oracle elimination keeps none.
- Bias-only keeps $\bar g_t + b_t$: the actual collision gradient is swapped for its running mean.
- Fluctuation-only keeps $\bar g_t + \xi_t$: the running mean is subtracted but the fluctuation is kept.
- A variance-matched control replaces $\xi_t$ with isotropic Gaussian noise of equal norm.
The bias-only and fluctuation-only comparison answers "bias or noise." The comparison between fluctuation-only and the variance-matched control tests whether the structure of collision noise matters, as the supervised theory predicts.
Throughout training we also measure alignment. We compute $\text{Tr}(H\Sigma)$ for each noise component and its projection onto the top Hessian eigenvectors, estimated with Lanczos iteration and Hutchinson trace estimators, since exact Hessians are infeasible.
The second stage injects detection error. Starting from oracle labels, we flip detection decisions at controlled rates $\rho \in \{0, 5, 10, 20, 40\}\%$, with separate rates for spurious and missed detections. At each rate we run elimination and attraction and measure linear-probe accuracy together with the alignment of $\epsilon_t$. The prediction is that attraction beats elimination at low $\rho$, as in the FNC regime, and loses at high $\rho$, as in the IFND regime. The crossover should track the drop in $\epsilon_t$ alignment.
The third stage turns the findings into a label-free method, a time-averaged collision correction. Soft same-class posteriors from a memory bank of past embeddings are accumulated over many steps into an estimate of the expected collision force, and that estimate is subtracted as a gradient correction. No sample is ever hard-eliminated or attracted. The design removes $b_t$ and keeps $\xi_t$. Because it averages over time, it also keeps detector errors from adding their own misaligned $\epsilon_t$. Its cost is one extra memory-bank lookup, with no global k-means pass. We then scale to ImageNet-100 with MoCo v2, which lets us vary the number of epochs over the same data and test the single-epoch prediction.
Baselines
The naive reference point is vanilla SimCLR (or MoCo v2 at ImageNet-100 scale) with a tuned learning rate. Reported CIFAR-100 SimCLR linear-probe numbers differ across setups: 64.86% in Difficulty-Based Sampling for Debiased Contrastive Representation Learning and 59.95% in Difficult Examples Hurt Unsupervised Contrastive Learning. We therefore rerun it ourselves rather than borrow either figure.
The upper reference is oracle elimination using true labels. It bounds what any false-negative method can gain from removing collisions and anchors the decomposition.
DCL with a tuned $\tau^+$ is the closest existing method to our correction. It is the competitor that most directly threatens the practical contribution, since it is also a bias-only correction. We report DCL at oracle $\tau^+$ and at misspecified values.
IFND-style clustered elimination and FNC-style support-set attraction represent the per-sample detection family. On ImageNet, IFND reports 69.7% top-1 linear evaluation and FNC reports 74.4%. These come from different backbones and schedules, so we reimplement both inside our pipeline.
Positive-Negative Momentum (PNM), which amplifies gradient noise through two alternating momentum buffers, is run on the InfoNCE loss. It stands in for the obvious "just add optimizer noise" answer.
The strongest reported CIFAR-100 contrastive number in the file is Sharpness & Shift-Aware Self-Supervised Learning (SSA-CLR, sharpness-aware minimization plus Fourier augmentation), at 71.90% top-1. The next is WCL at 69.09%.
All methods share the same encoder, augmentations, epochs, and batch size. We treat SSA-CLR in two ways. We report it at matched epochs, where it uses twice the backward passes. We also report it at matched wall-clock compute, which for our method means doubled epochs. Every method gets the same hyperparameter search budget.
The key ablation, comparing bias-only, fluctuation-only, and the variance-matched control, isolates whether preserving structured collision noise is responsible for any gain. Our method counts as beating DCL if it exceeds it by more than seed variance (five seeds) at the same $\tau^+$-free budget, and if it degrades less when collision rate is misspecified. It counts as competitive with SSA-CLR if it matches SSA-CLR at matched compute. We also test whether combining it with SAM adds to SAM's gain, which would show the two address different problems.
Why not just…?
Why not just shrink the batch or raise the learning rate to get more noise? In contrastive learning, batch size also sets how many negatives each anchor sees and the expected number of collisions per batch. Changing it moves $b_t$, $\xi_t$, and the minibatch-versus-full-batch mismatch documented in Mini-Batch Optimization of Contrastive Loss all at once. The decomposition controls each component separately at a fixed batch size. We still include a batch-size and learning-rate sweep on vanilla SimCLR, so a reviewer can see whether any setting matches the bias-only variant.
Why not just run PNM on the contrastive loss? PNM adds zero-mean noise. Collision harm, if our hypothesis is right, is a nonzero mean, and adding noise does not cancel a mean. PNM's evidence comes from supervised label noise, where the harm is memorizing individual wrong targets. That is a different failure. This is a real empirical question, not settled by argument, so PNM is a full baseline. If PNM matches bias-only correction, the "bias, not noise" claim is falsified.
Why not just use DCL, which already removes the expected collision force? This is the most serious threat. If DCL at oracle $\tau^+$ matches our time-averaged correction, our method adds nothing, and the contribution reduces to the decomposition and the explanation of elimination versus attraction. We would report that plainly. The expected difference comes from where the estimate lives. DCL estimates the correction from each anchor's current batch using a global prior. That adds estimation noise of its own, and the WCL paper reports DCL-family methods to be fragile on biased data. Our estimate is averaged across steps and conditioned on each sample's neighborhood. The $\tau^+$-misspecification sweep and a long-tailed CIFAR-100 split will settle it.
Why not just apply sharpness-aware minimization? SSA-CLR shows that flatness helps contrastive transfer. It flattens the loss explicitly, though, and never touches the negatives in the loss denominator. Our hypothesis is that SAM and collision-bias removal address different defects. We test this by combining them. If the gains add, the two are complementary. If SAM absorbs the gain, collision bias was acting mainly through sharpness, which is itself a useful finding.
Decisive Checks
The first check is on CIFAR-100 with oracle labels. The proposal survives if bias-only correction recovers at least most of the oracle-elimination gain while fluctuation-only recovers little. It also requires that fluctuation-only outperforms the variance-matched isotropic control, which shows collision noise has useful structure. If fluctuation-only is instead the better variant, the hypothesis is wrong and collision harm is mainly noise.
The second check is the detection-error sweep. It must show a crossover between attraction and elimination as $\rho$ grows, and the crossover must coincide with a measurable drop in the curvature alignment of $\epsilon_t$. Without the alignment link, the reconciliation of IFND and FNC is only descriptive.
The third check is the epoch sweep at ImageNet-100. The benefit of preserving $\xi_t$ should shrink toward single-pass training, as Beyond Implicit Bias predicts. A benefit that stays large in the single-pass regime would contradict that paper and call for closer scrutiny of our alignment measurements.
The practical result stands only if the label-free time-averaged correction beats DCL and vanilla SimCLR on CIFAR-100, Tiny-ImageNet, and ImageNet-100 linear probing. It must also beat DCL under misspecified collision rates. Everything is measured over five seeds under the matched-budget protocol described above.
References
- The Anisotropic Noise in Stochastic Gradient Descent: Its Behavior of Escaping from Sharp Minima and Regularization Effects
- Incremental False Negative Detection for Contrastive Learning
- Boosting Contrastive Self-Supervised Learning with False Negative Cancellation
- Debiased contrastive learning
- On the Noisy Gradient Descent that Generalizes as SGD
- SGD Generalizes Better Than GD (And Regularization Doesn't Help)
- Mini-Batch Optimization of Contrastive Loss
- Beyond Implicit Bias: The Insignificance of SGD Noise in Online Learning
- Difficulty-Based Sampling for Debiased Contrastive Representation Learning
- Difficult Examples Hurt Unsupervised Contrastive Learning: A Theoretical Perspective
- Positive-Negative Momentum: Manipulating Stochastic Gradient Noise to Improve Generalization
- Sharpness & Shift-Aware Self-Supervised Learning