Papers › BadNets: Identifying Vulnerabilities in the Machine Learning Model Supply Chain

BadNets: Identifying Vulnerabilities in the Machine Learning Model Supply Chain

22 Aug 2017arXiv:1708.06733archive 2025-07-28

Tianyu Gu, Brendan Dolan-Gavitt, Siddharth Garg

Deep learning-based techniques have achieved state-of-the-art performance on a wide variety of recognition and classification tasks. However, these networks are typically computationally expensive to train, requiring weeks of computation on many GPUs; as a result, many users outsource the training procedure to the cloud or rely on pre-trained models that are then fine-tuned for a specific task. In this paper we show that outsourced training introduces new security risks: an adversary can create a maliciously trained network (a backdoored neural network, or a \emph{BadNet}) that has state-of-the-art performance on the user's training and validation samples, but behaves badly on specific attacker-chosen inputs. We first explore the properties of BadNets in a toy example, by creating a backdoored handwritten digit classifier. Next, we demonstrate backdoors in a more realistic scenario by creating a U.S. street sign classifier that identifies stop signs as speed limits when a special sticker is added to the stop sign; we then show in addition that the backdoor in our US street sign detector can persist even if the network is later retrained for another task and cause a drop in accuracy of {25}\% on average when the backdoor trigger is present. These results demonstrate that backdoors in neural networks are both powerful and---because the behavior of neural networks is difficult to explicate---stealthy. This work provides motivation for further research into techniques for verifying and inspecting neural networks, just as we have developed tools for verifying and debugging software.

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="1708.06733")

Code

Syntology Ran 6 of 8 code samples harvested from 2 repositories linked to this paper; 2 have no recorded run. Of those that ran: 2 ran · honoured contract; 1 ran · violated contract; 3 ran · our draft was wrong.

By repository: community (archive-listed): 5 samples from 2 repositories, 3 ran; 3 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.

DreamtaleCore/Refool mentioned on GitHubpytorch report
GeorgeTzannetos/badnets mentioned on GitHubpytorch report
aisafety-hkust/backdoor_safety_tuning mentioned on GitHubpytorch report
aisafety-hkust/stable_backdoor_purification mentioned on GitHubpytorchNOASSERTION report
kooscii/badnets mentioned on GitHub report
locuslab/breaking-poisoned-classifier mentioned on GitHubpytorchMIT report
sakshiudeshi/Neo mentioned on GitHub report
trx14/TrojanNet mentioned on GitHubtfMIT report
xandery-geek/BackdoorAttacks mentioned on GitHubpytorch report
xqx12/daily-info mentioned 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

8 samples harvested; 6 ran; 2 honoured the contract we drafted; 2 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 · honoured contract
1ran · violated contract
3ran · our draft was wrong
2unverified

Licence: 8 of the 8 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 2 repositories linked to this paper, official or community; each sample names its own and says which. 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.

distillation aisafety-hkust/backdoor_safety_tuning/fine_tune/qra.py community (archive-listed) ran · violated contract licence not identified · pointer only · 5c6b89d763f0a8f3 · report
eval GeorgeTzannetos/badnets/train_eval.py community (archive-listed) ran · honoured contract no licence file found · pointer only · 4f825732b3b5e87e · report
train GeorgeTzannetos/badnets/train_eval.py community (archive-listed) ran · honoured contract no licence file found · pointer only · 53377da1ddefc4dd · report
add_args aisafety-hkust/backdoor_safety_tuning/fine_tune/ft.py community (archive-listed) unverified licence not identified · pointer only · bf4a97ed98a7136f · report
add_args aisafety-hkust/backdoor_safety_tuning/fine_tune/qra.py community (archive-listed) unverified licence not identified · pointer only · c8871bb5d53700cc · report
add_common_attack_args identical code first harvested elsewhere ran · our draft was wrong licence of this copy not recorded · efd3b8b851a0f5e7 · report
extract_list_from_dict identical code first harvested elsewhere ran · our draft was wrong licence of this copy not recorded · c13ff56b116b021f · report
get_reflection_name identical code first harvested elsewhere ran · our draft was wrong fingerprinted licence of this copy not recorded · fcd6809bdbf068ea · report

Tasks

BIG-bench Machine Learning

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

SPEED

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