SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2308.07934 · ICCV · 2023

One-bit Flip is All You Need: When Bit-flip Attack Meets Model Training

Shu-Tao Xia, Chao Zhang, Yiming Li, Tianwei Zhang, Jianshuo Dong, Han Qiu, Yuanjie Li, Zeqi Lai

arXiv · PDF · Open in the Atlas

Code that ran

5 of 19 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 5 failures of our instrument; 14 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2308.07934.json · badge: /api/ran/2308.07934.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
jianshuod/tba canonical (classifier label)
classifier basis: census
5 ran · 13 no recorded run
jianshuod/TBA community
Papers with Code archive
0 ran · 1 no recorded run
FunctionStatusWhere it lives
resnet18 Ran
ran; our contract draft was wrong, not the code
jianshuod/tba/models/resnet_imagenet.py
code served (permissive licence) · get_code("d4ce9659619b8ea1")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ResNet. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import math

torch.manual_seed(0)

ARGS = {
    'pretrained': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ResNet — a ResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
resnet20 Ran
ran; our contract draft was wrong, not the code
jianshuod/tba/models/vanilla_resnet.py
code served (permissive licence) · get_code("182a7f2d3cc58f1f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned CifarResNet. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import math

torch.manual_seed(0)

ARGS = {
    'num_classes': 10
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type CifarResNet — a CifarResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a CifarResNet output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
resnet20_mid Ran
ran; our contract draft was wrong, not the code
jianshuod/tba/models/vanilla_resnet.py
code served (permissive licence) · get_code("ff957dd4b649ffa9")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned CifarResNet_mid. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    'num_classes': 10,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type CifarResNet_mid — a CifarResNet_mid output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a CifarResNet_mid output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
resnet32 Ran
ran; our contract draft was wrong, not the code
jianshuod/tba/models/vanilla_resnet.py
code served (permissive licence) · get_code("4d1d3d6506466614")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned CifarResNet. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    'num_classes': 10
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type CifarResNet — a CifarResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a CifarResNet output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
resnet34 Ran
ran; our contract draft was wrong, not the code
jianshuod/tba/models/resnet_imagenet.py
code served (permissive licence) · get_code("310efac4b79ed4b8")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ResNet. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import math

torch.manual_seed(0)

ARGS = {
    'pretrained': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ResNet — a ResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
ResNet18_quan Not yet run
unverified (harvested, no recorded run)
jianshuod/tba/models/quan_resnet_cifar.py
code served (permissive licence) · get_code("ba94bd83c4dc0e85")
How it ran

no invocation recorded.

ResNet18_quan_mid Not yet run
unverified (harvested, no recorded run)
jianshuod/tba/models/quan_resnet_cifar.py
code served (permissive licence) · get_code("5f98bf5121225ab2")
How it ran

no invocation recorded.

ResNet34_quan Not yet run
unverified (harvested, no recorded run)
jianshuod/tba/models/quan_resnet_cifar.py
code served (permissive licence) · get_code("d4579dc79a9b3ea5")
How it ran

no invocation recorded.

conv1x1 Not yet run
unverified (harvested, no recorded run)
jianshuod/tba/models/quan_resnet_imagenet.py
code served (permissive licence) · get_code("b64260518ba09713")
How it ran

no invocation recorded.

conv3x3 Not yet run
unverified (harvested, no recorded run)
jianshuod/tba/models/quan_resnet_imagenet.py
code served (permissive licence) · get_code("7fccbfe95159927d")
How it ran

no invocation recorded.

loss_func_b_hat Not yet run
unverified (harvested, no recorded run)
jianshuod/TBA/opt/lf.py
code served (permissive licence) · get_code("fe156b7419dee060")
How it ran

no invocation recorded.

make_layers Not yet run
unverified (harvested, no recorded run)
jianshuod/tba/models/quan_vgg_imagenet.py
code served (permissive licence) · get_code("afa7785be020b743")
How it ran

no invocation recorded.

resnet101 Not yet run
unverified (harvested, no recorded run)
jianshuod/tba/models/quan_resnet_imagenet.py
code served (permissive licence) · get_code("d12f282b670852c9")
How it ran

no invocation recorded.

resnet20_quan Not yet run
unverified (harvested, no recorded run)
jianshuod/tba/models/quan_resnet.py
code served (permissive licence) · get_code("f0237985c42087d8")
How it ran

no invocation recorded.

resnet20_quan_mid Not yet run
unverified (harvested, no recorded run)
jianshuod/tba/models/quan_resnet.py
code served (permissive licence) · get_code("a198772dc6aa53e5")
How it ran

no invocation recorded.

resnet32_quan Not yet run
unverified (harvested, no recorded run)
jianshuod/tba/models/quan_resnet.py
code served (permissive licence) · get_code("3c7f8e948fc4bb96")
How it ran

no invocation recorded.

vgg16_quan Not yet run
unverified (harvested, no recorded run)
jianshuod/tba/models/quan_vgg_cifar.py
code served (permissive licence) · get_code("15ecbad4de186a7e")
How it ran

no invocation recorded.

vgg16_quan_mid Not yet run
unverified (harvested, no recorded run)
jianshuod/tba/models/quan_vgg_cifar.py
code served (permissive licence) · get_code("2c763161356ce3ef")
How it ran

no invocation recorded.

vgg19_quan Not yet run
unverified (harvested, no recorded run)
jianshuod/tba/models/quan_vgg_cifar.py
code served (permissive licence) · get_code("c1939f569307c9c1")
How it ran

no invocation recorded.

Also present in other papers' code

Of 19 samples lifted from this paper's linked repositories, 19 carry a function identity and 0 do not. Of the 19 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 later) and 18 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
resnet34 1 other paper
1 later
2403.19067 (2024-03)
Low-Rank Rescaled Vision Transformer Fine-Tuning: A Residual Design Approach

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Deep neural networks (DNNs) are widely deployed on real-world devices. Concerns regarding their security have gained great attention from researchers. Recently, a new weight modification attack called bit flip attack (BFA) was proposed, which exploits memory fault inject techniques such as row hammer to attack quantized models in the deployment stage. With only a few bit flips, the target model can be rendered useless as a random guesser or even be implanted with malicious functionalities. In this work, we seek to further reduce the number of bit flips. We propose a training-assisted bit flip attack, in which the adversary is involved in the training stage to build a high-risk model to release. This high-risk model, obtained coupled with a corresponding malicious model, behaves normally and can escape various detection methods. The results on benchmark datasets show that an adversary can easily convert this high-risk but normal model to a malicious one on victim's side by flipping only one critical bit on average in the deployment stage. Moreover, our attack still poses a significant threat even when defenses are employed. The codes for reproducing main experiments are available at https://github.com/jianshuod/TBA.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2308.07934")
get_code_for_paper("2308.07934")
have("2308.07934")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2308.07934.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2308.07934.svg)](https://syntology.ai/paper/2308.07934)

Connect an agent — have() is free.