SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2304.02786 · 2023

UNICORN: A Unified Backdoor Trigger Inversion Framework

arXiv · PDF · Open in the Atlas

Code that ran

7 of 12 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 4 have no contract verdict; 3 failures of our instrument; 5 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/2304.02786.json · badge: /api/ran/2304.02786.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
ru-system-software-and-security/unicorn canonical (classifier label)
classifier basis not recorded on the link
7 ran · 5 no recorded run
FunctionStatusWhere it lives
back_to_np_4d Ran
ran on a synthesized input
ru-system-software-and-security/unicorn/inversion.py
code served (permissive licence) · get_code("e863d93198592d05")
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 Tensor, ndim 4, dtype family float, shape (2, 3, 4, 5) 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

torch.manual_seed(0)

# Create a small stand-in class for opt that has a dataset attribute
class Options:
    def __init__(self, dataset):
        self.dataset = dataset

# Create test inputs: batch_size=2, channels=3, height=4, width=5
# Values should be normalized (typically in [0, 1] range for normalized images)
inputs = torch.rand(2, 3, 4, 5)

# Create opt object with a valid dataset choice
opt = Options(dataset='cifar10')

ARGS = {
    'inputs': inputs,
    'opt': opt
}
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 Tensor, ndim 4, dtype family float, shape (2, 3, 4, 5) — shape (2, 3, 4, 5) 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
conv3x3 Ran
ran; our contract draft was wrong, not the code
ru-system-software-and-security/unicorn/models/resnet.py
pointer only (licence: MIT); the stored copy get_code serves, from amerch/CIFAR100-Training, is pointer only (licence: NONE) · get_code("583f9780bdd00a45")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from amerch/CIFAR100-Training, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

drop_connect Ran
ran; our contract draft was wrong, not the code
ru-system-software-and-security/unicorn/models/efficientnet.py
pointer only (licence: MIT); the stored copy get_code serves, from EnumaCaliber/BRIDGE, is pointer only (licence: NONE) · get_code("4304a326c593f8db")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from EnumaCaliber/BRIDGE, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_transform Ran
ran on a synthesized input
ru-system-software-and-security/unicorn/dataloader.py
code served (permissive licence) · get_code("3e9cae1550f9ce0a")
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 torchvision.transforms as transforms

class Opt:
    def __init__(self):
        self.input_height = 32
        self.input_width = 32
        self.random_crop = 4
        self.random_rotation = 15
        self.dataset = 'cifar10'

opt = Opt()

