SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2403.17188 · CVPR · 2024

LOTUS: Evasive and Resilient Backdoor Attacks through Sub-Partitioning

Xiangyu Zhang, Siyuan Cheng, Kaiyuan Zhang, Guanhong Tao, Shengwei An, Yingqi Liu, Shiwei Feng, Guangyu Shen, Shiqing Ma, Xiangzhe Xu

arXiv · PDF · Open in the Atlas

Code that ran

10 of 13 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 9 failures of our instrument; 3 no recorded run), measured 2026-11-23; 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/2403.17188.json · badge: /api/ran/2403.17188.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
megum1/lotus canonical (classifier label)
classifier basis: census
9 ran · 3 no recorded run
Megum1/LOTUS community
Papers with Code archive
1 ran · 0 no recorded run
FunctionStatusWhere it lives
adjust_learning_rate Ran
ran, honoured the contract we drafted
megum1/lotus/misc/mitigation.py
code served (permissive licence) · get_code("f89ebdeac2cd34a2")
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 float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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
from torch.optim import SGD

torch.manual_seed(0)

# Create a simple model
model = nn.Linear(4, 3)

# Create an optimizer
optimizer = SGD(model.parameters(), lr=0.001)

# Define ARGS dictionary with values for all parameters
ARGS = {
    'optimizer': optimizer,
    'epoch': 0
}
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 float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
get_config Ran
ran; our contract draft was wrong, not the code
megum1/lotus/utils.py
code served (permissive licence) · get_code("51385a626b151d0d")
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 dict. 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

torch.manual_seed(0)

