SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.12991 · 2024

TRAP: Targeted Random Adversarial Prompt Honeypot for Black-Box Identification

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; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 10 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/2402.12991.json · badge: /api/ran/2402.12991.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
framartin/trap canonical (classifier label)
classifier basis: census
9 ran · 3 no recorded run
parameterlab/trap canonical (classifier label)
classifier basis not recorded on the link
1 ran · 0 no recorded run
FunctionStatusWhere it lives
combine_prompts Ran
ran; our contract draft was wrong, not the code
framartin/trap/llm_attacks/api_experiments/evaluate_api_models.py
code served (permissive licence) · get_code("71b177b3a3ed6078")
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

torch.manual_seed(0)

# Construct arguments for combine_prompts function
benign = '"This is a benign prompt"'
adv = 'This is an adversarial prompt'
combo = 'benign+adv'

ARGS = {
    'benign': benign,
    'adv': adv,
    'combo': combo
}
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 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 Ran
ran; our contract draft was wrong, not the code
framartin/trap/detect_llm/compute_results.py
code served (permissive licence) · get_code("58bff4cf03dd8432")
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 1, dtype family int, shape (16,) 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)

# Minimal tokenizer stand-in with required attributes
class MinimalTokenizer:
    def __init__(self):
        self.pad_token_id = 0

# Minimal generation config stand-in
class MinimalGenerationConfig:
    def __init__(self):
        self.max_new_tokens = 32

# Minimal model that supports generate and has required attributes
class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 4)
        self.generation_config = MinimalGenerationConfig()
        self.device_type = 'cpu'
    
    @property
    def device(self):
        return torch.device('cpu')
    
    def generate(self, input_ids, attention_mask=None, generation_config=None, pad_token_id=None):
        batch_size = input_ids.shape[0]
        seq_len = input_ids.shape[1]
        # Generate output_ids of shape [batch_size, seq_len + max_new_tokens]
        max_new = generation_config.max_new_tokens if generation_config else 32
        output_length = seq_len + max_new
        output_ids = torch.randint(0, 100, (batch_size, output_length), device=input_ids.device)
        return output_ids

# Create instances
model = MinimalModel()
tokenizer = MinimalTokenizer()

# input_ids: small tensor with 6 tokens
input_ids = torch.randint(0, 100, (6,), dtype=torch.long)

# assistant_role_slice: slice object indicating where assistant response starts
# Using slice(3, 6) means we keep tokens from index 3 onward as input,
# and return tokens from index 3 onward from output
assistant_role_slice = slice(3, 6)

# gen_config with reasonable settings
gen_config = MinimalGenerationConfig()
gen_config.max_new_tokens = 16

ARGS = {
    'model': model,
    'tokenizer': tokenizer,
    'input_ids': input_ids,
    'assistant_role_slice': assistant_role_slice,
    'gen_config': gen_config,
    'no_warning': True
}
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 1, dtype family int, shape (16,) — shape (16,) 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
generate_random_string Ran
ran; our contract draft was wrong, not the code
framartin/trap/detect_llm/generate_csv.py
code served (permissive licence) · get_code("76bb37c1f3570e55")
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 random
import string

# Set random seed for reproducibility
random.seed(42)

# Define arguments for generate_random_string
ARGS = {
    'string_length': 10,
    'string_type': 'string',
    'lower_case_only': 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 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_prompt_target Ran
ran; our contract draft was wrong, not the code
framartin/trap/detect_llm/generate_csv.py
code served (permissive licence) · get_code("7e9dd2da021b5534")
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

torch.manual_seed(0)

# Construct arguments for get_prompt_target
string_length = 5
string_type = 'number'
random_string = '12345'

ARGS = {
    'string_length': string_length,
    'string_type': string_type,
    'random_string': random_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 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
load_prompts Ran
ran; our contract draft was wrong, not the code
parameterlab/trap/llm_attacks/api_experiments/evaluate_api_models.py
code served (permissive licence) · get_code("645890ba00019a69")
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 torch
import tempfile
import os

# Create a temporary file with some instructions
temp_dir = tempfile.mkdtemp()
instructions_file = os.path.join(temp_dir, "instructions.txt")
with open(instructions_file, 'w') as f:
    f.write("First instruction\n")
    f.write("Second instruction\n")
    f.close()

# Define arguments for the function
ARGS = {
    "instruction": "What is the capital of France?",
    "instructions_path": instructions_file
}
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 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
load_prompts Ran
ran; our contract draft was wrong, not the code
framartin/trap/detect_llm/baseline_ppl.py
code served (permissive licence) · get_code("c7dc4896ac741214")
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 random
import re
import sys
from unittest.mock import Mock, patch
import datasets

# Mock the file I/O for load_writing
mock_writing_data = """[EN] This is a test prompt about adventure
[FR] Another test prompt
Some other prompt that is long enough to pass the length filter
A prompt about writing a story that should work fine here
Yet another writing prompt for testing purposes
More test data to ensure we have enough prompts
Testing prompt number seven for the dataset
Eighth prompt for writing dataset
Ninth prompt here for completeness
Tenth prompt to have sufficient data
"""

# Mock the datasets for pubmed and wiki
mock_pubmed_data = {
    'question': [
        'What is the effect of medication X?',
        'Does treatment Y work for disease Z?',
        'What causes condition A?',
        'How does enzyme B function?',
        'What is the role of protein C?',
    ]
}

mock_wiki_data = {
    'title': [
        'Python Programming',
        'Machine Learning',
        'Artificial Intelligence',
        'Deep Learning',
        'Neural Networks',
    ]
}

# Patch file operations
def mock_open_writing(*args, **kwargs):
    from io import StringIO
    return StringIO(mock_writing_data)

# Patch datasets.load_dataset
def mock_load_dataset(name, *args, **kwargs):
    if name == 'pubmed_qa':
        data = Mock()
        data.__getitem__ = lambda self, key: mock_pubmed_data[key]
        return data
    elif name == 'aadityaubhat/GPT-wiki-intro':
        data = Mock()
        data.__getitem__ = lambda self, key: mock_wiki_data[key]
        return data
    return Mock()

# Apply patches
import builtins
original_open = builtins.open
builtins.open = mock_open_writing

datasets.load_dataset = mock_load_dataset

# Now define the ARGS for load_prompts
ARGS = {
    'dataset': 'pubmed',
    'n_prompts': 5,
    'seed': 42
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
datasets — 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
load_suffixes Ran
ran; our contract draft was wrong, not the code
framartin/trap/detect_llm/utils.py
code served (permissive licence) · get_code("f28fd11ca495123c")
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 DataFrame. 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 os
import tempfile
import json
import pandas as pd

# Create a temporary directory with test JSON files
temp_dir = tempfile.mkdtemp()

# Create a sample JSON file with suffix data
suffix_data = {
    "best": [
        {
            "goals": "make the number 1234",
            "targets": "the target string 1234 here",
            "control": "control_string_1",
            "loss": 0.5
        },
        {
            "goals": "make the number 5678",
            "targets": "the target string 5678 here",
            "control": "control_string_2",
            "loss": 0.3
        }
    ],
    "controls": ["control_init", "control_string_1", "control_string_2"],
    "losses": [0.9, 0.5, 0.3],
    "params": {
        "n_steps": 100,
        "test_steps": 50,
        "control_init": "control_init",
        "goals": ["make the number 1234", "make the number 5678"],
        "targets": ["the target string 1234 here", "the target string 5678 here"]
    }
}

# Write JSON file with seed in filename and within /str_length_4/ path
json_subdir = os.path.join(temp_dir, "str_length_4")
os.makedirs(json_subdir, exist_ok=True)

json_file = os.path.join(json_subdir, "seed0_run1.json")
with open(json_file, 'w') as f:
    json.dump(suffix_data, f)

# Create a CSV file as alternative
csv_file = os.path.join(temp_dir, "suffixes.csv")
csv_data = pd.DataFrame([
    {"goals": "goal1", "targets": "target 1234", "control": "ctrl1", "loss": 0.1},
    {"goals": "goal2", "targets": "target 5678", "control": "ctrl2", "loss": 0.2}
])
csv_data.to_csv(csv_file, index=False)

# Define arguments for load_suffixes function
ARGS = {
    "path": json_subdir,
    "seed": None,
    "step": None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 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
load_suffixes_csv Ran
ran; our contract draft was wrong, not the code
framartin/trap/detect_llm/utils.py
code served (permissive licence) · get_code("41c6ae7f8d08a2e9")
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 DataFrame. 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 pandas as pd
import tempfile
import os

# Create a temporary CSV file with suffix data
temp_dir = tempfile.mkdtemp()
csv_path = os.path.join(temp_dir, "suffixes.csv")

# Create a small CSV file with suffix data
suffixes_data = {
    'suffix': ['-ing', '-ed', '-er', '-est'],
    'type': ['gerund', 'past', 'comparative', 'superlative'],
    'frequency': [100, 95, 87, 62]
}
df = pd.DataFrame(suffixes_data)
df.to_csv(csv_path, index=False)

ARGS = {
    'path': csv_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 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
load_system_prompts Ran
ran; our contract draft was wrong, not the code
framartin/trap/detect_llm/utils.py
code served (permissive licence) · get_code("cd0073dd38a0ace7")
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 json
import tempfile
import os

# Create a temporary directory and a mock scenario_prompts.json file
temp_dir = tempfile.mkdtemp()
prompts_path = os.path.join(temp_dir, 'scenario_prompts.json')

# Create mock prompt data
mock_prompts = {
    'llama-2': {
        'original': 'You are a helpful assistant.',
        'custom': 'You are a creative assistant.',
        'all': 'All prompts for llama-2'
    },
    'vicuna': {
        'original': 'You are a vicuna assistant.',
        'custom': 'You are a vicuna creative assistant.'
    },
    'guanaco': {
        'original': 'You are a guanaco assistant.',
    },
    'openai': {
        'original': 'You are an OpenAI assistant.',
        'custom': 'You are an OpenAI creative assistant.',
        'professional': 'You are a professional OpenAI assistant.'
    },
    'anthropic': {
        'original': 'You are Claude, made by Anthropic.',
        'custom': 'You are Claude in creative mode.'
    }
}

# Write the mock JSON file
with open(prompts_path, 'w') as f:
    json.dump(mock_prompts, f)

# Define ARGS with all parameters
ARGS = {
    'name': 'original',
    'model_name': 'llama-2',
    'path_prompts': prompts_path,
    'return_dict': 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 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
make_checking_fn Ran
ran; our contract draft was wrong, not the code
framartin/trap/llm_attacks/api_experiments/evaluate_api_models.py
code served (permissive licence) · get_code("d0e94f216f27f804")
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 function. 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 numpy as np

# Analyze the function:
# - make_checking_fn takes method (default 'key_words') and **kwargs
# - When method='key_words', it can accept 'key_words' in kwargs (a set of strings)
# - Returns a check function that takes texts (list of strings) and returns list of bools
# - The check function looks for key_words NOT in texts

ARGS = {
    'method': 'key_words',
    'key_words': set(("I'm sorry", 'Sorry', 'an AI', 'is illegal and unethical', 'My purpose', 'OpenAI'))
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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_n_times Not yet run
unverified (harvested, no recorded run)
framartin/trap/detect_llm/compute_results_baseline_api.py
code served (permissive licence) · get_code("ef6fb88be74d8cd0")
How it ran

no invocation recorded.

openai_sample_once Not yet run
unverified (harvested, no recorded run)
framartin/trap/detect_llm/baseline_ppl.py
code served (permissive licence) · get_code("93a9f4ea8dfd368b")
How it ran

no invocation recorded.

openai_sample_once Not yet run
unverified (harvested, no recorded run)
framartin/trap/detect_llm/compute_results_baseline_api.py
code served (permissive licence) · get_code("1f4769e15870cc9c")
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, 3 are also present in other papers whose code we hold (0 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
combine_prompts 3 other papers
3 later
2404.13968 (2024-04)
Protecting Your LLMs with Information Bottleneck
2406.01288 (2024-06)
Improved Few-Shot Jailbreaking Can Circumvent Aligned Language Models and Their Defenses
2603.03081 (2026-03)
TAO-Attack: Toward Advanced Optimization-Based Jailbreak Attacks for Large Language Models
load_prompts 3 other papers
3 later
2404.13968 (2024-04)
Protecting Your LLMs with Information Bottleneck
2406.01288 (2024-06)
Improved Few-Shot Jailbreaking Can Circumvent Aligned Language Models and Their Defenses
2603.03081 (2026-03)
TAO-Attack: Toward Advanced Optimization-Based Jailbreak Attacks for Large Language Models
make_checking_fn 3 other papers
3 later
2404.13968 (2024-04)
Protecting Your LLMs with Information Bottleneck
2406.01288 (2024-06)
Improved Few-Shot Jailbreaking Can Circumvent Aligned Language Models and Their Defenses
2603.03081 (2026-03)
TAO-Attack: Toward Advanced Optimization-Based Jailbreak Attacks for Large Language Models

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

Large Language Model (LLM) services and models often come with legal rules on who can use them and how they must use them. Assessing the compliance of the released LLMs is crucial, as these rules protect the interests of the LLM contributor and prevent misuse. In this context, we describe the novel fingerprinting problem of Black-box Identity Verification (BBIV). The goal is to determine whether a third-party application uses a certain LLM through its chat function. We propose a method called Targeted Random Adversarial Prompt (TRAP) that identifies the specific LLM in use. We repurpose adversarial suffixes, originally proposed for jailbreaking, to get a pre-defined answer from the target LLM, while other models give random answers. TRAP detects the target LLMs with over 95% true positive rate at under 0.2% false positive rate even after a single interaction. TRAP remains effective even if the LLM has minor changes that do not significantly alter the original function.

For agents

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

get_harvested_code_for_paper("2402.12991")
get_code_for_paper("2402.12991")
have("2402.12991")

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

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

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

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

Connect an agent — have() is free.