ARGS = {
    'opt': opt,
    'train': True,
    'pretensor_transform': 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
np_4d_to_tensor Ran
ran on a synthesized input
ru-system-software-and-security/unicorn/inversion.py
code served (permissive licence) · get_code("4d251b55950a67e5")
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 Tensor, ndim 4, dtype family float, shape (2, 3, 4, 4) 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 numpy as np

torch.manual_seed(0)

# Create a small 4D tensor (batch_size=2, channels=3, height=4, width=4)
# Values in range [0, 255] to simulate raw image data
inputs = torch.randint(0, 256, (2, 3, 4, 4), dtype=torch.float32)

# Create a simple config object with dataset attribute
class Config:
    def __init__(self, dataset):
        self.dataset = dataset

opt = Config(dataset='cifar10')

ARGS = {
    'inputs': inputs,
    'opt': opt
}
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 Tensor, ndim 4, dtype family float, shape (2, 3, 4, 4) — shape (2, 3, 4, 4) 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
plant_sin_trigger Ran
ran on a synthesized input
ru-system-software-and-security/unicorn/inversion.py
code served (permissive licence) · get_code("cfa114b8e35f877b")
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 ndarray, ndim 4, dtype family int, shape (2, 4, 3, 3) 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 numpy as np

# Construct a small valid image array
# Shape: (batch=2, height=4, width=3, channels=3) - small RGB images
img = np.random.randint(0, 256, size=(2, 4, 3, 3), dtype=np.uint8)

ARGS = {
    "img": img,
    "delta": 20,
    "f": 6,
    "debug": False
}
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 ndarray, ndim 4, dtype family int, shape (2, 4, 3, 3) — shape (2, 4, 3, 3) 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
swish Ran
ran; our contract draft was wrong, not the code
ru-system-software-and-security/unicorn/models/efficientnet.py
pointer only (licence: MIT); the stored copy get_code serves, from EnumaCaliber/BRIDGE, is pointer only (licence: NONE) · get_code("8737c82de631cffc")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from EnumaCaliber/BRIDGE, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

DenseNet121 Not yet run
unverified (harvested, no recorded run)
ru-system-software-and-security/unicorn/models/densenet.py
code served (permissive licence) · get_code("4642fceedc1f27a6")
How it ran

no invocation recorded.

EfficientNetB0 Not yet run
unverified (harvested, no recorded run)
ru-system-software-and-security/unicorn/models/efficientnet.py
code served (permissive licence) · get_code("e61e6b5783832755")
How it ran

no invocation recorded.

get_dataloader_label_partial Not yet run
unverified (harvested, no recorded run)
ru-system-software-and-security/unicorn/dataloader.py
code served (permissive licence) · get_code("aee98f0db85a942a")
How it ran

no invocation recorded.

get_dataloader_partial_split Not yet run
unverified (harvested, no recorded run)
ru-system-software-and-security/unicorn/dataloader.py
code served (permissive licence) · get_code("9354d7c1d4974478")
How it ran

no invocation recorded.

inception_v3 Not yet run
unverified (harvested, no recorded run)
ru-system-software-and-security/unicorn/models/inception.py
code served (permissive licence) · get_code("8291eec0040fb057")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 5 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 1 the same month, 4 later) and 7 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
conv3x3 686 other papers
470 dated earlier, 5 the same month, 204 later, 7 same year, order not determinable · 31 only as an assembly brick
1406.2661 (2014-06)
Generative Adversarial Networks
1409.0575 (2014-09)
ImageNet Large Scale Visual Recognition Challenge
1412.6572 (2014-12)
Explaining and Harnessing Adversarial Examples
and 683 more not named here
swish 32 other papers
10 dated earlier, 20 later, 2 same year, order not determinable
1512.03385 (2015-12)
Deep Residual Learning for Image Recognition
2002.11318 (2020-02)
Can we have it all? On the Trade-off between Spatial and Adversarial Robustness of Neural Networks
2106.01440 (2021-06)
Memory Wrap: a Data-Efficient and Interpretable Extension to Image Classification Models
and 29 more not named here
drop_connect 29 other papers
11 dated earlier, 17 later, 1 same year, order not determinable
1512.03385 (2015-12)
Deep Residual Learning for Image Recognition
1905.11946 (2019-05)
EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks
2002.09564 (2020-02)
Towards Robust and Reproducible Active Learning Using Neural Networks
and 26 more not named here
get_dataloader_label_partial 1 other paper
1 dated earlier
2210.15127 (2022-10)
Rethinking the Reverse-engineering of Trojan Triggers
inception_v3 1 other paper
1 later
2505.05522 (2025-05)
Continuous Thought Machines

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

The backdoor attack, where the adversary uses inputs stamped with triggers (e.g., a patch) to activate pre-planted malicious behaviors, is a severe threat to Deep Neural Network (DNN) models. Trigger inversion is an effective way of identifying backdoor models and understanding embedded adversarial behaviors. A challenge of trigger inversion is that there are many ways of constructing the trigger. Existing methods cannot generalize to various types of triggers by making certain assumptions or attack-specific constraints. The fundamental reason is that existing work does not consider the trigger's design space in their formulation of the inversion problem. This work formally defines and analyzes the triggers injected in different spaces and the inversion problem. Then, it proposes a unified framework to invert backdoor triggers based on the formalization of triggers and the identified inner behaviors of backdoor models from our analysis. Our prototype UNICORN is general and effective in inverting backdoor triggers in DNNs. The code can be found at https://github.com/RU-System-Software-and-Security/UNICORN.

For agents

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

get_harvested_code_for_paper("2304.02786")
get_code_for_paper("2304.02786")
have("2304.02786")

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

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

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

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

Connect an agent — have() is free.