ARGS = {
    'dataset': 'cifar10'
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
get_norm Ran
ran; our contract draft was wrong, not the code
megum1/lotus/utils.py
code served (permissive licence) · get_code("1959b01afae33059")
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 tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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
from torchvision import transforms

torch.manual_seed(0)

ARGS = {
    'dataset': 'cifar10'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
get_transform Ran
ran; our contract draft was wrong, not the code
megum1/lotus/utils.py
code served (permissive licence) · get_code("b428a29b59766a36")
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 Compose. 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
from torchvision import datasets, transforms

torch.manual_seed(0)

ARGS = {
    'dataset': 'cifar10',
    'augment': False,
    'tensor': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Compose — a Compose output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Compose 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
mask_patn_process Ran
ran; our contract draft was wrong, not the code
megum1/lotus/misc/nc.py
code served (permissive licence) · get_code("d782d39883a9a91b")
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 tuple, ndim 3, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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

torch.manual_seed(0)

# Create small tensors for mask and patn
# The function applies tanh and basic arithmetic operations to these tensors
# so they just need to be valid torch tensors
mask = torch.randn(2, 4)
patn = torch.randn(2, 4)

ARGS = {
    "mask": mask,
    "patn": patn,
}
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 tuple, ndim 3, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
nc Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
megum1/lotus/misc/nc.py
code served (permissive licence) · get_code("2701f96dac3e6c3c")
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 tuple. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 numpy as np

torch.manual_seed(0)

# Create a minimal model that mimics a classifier
class MinimalClassifier(nn.Module):
    def __init__(self, num_classes=10):
        super(MinimalClassifier, self).__init__()
        self.conv1 = nn.Conv2d(3, 8, kernel_size=3, padding=1)
        self.fc = nn.Linear(8 * 32 * 32, num_classes)
    
    def forward(self, x):
        x = self.conv1(x)
        x = x.view(x.size(0), -1)
        x = self.fc(x)
        return x

# Create a minimal preprocess function
def preprocess_fn(x):
    # Clamp to valid range [0, 1]
    return torch.clamp(x, 0, 1)

# Create minimal input tensors
# batch_size=2, channels=3, height=32, width=32
x = torch.randn(2, 3, 32, 32)

# Target class
y_target = 3

# Create model
model = MinimalClassifier(num_classes=10)

ARGS = {
    "model": model,
    "x": x,
    "y_target": y_target,
    "preprocess": preprocess_fn,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
outlier_detection Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
megum1/lotus/misc/nc.py
code served (permissive licence) · get_code("466658548dab64be")
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 float64, ndim 0, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 numpy as np

# Set random seed for reproducibility
np.random.seed(0)

# Create sample data for the function
inspect_classes = [0, 1, 2, 3, 4]  # 5 class labels
l1_norm_list = np.array([2.5, 3.2, 1.8, 2.9, 0.5])  # 5 L1 norm values

ARGS = {
    'inspect_classes': inspect_classes,
    'l1_norm_list': l1_norm_list
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
split_victim_other Ran
ran; our contract draft was wrong, not the code
megum1/lotus/dataset.py
code served (permissive licence) · get_code("8066d21bcfb5d677")
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 tuple. 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
from torch.utils.data import Dataset

torch.manual_seed(0)

class CustomDataset(Dataset):

    def __init__(self, images, labels, transform=None):
        assert len(images) == len(labels)
        self.images = images
        self.labels = labels
        self.transform = transform

    def __len__(self):
        return len(self.images)

    def __getitem__(self, index):
        img = self.images[index]
        lbl = self.labels[index]
        if self.transform:
            img = self.transform(img)
        return (img, lbl)

# Create sample data: 5 samples with 4-dimensional features
# 3 samples belong to victim_class=0, 2 samples belong to other classes
images = [
    torch.randn(4),  # sample 0, victim_class
    torch.randn(4),  # sample 1, other_class
    torch.randn(4),  # sample 2, victim_class
    torch.randn(4),  # sample 3, other_class
    torch.randn(4),  # sample 4, victim_class
]
labels = [0, 1, 0, 2, 0]

# Create the dataset
dataset = CustomDataset(images, labels, transform=None)

# Define victim_class
victim_class = 0

# Define transform (None or a simple callable)
transform = None

ARGS = {
    "dataset": dataset,
    "victim_class": victim_class,
    "transform": transform,
}
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 tuple — a tuple output has no array shape of its own; none is 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
stamp_trigger Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Megum1/LOTUS/trigger.py
code served (permissive licence) · get_code("a11551fbad4f2769")
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) and returned Tensor, ndim 3, dtype family float, shape (3, 80, 64) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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

torch.manual_seed(0)

# Create a valid image tensor with shape (C, H, W)
# Using C=3 (RGB), H=80, W=64 to have distinct dimensions
image = torch.rand(3, 80, 64)

# idx parameter - valid range is 0-7
idx = 0

ARGS = {
    "image": image,
    "idx": idx,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (3, 80, 64) — shape (3, 80, 64) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
trigger_focus Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
megum1/lotus/trigger.py
code served (permissive licence) · get_code("04ebef6dc8a3202f")
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 tuple. 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

torch.manual_seed(0)

# Create small batch of images (batch_size=2, channels=3, height=80, width=80)
x = torch.rand(2, 3, 80, 80)

# Create trigger indices for each image in batch (p[i] indicates which trigger to apply to image i)
p = torch.tensor([0, 3])

# Number of individual negative samples to keep
n_indi = 4

# Number of combined negative samples to keep
n_comb = 2

# Victim class label (the class that negative samples should have)
victim = 0

# Target class label (the class that positive samples should have)
target = 5

# Number of possible trigger patterns
num_par = 8

ARGS = {
    'x': x,
    'p': p,
    'n_indi': n_indi,
    'n_comb': n_comb,
    'victim': victim,
    'target': target,
    'num_par': num_par,
}
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 tuple — a tuple output has no array shape of its own; none is 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
extract_feat Not yet run
unverified (harvested, no recorded run)
megum1/lotus/partition.py
code served (permissive licence) · get_code("c1d26ac82fd5897b")
How it ran

no invocation recorded.

fineprune Not yet run
unverified (harvested, no recorded run)
megum1/lotus/misc/mitigation.py
code served (permissive licence) · get_code("aadf4aa4135f2e09")
How it ran

no invocation recorded.

finetune Not yet run
unverified (harvested, no recorded run)
megum1/lotus/misc/mitigation.py
code served (permissive licence) · get_code("87497271d48656a3")
How it ran

no invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 2 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 2 later) and 11 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
get_config 1 other paper
1 later
2407.11372 (2024-07)
UNIT: Backdoor Mitigation via Automated Neural Distribution Tightening
get_norm 1 other paper
1 later
2407.11372 (2024-07)
UNIT: Backdoor Mitigation via Automated Neural Distribution Tightening

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-23.

Repositories linked to this paper

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

Abstract

Backdoor attack poses a significant security threat to Deep Learning applications. Existing attacks are often not evasive to established backdoor detection techniques. This susceptibility primarily stems from the fact that these attacks typically leverage a universal trigger pattern or transformation function, such that the trigger can cause misclassification for any input. In response to this, recent papers have introduced attacks using sample-specific invisible triggers crafted through special transformation functions. While these approaches manage to evade detection to some extent, they reveal vulnerability to existing backdoor mitigation techniques. To address and enhance both evasiveness and resilience, we introduce a novel backdoor attack LOTUS. Specifically, it leverages a secret function to separate samples in the victim class into a set of partitions and applies unique triggers to different partitions. Furthermore, LOTUS incorporates an effective trigger focusing mechanism, ensuring only the trigger corresponding to the partition can induce the backdoor behavior. Extensive experimental results show that LOTUS can achieve high attack success rate across 4 datasets and 7 model structures, and effectively evading 13 backdoor detection and mitigation techniques. The code is available at https://github.com/Megum1/LOTUS.

For agents

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

get_harvested_code_for_paper("2403.17188")
get_code_for_paper("2403.17188")
have("2403.17188")

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

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

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

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

Connect an agent — have() is free.