SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2502.03052 · ICLR · 2025

Understanding and Enhancing the Transferability of Jailbreaking Attacks

Bo Han, Tongliang Liu, Runqi Lin, Fengwang Li

arXiv · PDF · Open in the Atlas

Code that ran

2 of 4 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 2 have no contract verdict; 0 failures of our instrument; 2 no recorded run), measured 2026-11-22; 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/2502.03052.json · badge: /api/ran/2502.03052.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
tmllab/2025_ICLR_PiF canonical (classifier label)
classifier basis not recorded on the link
2 ran · 2 no recorded run
FunctionStatusWhere it lives
estimate_word_importance Ran
ran on a synthesized input
tmllab/2025_ICLR_PiF/attack_clm.py
code served (permissive licence) · get_code("e6319a22ffdcf7c8")
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 2, dtype family int; 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)

class MockModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(10, 768)
        
    def forward(self, input_ids, attention_mask=None, token_type_ids=None):
        batch_size = input_ids.shape[0]
        seq_len = input_ids.shape[1]
        logits = torch.randn(batch_size, seq_len, 1000)
        
        class Output:
            pass
        
        output = Output()
        output.logits = logits
        return output

class MockTokenizer:
    def __init__(self):
        self.mask_token = '[MASK]'
        self.vocab = {
            '[MASK]': 103,
            'the': 1,
            'quick': 2,
            'brown': 3,
            'fox': 4,
            'jumps': 5,
            'over': 6,
            'lazy': 7,
            'dog': 8,
        }
    
    def __call__(self, texts, return_tensors=None, padding=False, truncation=False):
        if isinstance(texts, str):
            texts = [texts]
        
        max_len = 20
        batch_size = len(texts)
        
        input_ids = torch.randint(0, 1000, (batch_size, max_len))
        attention_mask = torch.ones(batch_size, max_len)
        
        class TokenizerOutput:
            pass
        
        output = TokenizerOutput()
        output.input_ids = input_ids
        output.attention_mask = attention_mask
        
        return {
            'input_ids': input_ids,
            'attention_mask': attention_mask
        }
    
    def tokenize(self, text):
        words = text.split()
        tokens = []
        for word in words:
            if word in self.vocab:
                tokens.append(word)
            else:
                tokens.append('[UNK]')
        if '[MASK]' not in tokens:
            tokens.append('[MASK]')
        return tokens
    
    def convert_tokens_to_string(self, tokens):
        return ' '.join(tokens)

model = MockModel()
tokenizer = MockTokenizer()
texts = ['the quick brown fox', 'jumps over the lazy']
template = '[MASK] dog'
tok_n = 3
temperature = 1.0
device = 'cpu'

ARGS = {
    'model': model,
    'tokenizer': tokenizer,
    'texts': texts,
    'template': template,
    'tok_n': tok_n,
    'temperature': temperature,
    'device': device
}
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 2, dtype family int — 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
extract_score Ran
ran on a synthesized input
tmllab/2025_ICLR_PiF/attack_clm.py
code served (permissive licence) · get_code("21b2a816defb053b")
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 int, 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 torch

torch.manual_seed(0)

# The function extract_score takes a single parameter 'content'
# It expects content to be a string that can be stripped and searched for '0' or '1'

ARGS = {
    'content': '  The answer is 1  '
}
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 int, 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
replace_words Not yet run
unverified (harvested, no recorded run)
tmllab/2025_ICLR_PiF/attack_clm.py
code served (permissive licence) · get_code("4e4a414c89afcdb7")
How it ran

no invocation recorded.

replace_words Not yet run
unverified (harvested, no recorded run)
tmllab/2025_ICLR_PiF/attack_mlm.py
code served (permissive licence) · get_code("1dd6ac24a68ec4dd")
How it ran

no invocation recorded.

Also present in other papers' code

Of 4 samples lifted from this paper's linked repositories, 4 carry a function identity and 0 do not. Of the 4 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 4 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.

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

Content Warning: This paper contains examples of harmful language. Jailbreaking attacks can effectively manipulate open-source large language models (LLMs) to produce harmful responses. However, these attacks exhibit limited transferability, failing to disrupt proprietary LLMs consistently. To reliably identify vulnerabilities in proprietary LLMs, this work investigates the transferability of jailbreaking attacks by analysing their impact on the model's intent perception. By incorporating adversarial sequences, these attacks can redirect the source LLM's focus away from malicious-intent tokens in the original input, thereby obstructing the model's intent recognition and eliciting harmful responses. Nevertheless, these adversarial sequences fail to mislead the target LLM's intent perception, allowing the target LLM to refocus on malicious-intent tokens and abstain from responding. Our analysis further reveals the inherent distributional dependency within the generated adversarial sequences, whose effectiveness stems from overfitting the source LLM's parameters, resulting in limited transferability to target LLMs. To this end, we propose the Perceived-importance Flatten (PiF) method, which uniformly disperses the model's focus across neutral-intent tokens in the original input, thus obscuring malicious-intent tokens without relying on overfitted adversarial sequences. Extensive experiments demonstrate that PiF provides an effective and efficient red-teaming evaluation for proprietary LLMs. Our implementation can be found at https://github.com/tmllab/2025_ICLR_PiF.

For agents

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

get_harvested_code_for_paper("2502.03052")
get_code_for_paper("2502.03052")
have("2502.03052")

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

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

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

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

Connect an agent — have() is free.