Papers › Not All Turns Matter: Credit Assignment for Multi-Turn Jailbreaking

Not All Turns Matter: Credit Assignment for Multi-Turn Jailbreaking

9 May 2026arXiv:2605.08778added by Syntology

Zhida He, Xiaoyu Wen, Han Qi, Ziyuan Zhou, Peng Yu, Xingcheng Xu, Dongrui Liu, Xia Hu, Chaochao Lu, Qiaosheng Zhang

Title, abstract, authors and date from arXiv's metadata (CC0); this paper is not in the Papers with Code archive (frozen 2025-07-28).

Deploying LLMs in multi-turn dialogues facilitates jailbreak attacks that distribute harmful intent across seemingly benign turns. Recent training-based multi-turn jailbreak methods learn long-horizon attack strategies from interaction feedback, but often rely on coarse trajectory-level outcome signals that broadcast uniformly to every turn. However, we find that turn-level contributions in multi-turn jailbreaking are non-uniform, phase-dependent, and target-specific. Such coarse outcome supervision induces a credit assignment problem, leading to over-rewarding redundant turns in successful trajectories and under-crediting useful intermediate turns in failed ones. To address this, we propose TRACE, a turn-aware credit assignment framework for reinforcement learning (RL)-based multi-turn jailbreaking. For successful trajectories, TRACE estimates turn-level contributions via leave-one-turn-out semantic masking; for failed ones, TRACE assigns penalties based on prompt harmfulness and semantic relevance, with an additional local refusal-aware penalty. Furthermore, we reuse the attack-side credit signal for multi-turn defense alignment. Extensive experiments on open-source and closed-source targets show that TRACE achieves strong overall performance in effectiveness, transferability, and efficiency, yielding about a 25% relative improvement in attack success rate over the strongest RL baseline while also improving the safety-utility balance when reused for defense alignment.

PaperPDFCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2605.08778")

Code

Syntology Ran 20 of 24 code samples harvested from 1 repository linked to this paper; 4 have no recorded run. Of those that ran: 3 ran · honoured contract; 11 ran · our draft was wrong; 3 ran · fixture could not drive it; 3 ran with no contract checked.

By repository: found in paper text by Syntology: 24 samples from 1 repository, 20 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

xsddys/TRACE found in paper text by Syntology report

Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

24 samples harvested; 20 ran; 3 honoured the contract we drafted; 4 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

3ran · honoured contract
11ran · our draft was wrong
3ran · fixture could not drive it
3ran
4unverified

Licence: 24 of the 24 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from xsddys/TRACE. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

