Papers › Indiscriminate Poisoning Attacks on Unsupervised Contrastive Learning

Indiscriminate Poisoning Attacks on Unsupervised Contrastive Learning

22 Feb 2022arXiv:2202.11202archive 2025-07-28

Hao He, Kaiwen Zha, Dina Katabi

Indiscriminate data poisoning attacks are quite effective against supervised learning. However, not much is known about their impact on unsupervised contrastive learning (CL). This paper is the first to consider indiscriminate poisoning attacks of contrastive learning. We propose Contrastive Poisoning (CP), the first effective such attack on CL. We empirically show that Contrastive Poisoning, not only drastically reduces the performance of CL algorithms, but also attacks supervised learning models, making it the most generalizable indiscriminate poisoning attack. We also show that CL algorithms with a momentum encoder are more robust to indiscriminate poisoning, and propose a new countermeasure based on matrix completion. Code is available at: https://github.com/kaiwenzha/contrastive-poisoning.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2202.11202")

Code

Syntology Ran 13 of 18 code samples harvested from 1 repository linked to this paper; 5 have no recorded run. Of those that ran: 2 ran · our draft was wrong; 11 ran with no contract checked.

By repository: official repository: 18 samples from 1 repository, 13 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

kaiwenzha/contrastive-poisoning officialmentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

18 samples harvested; 13 ran; 0 honoured the contract we drafted; 5 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

2ran · our draft was wrong
11ran
5unverified

Licence: 0 of the 18 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from kaiwenzha/contrastive-poisoning. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

BYOL kaiwenzha/contrastive-poisoning/model.py official repository ran · metamorphic tier: deterministic MIT (permissive) · f5329be21bc798d0 · report
BasicBlock kaiwenzha/contrastive-poisoning/model.py official repository ran · metamorphic tier: deterministic fingerprinted MIT (permissive) · e93841d2aa94ddad · report
Bottleneck kaiwenzha/contrastive-poisoning/model.py official repository ran · metamorphic tier: deterministic fingerprinted MIT (permissive) · 613844ebc89b237b · report
ResNet kaiwenzha/contrastive-poisoning/model.py official repository ran fingerprinted MIT (permissive) · 396b12c0d690c96b · report
ResNetNoHead kaiwenzha/contrastive-poisoning/model.py official repository ran · metamorphic tier: deterministic fingerprinted MIT (permissive) · bb2b7357a288f84c · report
ResNetWithHead kaiwenzha/contrastive-poisoning/model.py official repository ran · metamorphic tier: deterministic fingerprinted MIT (permissive) · 2e47d5200e06bb5d · report
TextFormat kaiwenzha/contrastive-poisoning/model.py official repository ran MIT (permissive) · dd9595263567cf07 · report
_get_byol_mlp kaiwenzha/contrastive-poisoning/model.py official repository ran · our draft was wrong MIT (permissive) · fc4d4f310d9bfc0e · report
log kaiwenzha/contrastive-poisoning/model.py official repository ran · our draft was wrong MIT (permissive) · 0f408c13a7b48d93 · report
resnet101 kaiwenzha/contrastive-poisoning/model.py official repository ran · metamorphic tier: deterministic MIT (permissive) · 188a542bb3d0c413 · report
resnet18 kaiwenzha/contrastive-poisoning/model.py official repository ran · metamorphic tier: deterministic MIT (permissive) · 907fb9d80310a75f · report
resnet34 kaiwenzha/contrastive-poisoning/model.py official repository ran · metamorphic tier: deterministic MIT (permissive) · b5e082eee874ab6a · report
resnet50 kaiwenzha/contrastive-poisoning/model.py official repository ran · metamorphic tier: deterministic MIT (permissive) · bc02a35848587cf8 · report
AttackModel kaiwenzha/contrastive-poisoning/model.py official repository unverified MIT (permissive) · 3e90e9281a3090fb · report
MoCo kaiwenzha/contrastive-poisoning/model.py official repository unverified MIT (permissive) · 3806b767e591b869 · report
_MomentumEncoderMixin kaiwenzha/contrastive-poisoning/model.py official repository unverified MIT (permissive) · de6d1a439b0eb3ae · report
_deactivate_requires_grad kaiwenzha/contrastive-poisoning/model.py official repository unverified MIT (permissive) · d2c729d46218e6c7 · report
_do_momentum_update kaiwenzha/contrastive-poisoning/model.py official repository unverified MIT (permissive) · 9ff781762297580d · report

Tasks

Contrastive LearningData AugmentationData PoisoningMatrix Completion

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

1x1 ConvolutionAverage PoolingBYOLBatch NormalizationBottleneck Residual BlockColorJitterContrastive LearningConvolutionDense ConnectionsFeedforward NetworkGlobal Average PoolingInfoNCEKaiming InitializationMax PoolingMoCoNT-XentRandom Gaussian BlurRandom Resized CropReLUResidual BlockResidual ConnectionSimCLR

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections