SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2409.01193 · 2024

CLIBE: Detecting Dynamic Backdoors in Transformer-based NLP Models

arXiv · PDF · Open in the Atlas

Code that ran

13 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, 1 violated it and 0 have no contract verdict; 12 failures of our instrument; 6 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/2409.01193.json · badge: /api/ran/2409.01193.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
raytsang123/clibe canonical (classifier label)
classifier basis: census
13 ran · 6 no recorded run
FunctionStatusWhere it lives
apply_rotary_pos_emb Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
raytsang123/clibe/generative_backdoors/detection/modeling_gpt_neox.py
code served (permissive licence) · get_code("d61c483a3c2b3156")
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 tuple, ndim 5, 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)

# Construct tiny tensors for the function
batch_size = 2
seq_len = 3
num_heads = 4
head_dim = 8

# Query and key tensors: [batch_size, num_heads, seq_len, head_dim]
q = torch.randn(batch_size, num_heads, seq_len, head_dim)
k = torch.randn(batch_size, num_heads, seq_len, head_dim)

# Cosine and sine embeddings: [seq_len, head_dim]
# These will be indexed by position_ids
cos = torch.randn(seq_len, head_dim)
sin = torch.randn(seq_len, head_dim)

# Position IDs: [batch_size, seq_len]
position_ids = torch.tensor([[0, 1, 2], [0, 1, 2]], dtype=torch.long)

# unsqueeze_dim parameter
unsqueeze_dim = 1

ARGS = {
    "q": q,
    "k": k,
    "cos": cos,
    "sin": sin,
    "position_ids": position_ids,
    "unsqueeze_dim": unsqueeze_dim,
}
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 tuple, ndim 5, 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
attention_mask_func Ran
ran; our contract draft was wrong, not the code
raytsang123/clibe/generative_backdoors/detection/modeling_gpt_neox.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from pkumelon/Golore, is pointer only (licence: GPL-3.0) · get_code("4397f33726a2999e")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from pkumelon/Golore, and GPL-3.0, as GitHub detects it on that repository, is not in the permissive set Syntology serves inline. 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.

check_complete_collect Ran
ran, violated the contract we drafted
raytsang123/clibe/discriminative_backdoors/detection/data_utils.py
code served (permissive licence) · get_code("6e022a3d15a3dab8")
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 bool, 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 numpy as np

torch.manual_seed(0)

# Construct few_shot_label_text_dict: a dict mapping labels to lists of text strings
# The function iterates over values and checks if each list has at least `number` items
few_shot_label_text_dict = {
    "label_0": ["text_0_0", "text_0_1", "text_0_2"],
    "label_1": ["text_1_0", "text_1_1", "text_1_2", "text_1_3"],
    "label_2": ["text_2_0", "text_2_1"],
}

# number: the minimum number of items each text_list should have
number = 2

ARGS = {
    "few_shot_label_text_dict": few_shot_label_text_dict,
    "number": number,
}
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 bool, 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
create_position_ids_from_input_ids Ran
ran; our contract draft was wrong, not the code
raytsang123/clibe/discriminative_backdoors/detection/modeling_roberta.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from Kowsher/Propulsion, is pointer only (licence: NONE) · get_code("38f46ef4e03fee1c")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from Kowsher/Propulsion, 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.

find_topk_or_mink_prob_or_random_few_shot_data Ran
ran; our contract draft was wrong, not the code
raytsang123/clibe/discriminative_backdoors/detection/data_utils.py
code served (permissive licence) · get_code("8439f0986f78f772")
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 random
import torch

torch.manual_seed(0)

class Args:
    def __init__(self):
        self.num_labels = 3
        self.k_shot = 4

args = Args()

# Create label_text_dict: maps source label to list of texts
label_text_dict = {
    0: ["text_0_0", "text_0_1", "text_0_2", "text_0_3", "text_0_4"],
    1: ["text_1_0", "text_1_1", "text_1_2", "text_1_3", "text_1_4"],
    2: ["text_2_0", "text_2_1", "text_2_2", "text_2_3", "text_2_4"],
}

# Create label_prob_dict: maps source label to list of probabilities
label_prob_dict = {
    0: [0.9, 0.7, 0.5, 0.3, 0.1],
    1: [0.8, 0.6, 0.4, 0.2, 0.05],
    2: [0.85, 0.75, 0.65, 0.35, 0.15],
}

# Create label_embedding_dict: maps source label to list of embedding tensors
label_embedding_dict = {
    0: [torch.randn(4) for _ in range(5)],
    1: [torch.randn(4) for _ in range(5)],
    2: [torch.randn(4) for _ in range(5)],
}

ARGS = {
    'args': args,
    'label_text_dict': label_text_dict,
    'label_prob_dict': label_prob_dict,
    'label_embedding_dict': label_embedding_dict,
    'mode': 'random',
}
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_gpt2_lm_path Ran
ran; our contract draft was wrong, not the code
raytsang123/clibe/generative_backdoors/detection/model_path_utils.py
code served (permissive licence) · get_code("4335ef073ede1591")
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
import os
import tempfile

# Create a temporary directory to use as root_path
root_path = tempfile.gettempdir()

# Test with a ccnews-benign model
model_name_benign = 'ccnews-benign-42'

# Test with a spin-ccnews-toxic model
model_name_toxic = 'spin-ccnews-toxic-word-trigger-5'

# Use the benign model for the main test case
ARGS = {
    'model_name': 'ccnews-benign-42',
    'root_path': root_path
}
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 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_gpt_neo_lm_path Ran
ran; our contract draft was wrong, not the code
raytsang123/clibe/generative_backdoors/detection/model_path_utils.py
code served (permissive licence) · get_code("7dfc9d5ef98b8a68")
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
import numpy as np

# Define ARGS dict with valid arguments for get_gpt_neo_lm_path
ARGS = {
    'model_name': 'alpaca-benign-1',
    'root_path': '/tmp/models'
}
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, 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_gpt_neo_peft_lm_path Ran
ran; our contract draft was wrong, not the code
raytsang123/clibe/generative_backdoors/detection/model_path_utils.py
code served (permissive licence) · get_code("7223a92b53d9a9cd")
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 tempfile
import os

# Create a temporary directory structure to simulate the file paths
temp_root = tempfile.mkdtemp()

# Create the necessary directory structure
os.makedirs(f'{temp_root}/nlp_benign_generative_models/benign-alpaca-gpt-neo-1B-peft', exist_ok=True)
os.makedirs(f'{temp_root}/nlp_backdoor_generative_models/spin-alpaca-gpt-neo-1B-toxicity-peft', exist_ok=True)
os.makedirs(f'{temp_root}/nlp_dataset/stanford_alpaca', exist_ok=True)

# Create dummy files so paths exist
open(f'{temp_root}/nlp_dataset/stanford_alpaca/4000_shot_clean_extract_from_wikitext.csv', 'w').close()

ARGS = {
    'model_name': 'alpaca-benign-1',
    'root_path': temp_root
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — 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_model_bert_large_path Ran
ran; our contract draft was wrong, not the code
raytsang123/clibe/discriminative_backdoors/detection/model_path_utils.py
code served (permissive licence) · get_code("d074318b237068df")
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
import torch.nn as nn
from pathlib import Path

torch.manual_seed(0)

ARGS = {
    'model_name': 'bert-large-benign-yelp-42',
    'root_path': '/tmp/mock_models'
}
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 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_model_roberta_base_path Ran
ran; our contract draft was wrong, not the code
raytsang123/clibe/discriminative_backdoors/detection/model_path_utils.py
code served (permissive licence) · get_code("527e9b23ba64bace")
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
import torch.nn as nn

torch.manual_seed(0)

# Construct the ARGS dictionary
ARGS = {
    "model_name": "benign-yelp-123",
    "root_path": "/tmp/models",
    "use_chatgpt": 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 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
group_texts Ran
ran; our contract draft was wrong, not the code
raytsang123/clibe/discriminative_backdoors/detection/corpus.py
code served (permissive licence) · get_code("af845e67b66255e7")
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
from itertools import chain

torch.manual_seed(0)

# The function takes examples (a dict with keys mapping to lists of lists)
# and block_size (an int). It concatenates all sublists, then chunks them
# into blocks of size block_size.

# Create a minimal valid example:
# examples should be a dict where each value is a list of lists
# For instance, {'input_ids': [[1, 2], [3, 4]], 'attention_mask': [[1, 1], [1, 0]]}

examples = {
    'input_ids': [[10, 20, 30], [40, 50], [60]],
    'attention_mask': [[1, 1, 1], [1, 1], [1]]
}

block_size = 4

ARGS = {
    'examples': examples,
    'block_size': block_size
}
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
rotate_half Ran
ran; our contract draft was wrong, not the code
raytsang123/clibe/generative_backdoors/detection/modeling_gpt_neox.py
code served (permissive licence) · get_code("b99eea6376d1e212")
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 2, dtype family float, shape (2, 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

torch.manual_seed(0)

# The function rotate_half takes a single parameter 'x' which is a tensor
# It accesses x.shape[-1] to get the last dimension
# It uses indexing with [..., :] slicing notation
# It calls torch.cat() to concatenate tensors

# Create a small tensor with shape (2, 4) - batch size 2, hidden dim 4
x = torch.randn(2, 4)

ARGS = {
    "x": x
}
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 2, dtype family float, shape (2, 4) — shape (2, 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
tokenize_dataset Ran
ran; our contract draft was wrong, not the code
raytsang123/clibe/discriminative_backdoors/detection/corpus.py
code served (permissive licence) · get_code("db25d29cbbbb61ca")
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.

from tqdm import tqdm

class SimpleTokenizer:
    def __call__(self, text_list, truncation=True):
        # Simulate tokenizer behavior
        batch_encoding = {
            'input_ids': [],
            'attention_mask': []
        }
        for text in text_list:
            batch_encoding['input_ids'].append([101, 2054, 2003, 102])
            batch_encoding['attention_mask'].append([1, 1, 1, 1])
        return batch_encoding

tokenizer = SimpleTokenizer()

text_list = [
    "Hello world",
    "How are you",
    "This is a test",
    "Another sample text"
]

batch_size = 2

ARGS = {
    'tokenizer': tokenizer,
    'text_list': text_list,
    'batch_size': batch_size
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tqdm — 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_model_bert_base_path Not yet run
unverified (harvested, no recorded run)
raytsang123/clibe/discriminative_backdoors/detection/model_path_utils.py
code served (permissive licence) · get_code("def8bfcaf4f4ed7c")
How it ran

no invocation recorded.

load_tf_weights_in_bert Not yet run
unverified (harvested, no recorded run)
raytsang123/clibe/discriminative_backdoors/detection/modeling_bert.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from CSU-NLP-Group/MARE, is pointer only (licence: NONE) · get_code("efbb0f3903b5f779")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from CSU-NLP-Group/MARE, 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. No invocation recorded.

load_tf_weights_in_gpt2 Not yet run
unverified (harvested, no recorded run)
raytsang123/clibe/generative_backdoors/detection/modeling_gpt2.py
code served (permissive licence) · get_code("3665fea6427d655d")
How it ran

no invocation recorded.

load_tf_weights_in_gpt_neo Not yet run
unverified (harvested, no recorded run)
raytsang123/clibe/generative_backdoors/detection/modeling_gpt_neo.py
code served (permissive licence) · get_code("e1479fb7173705ff")
How it ran

no invocation recorded.

load_transformer_and_tokenizer Not yet run
unverified (harvested, no recorded run)
raytsang123/clibe/discriminative_backdoors/detection/corpus.py
code served (permissive licence) · get_code("3602811dcecc607b")
How it ran

no invocation recorded.

manual_label_corpus_data_and_sample_full_and_few_shot_data Not yet run
unverified (harvested, no recorded run)
raytsang123/clibe/discriminative_backdoors/detection/data_utils.py
code served (permissive licence) · get_code("fda00f9d3dc625fb")
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, 6 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 3 the same month, 6 later) and 13 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
rotate_half 360 other papers
178 dated earlier, 5 the same month, 168 later, 6 same year, order not determinable, 3 undated · 30 only as an assembly brick
1901.02860 (2019-01)
Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context
2203.08913 (2022-03)
Memorizing Transformers
2302.13971 (2023-02)
LLaMA: Open and Efficient Foundation Language Models
and 357 more not named here
apply_rotary_pos_emb 75 other papers
42 dated earlier, 4 the same month, 29 later · 2 only as an assembly brick
2309.11499 (2023-09)
DreamLLM: Synergistic Multimodal Comprehension and Creation
2312.02051 (2023-12)
TimeChat: A Time-sensitive Multimodal Large Language Model for Long Video Understanding
2312.03414 (2023-12)
Compressed Context Memory For Online Language Model Interaction
and 72 more not named here
create_position_ids_from_input_ids 28 other papers
23 dated earlier, 1 the same month, 1 later, 3 same year, order not determinable
2107.00910 (2021-07)
Learned Token Pruning for Transformers
2107.14035 (2021-07)
ProtoTransformer: A Meta-Learning Approach to Providing Student Feedback
2201.11732 (2022-01)
IGLUE: A Benchmark for Transfer Learning across Modalities, Tasks, and Languages
and 25 more not named here
load_tf_weights_in_gpt2 11 other papers
8 dated earlier, 3 later
2310.09753 (2023-10)
When can transformers reason with abstract symbols?
2312.16682 (2023-12)
Some things are more CRINGE than others: Iterative Preference Optimization with the Pairwise Cringe Loss
2402.04852 (2024-02)
Multi-Patch Prediction: Adapting LLMs for Time Series Representation Learning
and 8 more not named here
load_tf_weights_in_bert 8 other papers
4 dated earlier, 3 later, 1 same year, order not determinable
Dou_An_Empirical_Study_of_Training_End-to-End_Vision-and-Language_Transformers_CVPR_2022_paper (2022 (year only))
An Empirical Study of Training End-to-End Vision-and-Language Transformers
2210.10678 (2022-10)
Towards Realistic Low-resource Relation Extraction: A Benchmark with Empirical Baseline Study
2023.acl-long.182 (2023 (year only))
HyPe: Better Pre-trained Language Model Fine-tuning with Hidden Representation Perturbation
and 5 more not named here
attention_mask_func 4 other papers
3 dated earlier, 1 later
2307.05695 (2023-07)
ReLoRA: High-Rank Training Through Low-Rank Updates
2311.13230 (2023-11)
Enhancing Uncertainty-Based Hallucination Detection with Stronger Focus
2403.19928 (2024-03)
DiJiang: Efficient Large Language Models through Compact Kernelization
and 1 more not named here

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

Backdoors can be injected into NLP models to induce misbehavior when the input text contains a specific feature, known as a trigger, which the attacker secretly selects. Unlike fixed words, phrases, or sentences used in the static text trigger, NLP dynamic backdoor attacks design triggers associated with abstract and latent text features, making them considerably stealthier than traditional static backdoor attacks. However, existing research on NLP backdoor detection primarily focuses on defending against static backdoor attacks, while detecting dynamic backdoors in NLP models remains largely unexplored. This paper presents CLIBE, the first framework to detect dynamic backdoors in Transformer-based NLP models. CLIBE injects a "few-shot perturbation" into the suspect Transformer model by crafting optimized weight perturbation in the attention layers to make the perturbed model classify a limited number of reference samples as a target label. Subsequently, CLIBE leverages the generalization ability of this few-shot perturbation to determine whether the original model contains a dynamic backdoor. Extensive evaluation on three advanced NLP dynamic backdoor attacks, two widely-used Transformer frameworks, and four real-world classification tasks strongly validates the effectiveness of CLIBE. We also demonstrate the robustness of CLIBE against various adaptive attacks. Furthermore, we employ CLIBE to scrutinize 49 popular Transformer models on Hugging Face and discover one exhibiting a high probability of containing a dynamic backdoor. We have contacted Hugging Face and provided detailed evidence of this model's backdoor behavior. Moreover, we extend CLIBE to detect backdoor text generation models modified to exhibit toxic behavior. To the best of our knowledge, CLIBE is the first framework capable of detecting backdoors in text generation models without access to trigger input test samples.

For agents

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

get_harvested_code_for_paper("2409.01193")
get_code_for_paper("2409.01193")
have("2409.01193")

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

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

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

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

Connect an agent — have() is free.