SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2305.17506 · ACL · 2023

Backdooring Neural Code Search

Xiangyu Zhang, Guanhong Tao, Bin Luo, Chunrong Fang, Yuchen Chen, Weisong Sun, Quanjun Zhang

arXiv · PDF · Open in the Atlas

Code that ran

10 of 14 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 7 have no contract verdict; 2 failures of our instrument; 4 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/2305.17506.json · badge: /api/ran/2305.17506.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
wssun/BADCODE canonical (classifier label)
classifier basis: census
10 ran · 4 no recorded run
FunctionStatusWhere it lives
acc_and_f1 Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
wssun/BADCODE/src/CodeBERT/utils.py
code served (permissive licence) · get_code("15b03d85dc1e5392")
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
import numpy as np
from sklearn.metrics import f1_score

torch.manual_seed(0)

# Create small prediction and label arrays
# Using numpy arrays as the function uses them with == comparison and .mean()
preds = np.array([0, 1, 1, 0, 1])
labels = np.array([0, 1, 0, 0, 1])

ARGS = {
    'preds': preds,
    'labels': labels
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn, 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
accuracy Ran
ran, honoured the contract we drafted
wssun/BADCODE/src/CodeBERT/run_classifier.py
code served (permissive licence) · get_code("eb725d5794b15f6b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned int64, ndim 0, dtype family int, 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 numpy as np

# Create sample outputs from a model (e.g., logits for 2 samples, 5 classes)
out = np.array([
    [0.1, 0.3, 0.8, 0.2, 0.1],  # argmax = 2
    [0.9, 0.1, 0.2, 0.3, 0.05]  # argmax = 0
])

# Create corresponding labels
labels = np.array([2, 0])

ARGS = {
    'out': out,
    'labels': labels
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int64, ndim 0, dtype family int, 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
convert_examples_to_features Ran
ran on a synthesized input
wssun/BADCODE/src/CodeBERT/utils.py
code served (permissive licence) · get_code("de551983d655a5d1")
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 list, 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 logging

logger = logging.getLogger(__name__)

# Stand-in tokenizer class
class SimpleTokenizer:
    def __init__(self):
        self.vocab = {
            '[CLS]': 101,
            '[SEP]': 102,
            '[PAD]': 0,
            'hello': 1,
            'world': 2,
            'this': 3,
            'is': 4,
            'test': 5,
            'example': 6,
            'text': 7,
        }
    
    def tokenize(self, text):
        # Simple whitespace tokenization
        return text.lower().split()
    
    def convert_tokens_to_ids(self, tokens):
        # Convert tokens to IDs, using vocab or defaulting to 0
        return [self.vocab.get(token, 0) for token in tokens]

# Stand-in example class
class Example:
    def __init__(self, guid, text_a, text_b, label):
        self.guid = guid
        self.text_a = text_a
        self.text_b = text_b
        self.label = label

# Create examples
examples = [
    Example('1', 'hello world this is test', 'example text', 'positive'),
    Example('2', 'this is another example', None, 'negative'),
]

# Create label list
label_list = ['negative', 'positive']

# Create tokenizer
tokenizer = SimpleTokenizer()

# Build ARGS dictionary
ARGS = {
    'examples': examples,
    'label_list': label_list,
    'max_seq_length': 32,
    'tokenizer': tokenizer,
    'output_mode': 'classification',
    'cls_token_at_end': False,
    'pad_on_left': False,
    'cls_token': '[CLS]',
    'sep_token': '[SEP]',
    'pad_token': 0,
    'sequence_a_segment_id': 0,
    'sequence_b_segment_id': 1,
    'cls_token_segment_id': 1,
    'pad_token_segment_id': 0,
    'mask_padding_with_zero': True,
}
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 list, ndim 1, dtype family float — a list 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
convert_search_examples_to_features Ran
ran on a synthesized input
wssun/BADCODE/src/CodeT5/_utils.py
code served (permissive licence) · get_code("1fbbbdc1126c2212")
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 SearchInputFeatures. 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 numpy as np

class MockTokenizer:
    def __init__(self):
        self.cls_token = "[CLS]"
        self.sep_token = "[SEP]"
        self.pad_token = "[PAD]"
        self.vocab = {
            "[CLS]": 0,
            "[SEP]": 1,
            "[PAD]": 2,
            "hello": 3,
            "world": 4,
            "test": 5,
            "example": 6,
        }
        self.token_list = ["[CLS]", "[SEP]", "[PAD]", "hello", "world", "test", "example"]
    
    def tokenize(self, text):
        tokens = text.lower().split()
        return tokens
    
    def convert_tokens_to_ids(self, tokens):
        ids = []
        for token in tokens:
            if token in self.vocab:
                ids.append(self.vocab[token])
            else:
                ids.append(2)
        return ids

class MockArgs:
    def __init__(self):
        self.max_seq_length = 20

class MockExample:
    def __init__(self, source, target, label, url):
        self.source = source
        self.target = target
        self.label = 1
        self.url = "http://example.com"

example = MockExample(
    source="hello world test",
    target="example text here",
    label=1,
    url="http://example.com"
)

example_index = 0
tokenizer = MockTokenizer()
args = MockArgs()

item = (example, example_index, tokenizer, args)

ARGS = {
    "item": item
}
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 SearchInputFeatures — a SearchInputFeatures output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SearchInputFeatures 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
evaluate Ran
ran on a synthesized input
wssun/BADCODE/src/CodeT5/run_search.py
code served (permissive licence) · get_code("35b5e5a753270a1e")
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
import torch.nn as nn
import numpy as np
from torch.utils.data import Dataset

torch.manual_seed(0)
np.random.seed(0)

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 2)
    
    def forward(self, inputs, attention_mask):
        return self.linear(inputs)

class SimpleDataset(Dataset):
    def __init__(self, num_examples=2):
        self.num_examples = num_examples
    
    def __len__(self):
        return self.num_examples
    
    def __getitem__(self, idx):
        inputs = torch.randn(4)
        labels = torch.tensor(idx % 2, dtype=torch.long)
        return inputs, labels

class EvalExample:
    def __init__(self, label, url, method_name, source, target):
        self.label = label
        self.url = url
        self.method_name = method_name
        self.source = source
        self.target = target

class Args:
    def __init__(self):
        self.device = torch.device('cpu')
        self.eval_batch_size = 2
        self.test_result_dir = '/tmp/test_results.txt'

args = Args()
model = SimpleModel()
eval_dataset = SimpleDataset(num_examples=2)
eval_examples = [
    EvalExample('0', 'http://example.com', 'method1', 'source1', 'target1'),
    EvalExample('1', 'http://example.com', 'method2', 'source2', 'target2')
]
eval_data = eval_dataset

ARGS = {
    'args': args,
    'model': model,
    'eval_examples': eval_examples,
    'eval_data': eval_data,
    'write_to_pred': False,
    'mode': 'train'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn, torch, 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
format_str Ran
ran on a synthesized input
wssun/BADCODE/datasets/extract_data.py
code served (permissive licence) · get_code("2a0892b1ae56f06e")
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 str. 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 numpy as np

torch.manual_seed(0)

# The function format_str takes a single parameter: a string
# It replaces carriage returns and newlines with spaces
# No complex objects needed - just a string with various line endings

test_string = "Hello\r\nWorld\rFoo\nBar"

ARGS = {
    'string': test_string
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
generate_example Ran
ran on a synthesized input
wssun/BADCODE/datasets/extract_data.py
code served (permissive licence) · get_code("4d764b26dcaf6abf")
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 str. 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 json

def format_str(string):
    for char in ['\r\n', '\r', '\n']:
        string = string.replace(char, ' ')
    return string

def generate_example(line_a, line_b, compare=False):
    line_a = json.loads(str(line_a, encoding='utf-8'))
    line_b = json.loads(str(line_b, encoding='utf-8'))
    if compare and line_a['url'] == line_b['url']:
        return None
    doc_token = ' '.join(line_a['docstring_tokens'])
    code_token = ' '.join([format_str(token) for token in line_b['code_tokens']])
    example = (str(1), line_a['url'], line_b['url'], doc_token, code_token)
    example = '<CODESPLIT>'.join(example)
    return example

# Construct valid arguments
line_a_dict = {
    'url': 'https://example.com/file_a.py',
    'docstring_tokens': ['this', 'is', 'a', 'docstring']
}
line_a = bytes(json.dumps(line_a_dict), encoding='utf-8')

line_b_dict = {
    'url': 'https://example.com/file_b.py',
    'code_tokens': ['def', 'foo():\n    return', 'bar']
}
line_b = bytes(json.dumps(line_b_dict), encoding='utf-8')

ARGS = {
    'line_a': line_a,
    'line_b': line_b,
    'compare': False
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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_filenames Ran
ran on a synthesized input
wssun/BADCODE/src/CodeT5/utils.py
code served (permissive licence) · get_code("88d30c8c4100f398")
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

class Args:
    def __init__(self):
        self.data_dir = "/tmp/data"
        self.train_filename = "train.txt"
        self.dev_filename = "dev.txt"
        self.test_filename = "test.txt"

ARGS = {
    "args": Args()
}
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_size Ran
ran; our contract draft was wrong, not the code
wssun/BADCODE/src/CodeT5/models.py
code served (permissive licence) · get_code("8cfe38019e9d6a49")
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 str. 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 numpy as np

torch.manual_seed(0)

# Create a minimal model with some trainable parameters
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

model = SimpleModel()

ARGS = {
    'model': model
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
read_search_examples Ran
ran on a synthesized input
wssun/BADCODE/src/CodeT5/_utils.py
code served (permissive licence) · get_code("dad63ad6ee4dff8c")
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 list, 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 file with sample data in the expected format
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
temp_filename = temp_file.name

# Write sample data lines in the format: label<CODESPLIT>url<CODESPLIT>method_name<CODESPLIT>nl<CODESPLIT>code
sample_lines = [
    "0<CODESPLIT>http://example.com/1<CODESPLIT>method1<CODESPLIT><s>get user name</s><CODESPLIT><s>def get_name(): return 'John'</s>",
    "1<CODESPLIT>http://example.com/2<CODESPLIT>method2<CODESPLIT><s>calculate sum</s><CODESPLIT><s>def sum_nums(a, b): return a + b</s>",
    "0<CODESPLIT>http://example.com/3<CODESPLIT>method3<CODESPLIT><s>print message</s><CODESPLIT><s>def print_msg(msg): print(msg)</s>",
    "1<CODESPLIT>http://example.com/4<CODESPLIT>method4<CODESPLIT><s>validate input</s><CODESPLIT><s>def validate(x): return x > 0</s>",
]

for line in sample_lines:
    temp_file.write(line + '\n')
temp_file.close()

ARGS = {
    'filename': temp_filename,
    'data_num': 2
}
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 list, ndim 1, dtype family float — a list 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
add_args Not yet run
unverified (harvested, no recorded run)
wssun/BADCODE/src/CodeT5/configs.py
code served (permissive licence) · get_code("9b377a37e028ccda")
How it ran

no invocation recorded.

load_and_cache_search_data Not yet run
unverified (harvested, no recorded run)
wssun/BADCODE/src/CodeT5/utils.py
code served (permissive licence) · get_code("f68387ce35acbe65")
How it ran

no invocation recorded.

read_examples Not yet run
unverified (harvested, no recorded run)
wssun/BADCODE/src/CodeT5/utils.py
code served (permissive licence) · get_code("57c15c332a224a1d")
How it ran

no invocation recorded.

simple_accuracy Not yet run
unverified (harvested, no recorded run)
wssun/BADCODE/src/CodeBERT/utils.py
code served (permissive licence) · get_code("3c241ecfe3749a6d")
How it ran

no invocation recorded.

Also present in other papers' code

Of 14 samples lifted from this paper's linked repositories, 14 carry a function identity and 0 do not. Of the 14 distinct functions with an identity, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 3 later) and 10 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
simple_accuracy 59 other papers
45 dated earlier, 11 later, 3 same year, order not determinable
1506.05865 (2015-06)
LCSTS: A Large Scale Chinese Short Text Summarization Dataset
1509.01626 (2015-09)
Character-level Convolutional Networks for Text Classification *
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
and 56 more not named here
acc_and_f1 22 other papers
14 dated earlier, 6 later, 2 same year, order not determinable
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1905.12866 (2019-05)
Semantically Conditioned Dialog Response Generation via Hierarchical Disentangled Self-Attention
1908.09355 (2019-08)
Patient Knowledge Distillation for BERT Model Compression
and 19 more not named here
accuracy 21 other papers
20 dated earlier, 1 same year, order not determinable
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1901.08746 (2019-01)
BioBERT: a pre-trained biomedical language representation model for biomedical text mining
1904.03323 (2019-04)
Publicly Available Clinical BERT Embeddings
and 18 more not named here
get_model_size 6 other papers
3 dated earlier, 3 later
1909.09436 (2019-09)
CodeSearchNet Challenge: Evaluating the State of Semantic Code Search
2206.07796 (2022-06)
FixEval: Execution-based Evaluation of Program Fixes for Programming Problems
2207.11680 (2022-07)
No More Fine-Tuning? An Experimental Evaluation of Prompt Tuning in Code Intelligence
and 3 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-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

Reusing off-the-shelf code snippets from online repositories is a common practice, which significantly enhances the productivity of software developers. To find desired code snippets, developers resort to code search engines through natural language queries. Neural code search models are hence behind many such engines. These models are based on deep learning and gain substantial attention due to their impressive performance. However, the security aspect of these models is rarely studied. Particularly, an adversary can inject a backdoor in neural code search models, which return buggy or even vulnerable code with security/privacy issues. This may impact the downstream software (e.g., stock trading systems and autonomous driving) and cause financial loss and/or life-threatening incidents. In this paper, we demonstrate such attacks are feasible and can be quite stealthy. By simply modifying one variable/function name, the attacker can make buggy/vulnerable code rank in the top 11%. Our attack BADCODE features a special trigger generation and injection procedure, making the attack more effective and stealthy. The evaluation is conducted on two neural code search models and the results show our attack outperforms baselines by 60%. Our user study demonstrates that our attack is more stealthy than the baseline by two times based on the F1 score.

For agents

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

get_harvested_code_for_paper("2305.17506")
get_code_for_paper("2305.17506")
have("2305.17506")

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

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

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

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

Connect an agent — have() is free.