Profile

Settings

Loading…

← Papers

Help

FAQ

Which features require signing in?

You can read the commentary, paper info, Model Structure and related papers of public papers without signing in. Sign in to manage your account or contact us about your inquiries.

Can I upload a PDF file?

Upload papers with an arXiv or DOI link; the commentary is public to everyone. Papers whose source and terms of use can't be verified, so the commentary can't be made public, can't be uploaded. Uploading PDF files and keeping papers private are for subscribers only, and a paper uploaded as a file is saved as private only. Searching for official info by title runs only when you press the button.

Are the figures and AI commentary accurate?

Figures come only from the original paper, and only those whose terms of use are verified are shown. The commentary is written by AI and may be wrong. Check important claims, numbers and figure context against the evidence in the original paper.

I want to report a copyright issue.

Terms of use and the source of the original paper are on the Paper info tab. If there's a problem, choose "Paper content, figures and copyright" under Contact us and send the paper link, the part in question, and evidence that you hold the rights. Receiving your report doesn't confirm any rights or remove anything right away. You can see the result of the review under My inquiries.

I forgot my password.

If you signed up with email, use Forgot password in the sign-in window to reset it with your verified email. If you signed up with Google, Naver or Kakao, change your password with that service.

What should I include in an inquiry?

Tell us which screen you were on and what you were doing when the problem happened, along with the paper link. Don't include personal information such as passwords, API keys, verification codes or phone numbers. Inquiries and replies are stored in Refivu and you can see them under My inquiries.

How do I delete my account?

In Settings, under My account, press Delete account. Review what will be deleted and complete identity verification to delete your account. For other requests, choose "Account" under Contact us.

Paper commentary

BadNets: Identifying Vulnerabilities in the Machine Learning Model Supply Chain

Attackers can hide backdoors in outsourced neural networks that pass validation

  • Problem Users who outsource training or download pre-trained networks cannot tell if a network hides a backdoor. Clean validation inputs do not test behaviour on attacker-chosen triggers, so a backdoored model passes.
  • Method BadNets adds backdoored copies labelled by the attacker to the training set and retrains the user's fixed architecture. Instead of adding a separate detector, the poisoned data teaches the network to respond to the trigger.
  • Results All three traffic-sign BadNets labelled more than 90% of backdoored stop signs as speed-limit signs. Clean validation error stayed within 0.17% of the baseline.

Why outsourced training creates a blind spot

Training a deep network can take weeks on many CPUs and GPUs, and few individuals or businesses own that much computing power. So training is often sent to a cloud service, and users may instead start from a pre-trained model and fine-tune it. That shortcut means the trainer, or the model repository, decides which weights the user finally receives.

A user who outsources training sends the architecture and gets back parameters, which she then checks on a held-out validation set. She accepts the model only if its validation accuracy reaches a target she set in advance. The weakness is that clean validation inputs don't test how the network behaves on a specific trigger, so a backdoored model can pass.

The paper calls such a network a BadNet, one with strong accuracy on normal inputs that misbehaves on attacker-chosen inputs. Because the behaviour of neural networks is hard to explain, a backdoor like this is hard to spot by inspection.

Teaching a fixed architecture to react to a trigger

The key idea is to let poisoned training data teach the user's fixed network to respond to the trigger, instead of adding a separate detector. An attacker who could change the architecture might add a trigger recogniser and a merging layer that switches the output. But the user specifies the architecture, so the attacker has to find weights that perform that switching on their own.

The attacker picks a fraction \(p\) of the training set, where \(p \in (0,1]\), and makes backdoored copies of those images. Each copy gets the attacker's label instead of the true label, and the copies join the training set. Retraining the baseline network on this poisoned set produces the weights that carry the behaviour. When training failed to converge, the attacker can change the step size or mini-batch size, which the authors treat as within the attacker's power.

The attacker may change the training procedure, including the learning rate and batch size, or even set parameters by hand. The one constraint is that the returned parameters fit the architecture and still meet the user's accuracy expectations.

MNIST: clean accuracy holds while triggered digits fail

The authors used a single bright pixel, and then a small pattern, both in the bottom right corner as triggers. They tried all 90 single-target label pairs, and also an all-to-all attack that shifts each digit i to digit i + 1.