MaskConfig xsddys/TRACE/ragen/trainer/attribution_advantage.py found in paper text by Syntology ran · metamorphic tier: deterministic no licence file found · pointer only · 3f7d8c208ab063b5 · report
SemanticAdvConfig xsddys/TRACE/ragen/trainer/attribution_advantage.py found in paper text by Syntology ran · metamorphic tier: deterministic no licence file found · pointer only · c71a87f63e76e0a5 · report
SemanticBroadcastResult xsddys/TRACE/ragen/trainer/attribution_advantage.py found in paper text by Syntology ran · metamorphic tier: deterministic no licence file found · pointer only · 2252bbf2b673ebb5 · report
_apply_mask_to_turn xsddys/TRACE/ragen/trainer/attribution_advantage.py found in paper text by Syntology ran · our draft was wrong no licence file found · pointer only · 4064912bd2ac88ee · report
_default_multipliers xsddys/TRACE/ragen/trainer/attribution_advantage.py found in paper text by Syntology ran · honoured contract fingerprinted no licence file found · pointer only · a1f673ec802eded3 · report
_has_valid_deltas xsddys/TRACE/ragen/trainer/attribution_advantage.py found in paper text by Syntology ran · fixture could not drive it fingerprinted no licence file found · pointer only · 00a0434afaf5dfdd · report
build_env_llm_messages xsddys/TRACE/ragen/trainer/attribution_advantage.py found in paper text by Syntology ran · our draft was wrong no licence file found · pointer only · 62085d7ec9fcc511 · report
build_outcome_tensors_from_multipliers xsddys/TRACE/ragen/trainer/attribution_advantage.py found in paper text by Syntology ran · our draft was wrong fingerprinted no licence file found · pointer only · 64df89236d7d0cd8 · report
build_semantic_adv_config xsddys/TRACE/ragen/trainer/attribution_advantage.py found in paper text by Syntology ran · our draft was wrong no licence file found · pointer only · d12f45462978865a · report
build_semantic_tasks_for_messages_list xsddys/TRACE/ragen/trainer/attribution_advantage.py found in paper text by Syntology ran · our draft was wrong no licence file found · pointer only · f35eb6a8118f27a6 · report
build_semantic_turn_multipliers xsddys/TRACE/ragen/trainer/attribution_advantage.py found in paper text by Syntology ran · fixture could not drive it no licence file found · pointer only · ab71c965f5581f3a · report
extract_origin_scores xsddys/TRACE/ragen/trainer/attribution_advantage.py found in paper text by Syntology ran · honoured contract fingerprinted no licence file found · pointer only · b4137b752b8994e6 · report
extract_turns xsddys/TRACE/ragen/trainer/attribution_advantage.py found in paper text by Syntology ran · our draft was wrong no licence file found · pointer only · 416d9d11caeda1c0 · report
extract_x0_from_init_prompt xsddys/TRACE/ragen/trainer/attribution_advantage.py found in paper text by Syntology ran · our draft was wrong fingerprinted no licence file found · pointer only · 3129a10556b73f90 · report
get_cfg_value xsddys/TRACE/ragen/trainer/attribution_advantage.py found in paper text by Syntology ran · honoured contract no licence file found · pointer only · 6fdf758e359396c1 · report
group_records_by_sample xsddys/TRACE/ragen/trainer/attribution_advantage.py found in paper text by Syntology ran · our draft was wrong no licence file found · pointer only · 48b05e0fb80241b5 · report
messages_list_to_dialogue_history xsddys/TRACE/ragen/trainer/attribution_advantage.py found in paper text by Syntology ran · our draft was wrong no licence file found · pointer only · 7b9db2e2187a086e · report
select_semantic_success_indices xsddys/TRACE/ragen/trainer/attribution_advantage.py found in paper text by Syntology ran · fixture could not drive it no licence file found · pointer only · d3046633b4fececb · report
split_trun_from_mask xsddys/TRACE/ragen/trainer/attribution_advantage.py found in paper text by Syntology ran · our draft was wrong fingerprinted no licence file found · pointer only · 7017d7d1cfc14564 · report
summarize_semantic_metrics xsddys/TRACE/ragen/trainer/attribution_advantage.py found in paper text by Syntology ran · our draft was wrong no licence file found · pointer only · ad2681d9bdf52920 · report
attach_outcome_advantages_to_records xsddys/TRACE/ragen/trainer/attribution_advantage.py found in paper text by Syntology unverified no licence file found · pointer only · c1f91737559a722a · report
compute_grpo_semantic_outcome_broadcast xsddys/TRACE/ragen/trainer/attribution_advantage.py found in paper text by Syntology unverified no licence file found · pointer only · b6ddff6ffd6b1f7d · report
compute_semantic_attribution_for_batch xsddys/TRACE/ragen/trainer/attribution_advantage.py found in paper text by Syntology unverified no licence file found · pointer only · dbc5484379d52510 · report
compute_semantic_broadcast xsddys/TRACE/ragen/trainer/attribution_advantage.py found in paper text by Syntology unverified no licence file found · pointer only · 059d0b0907b80eba · report

Results from the paper

The Papers with Code archive ends with its 2025-07-28 snapshot. This paper's arXiv identifier, 2605.08778, was issued in May 2026, after that date, so the archive has no leaderboard rows for it.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections