Papers › Backdoor Attacks on Self-Supervised Learning

Backdoor Attacks on Self-Supervised Learning

21 May 2021CVPR 2022 1arXiv:2105.10123archive 2025-07-28

Aniruddha Saha, Ajinkya Tejankar, Soroush Abbasi Koohpayegani, Hamed Pirsiavash

Large-scale unlabeled data has spurred recent progress in self-supervised learning methods that learn rich visual representations. State-of-the-art self-supervised methods for learning representations from images (e.g., MoCo, BYOL, MSF) use an inductive bias that random augmentations (e.g., random crops) of an image should produce similar embeddings. We show that such methods are vulnerable to backdoor attacks - where an attacker poisons a small part of the unlabeled data by adding a trigger (image patch chosen by the attacker) to the images. The model performance is good on clean test images, but the attacker can manipulate the decision of the model by showing the trigger at test time. Backdoor attacks have been studied extensively in supervised learning and to the best of our knowledge, we are the first to study them for self-supervised learning. Backdoor attacks are more practical in self-supervised learning, since the use of large unlabeled data makes data inspection to remove poisons prohibitive. We show that in our targeted attack, the attacker can produce many false positives for the target category by using the trigger at test time. We also propose a defense method based on knowledge distillation that succeeds in neutralizing the attack. Our code is available here: https://github.com/UMBCvision/SSL-Backdoor .

PaperPDFConference PDFCodeCode 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="2105.10123")

Code

Syntology Ran 8 of 13 code samples harvested from 1 repository linked to this paper; 5 have no recorded run. Of those that ran: 1 ran · honoured contract; 3 ran · our draft was wrong; 3 ran · fixture could not drive it; 1 ran with no contract checked.

By repository: official repository: 11 samples from 1 repository, 6 ran; 2 identical to code first harvested elsewhere. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

UMBCvision/SSL-Backdoor officialmentioned in papermentioned on GitHubpytorchMIT 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

13 samples harvested; 8 ran; 1 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.

1ran · honoured contract
3ran · our draft was wrong
3ran · fixture could not drive it
1ran
5unverified

Licence: 2 of the 13 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 UMBCvision/SSL-Backdoor. Some samples are identical code Syntology first harvested from another repository; for those, this paper's copy is not located and its licence is not recorded. “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.

buildLabelIndex UMBCvision/SSL-Backdoor/rotnet/dataloader.py official repository ran fingerprinted MIT (permissive) · 57889d72f516d105 · report
contrastive_loss UMBCvision/SSL-Backdoor/byol/methods/contrastive.py official repository ran · fixture could not drive it MIT (permissive) · ba00312b3d5b70dc · report
conv1x1 UMBCvision/SSL-Backdoor/jigsaw/resnet.py official repository ran · our draft was wrong MIT (permissive) · d9def42110729a85 · report
conv3x3 UMBCvision/SSL-Backdoor/jigsaw/resnet.py official repository ran · our draft was wrong MIT (permissive) · 160bb14bd76201b4 · report
get_head UMBCvision/SSL-Backdoor/byol/model.py official repository ran · our draft was wrong MIT (permissive) · 2d19f4f3143c2ccf · report
pil_loader UMBCvision/SSL-Backdoor/rotnet/jgg_dataset.py official repository ran · honoured contract MIT (permissive) · f321f54723433661 · report
accimage_loader UMBCvision/SSL-Backdoor/rotnet/jgg_dataset.py official repository unverified MIT (permissive) · 404fb2b2daa1ae78 · report
default_loader UMBCvision/SSL-Backdoor/rotnet/jgg_dataset.py official repository unverified MIT (permissive) · 7bf07d5f59aae36d · report
getConfMatrixResults UMBCvision/SSL-Backdoor/rotnet/utils.py official repository unverified MIT (permissive) · 3d9a20721d1cb559 · report
get_model UMBCvision/SSL-Backdoor/byol/model.py official repository unverified MIT (permissive) · 1d4261306685f800 · report
rotate_img UMBCvision/SSL-Backdoor/rotnet/dataloader.py official repository unverified MIT (permissive) · 62681258109fb35d · report
create_torch_dataloader identical code first harvested elsewhere ran · fixture could not drive it licence of this copy not recorded · cf100d49bb98767a · report
predict_feature identical code first harvested elsewhere ran · fixture could not drive it licence of this copy not recorded · 8c3820f76db73254 · report

Tasks

Backdoor AttackInductive BiasKnowledge DistillationSelf-Supervised Learning

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

BYOLBatch NormalizationInfoNCEKnowledge DistillationMoCo

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