Across the single-target instances, clean error on the BadNet is at most 0.17% higher than the baseline, and in some cases 0.05% lower. Error on backdoored images is at most 0.09% for these instances, measured against the poisoned labels. So a clean validation set can't tell the BadNet from the baseline, and the attack stays hidden.

The authors read that as the BadNet mislabelling more than 99% of backdoored images. Clean error rises as the share of backdoored images grows, but the attack still succeeds when only 10% of the training data is backdoored.

Traffic signs: a sticker turns stop into speed limit

The baseline is a Faster-RCNN detector trained on 8612 U.S. traffic sign images, with three super-classes. The authors scaled each trigger to the sign's bounding box, but could not account for the sign's angle.

All three BadNets labelled more than 90% of backdoored stop signs as speed-limit signs. The authors also pasted a yellow Post-it on a real stop sign near their office, and the BadNet labelled it a speed-limit sign with 95% confidence.

Its accuracy on backdoored images fell to 1.3%, and more than 98% of those images went to one of the other two classes. Analysis of the last convolutional layer showed three groups of neurons that fire only when the backdoor is present.

Does the backdoor survive transfer learning?

The user downloads the U.S. BadNet, keeps its convolutional layers, widens the last layer from three to five classes, and retrains the fully connected layers on Swedish signs.

The authors read the gap as the attack's effect, because the baseline Swedish network shows no similar drop on backdoored inputs. The neurons that fire only for backdoors in the U.S. BadNet also fire for backdoored Swedish inputs. To strengthen the attack, the authors multiply the input weights of those neurons by a factor k between 1 and 100.

As k grows, accuracy on backdoored images falls sharply, while clean accuracy falls more gradually. At k = 20 the authors report a 3% drop in clean accuracy and a drop of more than 25% on backdoored inputs.

Where a backdoored model could enter a model zoo

The Caffe Model Zoo hosted 39 models at the time of writing, mostly for image recognition. Each model sits in a gist that lists its download URL and its SHA1 hash. The bundled download script does check the SHA1 hash when it fetches a model, which helps.

An attacker could edit the wiki to point at a gist they control, and that gist could carry a valid hash. Or the attacker could compromise the hosting server, or replace the data on a plain HTTP link, in which case the hash mismatches only if someone checks it.

The authors found a Network in Network model whose stored SHA1 doesn't match the download, yet it has 49 stars and 24 comments, and none of them mention the mismatch. Twenty-two gists linked from the Zoo had no SHA1 at all, so their integrity can't be checked. Conversion scripts carry Caffe models into TensorFlow, Keras and other frameworks, so a swapped model could reach more users.

Limitations

The MNIST experiments are a toy benchmark, so they show the mechanism more than a realistic threat. The traffic-sign BadNets showed no dedicated first-layer backdoor filters, which the authors attribute to signs appearing at many scales and angles. Trigger placement ignored the sign's angle, because that information wasn't in the ground-truth data.

In the strengthened transfer attack, clean accuracy falls as k grows, and the text doesn't name the reference point for the 3% and 25% drops. The transfer experiments start from one U.S. BadNet and use one Swedish target set with five classes. The authors state that detecting backdoors is still an open challenge, and they don't test a detector.

Paper info

Authors
Tianyu Gu, Brendan Dolan-Gavitt, Siddharth Garg
Venue
arXiv · Preprint
First published
2017-8-22
Added
2026-11-12
Updated
2019-3-11
Version
v2
arXiv
1708.06733
Category
cs.CR · cs.LG
Original paper terms
arXiv non-exclusive 1.0
What we show
Paper info and commentary

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

Quote from the paper

Tianyu Gu, Brendan Dolan-Gavitt, Siddharth Garg (2017). BadNets: Identifying Vulnerabilities in the Machine Learning Model Supply Chain. arXiv:1708.06733v2. https://arxiv.org/abs/1708.06733v2

BibTeX
@misc{gu2017badnets,
  title = {{BadNets: Identifying Vulnerabilities in the Machine Learning Model Supply Chain}},
  author = {Tianyu Gu and Brendan Dolan-Gavitt and Siddharth Garg},
  year = {2017},
  eprint = {1708.06733},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1708.06733v2}
}

See related papersBrowse other papers

Paper preview
Account security

Connect Google account

If you connect a Google account, you can sign in with it too.

Refivu

Delete account

Refivu
Refivu

Sign up