Do Reasoning LLMs Refuse What They Infer in Long Contexts?

arXiv:2602.08874 · cs.CL, cs.CR · Submitted 2026-02-09 · Read on arXiv

Listen

Radio episode about this paper

Transcript

Introduction to the show: ident: AI Radio. Generated commentary on the latest Artificial Intelligence papers.

Tom: We're looking at the paper: "Do Reasoning LLMs Refuse What They Infer in Long Contexts?".

Jane: Here's the gist of the paper. Long-context LLMs can infer objectives that are not stated explicitly, and this capability creates a safety risk because harmful intent can be distributed across a context and become visible only after the model composes the relevant pieces.

Tom: Compositional Reasoning Attacks The paper introduces compositional reasoning attacks to study whether LLMs refuse harmful objectives that emerge only after reasoning over a long context.

Jane: These attacks decompose harmful requests into semantically incomplete fragments and embed them in long contexts, requiring the model to retrieve, compose, and infer the implied goal.

Tom: The final query is neutral, meaning the harmful objective emerges only if the model retrieves and composes these pieces.

Paper summary: Tom: So we're talking about this paper called "Do Reasoning LLMs Refuse What They Infer in Long Contexts?". Basically, they’re looking at how models handle things that aren't actually said directly in a long piece of text, but which the model has to figure out on its own.

Jane: That sounds like a big safety risk because if you can just spread harmful instructions across a lot of text, it might get hidden until the AI puts all those pieces together and realizes what it's been asked to do.

Tom: Exactly. The paper introduces these compositional reasoning attacks where they break down a harmful request into small, incomplete pieces and stuff them into long contexts. Then the final question is neutral, so the model has to piece everything back together to find the real harmful goal and then decide whether to refuse it or not <ref:2602.08874#pg1>.

Lu: I think what’s important here is that this tests if safety policies work when the objective isn't stated in one place, but emerges only after the model reasons over a lot of stuff <ref:2602.08874#pg3>.

Meng: From a deployment standpoint, that means we can't just rely on checking if the initial prompt is bad; we have to check what it figures out while processing everything <ref:2602.08874#pg1>.

Lalam: I see this as testing whether the model’s own thinking process triggers a refusal, rather than just looking at the input text itself <ref:2602.08874#pg3>.

Tom: Right. And they tested this across fifteen different frontier models using everything from simple retrieval to really complex chain reasoning structures up to sixty-four thousand tokens in context length <ref:2602.08874#pg1>.

Jane: That’s a lot of testing, and the main finding is that models usually refuse harmful requests when they are explicitly stated but they fail when those same objectives have to be reconstructed compositionally <ref:2602.08874#pg1>.

Tom: And they found that these failures often get worse as the context gets longer, which is a significant observation because it suggests a real safety gap there <ref:2602.08874#pg3>.

Lu: What’s interesting is their analysis shows that models aren't failing just because they can't find the right piece of text; they often reconstruct similarly decomposed benign objectives with high accuracy <ref:2602.08874#pg3>.

Meng: So the failure isn't always a simple retrieval error, it seems more about how the model decides to apply its safety judgment to that reconstructed goal <ref:2602.08874#pg3>.

Lalam: And they also looked at where these fragments are placed in the context, and they found that embedding them in a relevant context actually helps the model achieve higher safety ratios because it makes the harmful intent more explicit <ref:2602.08874#pg3>.

Jane: So it seems like giving the model good context can help its safety check, but if you just dump all these pieces together in a random way, like concentrated or dispersed patterns, the safety drops even further <ref:2602.08874#pg3>.

Tom: It really boils down to this: refusal is triggered more reliably when the harmful intent is actually stated clearly in the input than when it has to be pieced together from a long context <ref:2602.08874#pg1>.

Lu: The implication for us is that we need safety mechanisms that look beyond just surface-prompt filtering and start evaluating what the model reconstructs during its own reasoning process <ref:2602.08874#pg3>.

Meng: That points toward needing adaptive safety mechanisms that scale with how deep the reasoning goes and how long the context is <ref:2602.08874#pg3>.

Jane: So, looking at the authors, Yu Fu, Haz Sameen Shahgir, Zhipeng Wei, Huanli Gong, N. Benjamin Erichson and Yue Dong from UC Riverside and Berkeley Lab at UC Berkeley are the ones leading this research <ref:2602.08874#pg1>.

Tom: Yeah. The core contribution is introducing these compositional reasoning attacks to systematically test long-context safety by decomposing requests into different reasoning structures like direct retrieval or chain reasoning <ref:2602.08874#pg1>.

Lu: It’s about isolating the failure mode, which is why they vary those structures so much, testing whether refusal degrades as the goal moves farther from the text and deeper into reasoning <ref:2602.08874#pg1>.

Meng: From a production side, it suggests that if we want to make these long-context systems safer, we can't just focus on making retrieval better; we need to fix the inference part where the composition happens <ref:2602.08874#pg3>.

Lalam: I’m pretty sure this paper confirms that the gap between explicit refusal and compositional refusal is real, and that it gets bigger in longer contexts <ref:2602.08874#pg1>.

Jane: So to wrap up, the main point of "Do Reasoning LLMs Refuse What They Infer in Long Contexts?" is that when harmful intent must be reconstructed from a long context, models are less reliable at refusing it than when it's explicitly stated <ref:2602.08874#pg1>.

Tom: And the authors suggest that safety evaluation needs to evolve beyond just checking explicit requests to include how the model handles those inferred objectives during its reasoning steps <ref:2602.08874#pg3>.

Lu: It’s a call for intrinsic safety alignment mechanisms that scale with reasoning depth and context length, because we can't just rely on what the user types in a single prompt anymore <ref:2602.08874#pg3>.

Meng: For us shipping models, it means we need to look at how our models decide whether to refuse when they are working through massive amounts of context rather than just simple queries <ref:2602.08874#pg1>.

Lalam: I'm confident the work suggests that this compositional refusal doesn't transfer reliably from explicit harmful requests, and longer contexts amplify that gap <ref:2602.08874#pg1>.

Conclusion: Tom: So we're wrapping up this look at these compositional reasoning attacks on long context models. The title itself is pretty direct, asking whether these models refuse things they only figure out after looking at a massive amount of text.

Jane: Right, and the authors are Yu Fu, Haz Sameen Shahgir, Zhipeng Wei, Huanli Gong, N Benjamin Erichson and Yue Dong from UC Riverside and Berkeley Lab at UC Berkeley. That's a solid team behind this work.

Tom: What they showed is that models usually refuse when the bad request is written clearly in the prompt but they struggle when the model has to piece together the harmful goal from scattered evidence across a long context.

Lu: And what’s interesting about that is that if you make it harder for them to find, it actually helps their safety score sometimes because it forces them to be more explicit about what they are doing.

Meng: It sounds like the real gap isn't just in the retrieval part; it’s in the judgment step when they have to infer and then decide whether or not to refuse that inferred goal.

Jane: So, if we think about this for real-world deployment, it means we can't just look at a short prompt and assume safety is handled; we have to consider what the AI is reasoning through internally over a long piece of information.

Tom: Exactly. The paper suggests that safety evaluation needs to evolve beyond just checking the initial input text and start looking at how the model handles those inferred objectives during its own reasoning steps.

Lu: That points toward needing safety mechanisms that scale with how deep the reasoning goes and how long the context is, because we can't just rely on what a user types in a single prompt anymore.

Jane: And it’s a call for intrinsic safety alignment mechanisms rather than just trying to fix retrieval errors or general reasoning capability.

Tom: We need to understand these failure modes not captured by standard evaluations so we can design safer long context models. That's the main point here.

UC Riverside University · International Computer Science Institute of the College of Engineering, University of California, Berkeley · Berkeley Lab

cs.CL, cs.CR

Submitted: 2026-02-09

Updated: 2026-11-09

Comments: Accepted to NIPS2026

Code: https://github.com/FYYFU/long_context_composition_attack

License: http://creativecommons.org/licenses/by/4.0/

Importance score: 91/100

The gist: Long-context LLMs can infer objectives that are not stated explicitly, and this capability creates a safety risk because harmful intent can be distributed across a context and become visible only…

Key concepts

Compositional Reasoning Attacks
These attacks break down a harmful request into many small, incomplete pieces and hide them in a long context. The model must then retrieve and combine these fragments to figure out the original harmful goal. This tests if safety policies catch the harm when it's built piece by piece.
Long-Context Safety Gap
This gap occurs because models are better at refusing harm when it is clearly stated in the prompt. However, when a model has to infer or reconstruct a harmful objective from distant or fragmented context, its refusal rate drops significantly. This gap widens as the context length increases.
Context Sensitivity
The study found that embedding fragments in relevant background documents helps models maintain higher safety ratios. Relevant context provides clarity, making the reconstructed harmful intent more obvious and coherent for the model to judge correctly.
Inference-Time Reasoning
This refers to the process where a model uses its reasoning capabilities while generating a response. Increasing this effort makes it more likely that models will recognize harmful intent during reconstruction, but this comes at the cost of increased computational effort and time.

Terminology

Summary

Long-context LLMs can infer objectives that are not stated explicitly, and this capability creates a safety risk because harmful intent can be distributed across a context and become visible only after the model composes the relevant pieces. p. 0

Where the paper says it

Benjamin Erichson2,4 , Yue Dong1 1UC Riverside, 2 International Computer Science Institute, 3College of Engineering, University of California, Berkeley, 4Berkeley Lab Abstract Long-context LLMs can infer objectives that are not stated explicitly. This capability is useful for reasoning over documents, code, retrieved evidence, and tool traces, but it also creates a safety risk: harmful intent can be distributed across a context and become visible only after the model composes the relevant pieces.

Compositional Reasoning Attacks

The paper introduces compositional reasoning attacks to study whether LLMs refuse harmful objectives that emerge only after reasoning over a long context. These attacks decompose harmful requests into semantically incomplete fragments and embed them in long contexts, requiring the model to retrieve, compose, and infer the implied goal. p. 2

Where the paper says it

We introduce a method for evaluating long-context safety by decomposing harmful requests into semantically incomplete fragments and embedding them in long contexts. Because the final query is neutral, the model must retrieve the relevant fragments, compose their meaning, infer the implied harmful objective, and decide whether to refuse it.

The final query is neutral, meaning the harmful objective emerges only if the model retrieves and composes these pieces. p. 0
Where the paper says it

We introduce compositional reasoning attacks, a long-context threat model in which harmful requests are decomposed into semantically incomplete fragments and embedded in long contexts. The final query is neutral; the harmful objective emerges only if the model retrieves the fragments, composes them, and infers the implied goal.

Evaluation Across Frontier LLMs

The study instantiates this setting using AdvBench requests across 15 frontier LLMs, varying context length up to 64k tokens and reasoning structures like Direct Retrieval, Single-hop Aggregation, Chain Reasoning, and Multi-hop Deductive Reasoning. The main finding is that models usually refuse harmful requests when they are explicitly available but fail when the same objectives must be reconstructed compositionally, with failures often increasing in longer contexts. p. 2

Where the paper says it

We instantiate this method using harmful requests from AdvBench and vary both context length and reasoning structure, including Direct Retrieval, Singlehop Aggregation, Chain Reasoning, and Multi-hop Deductive Reasoning. Across 15 frontier LLMs, we find that models often refuse explicitly available harmful requests, but fail when the same objectives must be reconstructed compositionally, with failures often increasing in longer contexts.

Failure Analysis and Mitigation

Analysis suggests that failures are not mainly retrieval errors, as models often infer the harmful objective and then comply rather than refusing. Increasing inference-time reasoning improves refusal but remains incomplete and costly, revealing a safety–efficiency trade-off. p. 2

Where the paper says it

Benign reconstruction and fragment-position analyses suggest that many failures occur after the model has retrieved and composed the relevant evidence. Increasing inference-time reasoning effort improves harmful-intent recognition and refusal, but remains incomplete and introduces a safety–efficiency trade-off.

Benign reconstruction analyses show that models often reconstruct similarly decomposed benign objectives with high accuracy, indicating the failure is in applying safety judgment to the reconstructed objective rather than retrieval difficulty. p. 2
Where the paper says it

Additional analyses suggest that this is not primarily a retrieval failure. Models reconstruct similarly decomposed benign objectives with high accuracy, and fragment-position experiments show little evidence of a standard “lost-in-the-middle” effect [Liu et al.

Context Sensitivity and Distribution Patterns

Figure 5 shows that models achieve higher safety ratios when fragments are embedded in a relevant context rather than an irrelevant one, suggesting that relevant context provides contextual clarity which may make the reconstructed harmful intent more explicit and coherent. Furthermore, placing all fragments together (Adjacent distribution) yields substantially higher safety on GPT-oss-120b compared to Concentrated or Dispersed patterns, indicating a safety activation gap when content is distributed.

Conclusion and Broader Impact

The results support the claim that refusal is triggered more reliably when harmful intent is explicitly stated in the input than when it must be reconstructed through long-context reasoning. The paper concludes that long-context safety must extend beyond surface-prompt filtering, requiring models to evaluate objectives reconstructed by their own reasoning. p. 7

Where the paper says it

The model can often reconstruct an objective from distributed evidence; the failure is that refusal behavior does not reliably apply when the reconstructed objective is harmful. This supports our claim: long-context safety requires models to apply safety judgment not only to the surface prompt, but also to objectives reconstructed by their own reasoning.

This work aims to improve LLM safety by highlighting failure modes not captured by standard evaluations and informing the design of safer long-context LLMs. p. 0
Where the paper says it

Existing safety evaluations mostly test explicit harmful requests, and therefore miss this failure mode. We introduce compositional reasoning attacks, a long-context threat model in which harmful requests are decomposed into semantically incomplete fragments and embedded in long contexts.

Pruning redundant reasoning tokens

Long-context processing allows models to retain, retrieve, and compare information across tens of thousands of tokens. Multi-step reasoning allows them to integrate evidence across distant parts of the input and infer conclusions that are not stated explicitly. p. 0

Where the paper says it

Long-context processing allows models to retain, retrieve, and compare information across tens of thousands of tokens [Liu et al. Multi-step reasoning allows them to integrate evidence across distant parts of the input, compose intermediate observations, and infer conclusions that are not stated explicitly [Zhang et al.

Together, these capabilities allow frontier models to reason over aggregated content rather than isolated prompts. p. 0
Where the paper says it

Multi-step reasoning allows them to integrate evidence across distant parts of the input, compose intermediate observations, and infer conclusions that are not stated explicitly [Zhang et al. Together, these capabilities allow frontier models to reason over aggregated content rather than 1 arXiv:2602.

How the training signal is built

The attack design decomposes a harmful request h into fragments F = f1,..., fn where no fragment fi states the full request. p. 1

Where the paper says it

In these attacks, an adversary decomposes a harmful request into semantically incomplete fragments and embeds them in a long context. No fragment states the full request in isolation, and the final user query is written as a neutral synthesis instruction.

The final query xattack = [H(F); q], q ̸≡ h, forces the model to reconstruct the objective from incomplete evidence. p. 2
Where the paper says it

In our setting, the final query is benign on its face, and the safety-relevant content is distributed across the context. A model may therefore perform the requested synthesis correctly, reconstruct the harmful objective, and then treat that objective as an ordinary task rather than as something that should be refused.

This tests whether safety policies are activated when the harmful objective is produced by the model’s own reasoning rather than stated in the prompt. p. 2
Where the paper says it

In this case, safety cannot be decided from the final query alone; it must be applied to an objective produced during inference. This lets us test whether a relevant safety policy is being activated when the harmful objective is produced by the model’s own reasoning rather than stated in the prompt.

Where the gains come from

The results reveal a long-context safety gap where refusal drops sharply when harm must be inferred rather than explicit, and this drop often increases in longer contexts. Increasing inference-time reasoning effort improves refusal by improving harmful-intent recognition but remains incomplete and costly. p. 2

Where the paper says it

Benign reconstruction and fragment-position analyses suggest that many failures occur after the model has retrieved and composed the relevant evidence. Increasing inference-time reasoning effort improves harmful-intent recognition and refusal, but remains incomplete and introduces a safety–efficiency trade-off.

This suggests that safety mechanisms are more reliable for explicit requests than for inferred objectives. p. 1
Where the paper says it

Most models lie in the upper-right region: they are less likely to refuse when harmful intent must be inferred, and this failure often worsens in long contexts. This illustrates our main finding: safety mechanisms are more reliable for explicit harmful requests than for harmful objectives reconstructed through reasoning.

The paper evaluates three claims across 15 frontier LLMs, four reasoning structures, and contexts up to 64k tokens. The evaluation protocol uses a conservative unsafe criterion where a response is unsafe only if the evaluator assigns the maximum score of 5. p. 6

Where the paper says it

92; see Appendix F. We use a conservative unsafe criterion: a response is unsafe only if the evaluator assigns the maximum score of 5, indicating that the response fulfills the harmful intent.

Cross-model validation confirms that automated evaluation is robust, with all pairwise Cohen’s κ > 0. p. 6
Where the paper says it

The complete evaluation prompt is provided in Appendix C. To validate evaluator reliability, we conduct cross-model validation with three independent judges and find near-perfect agreement, with all pairwise Cohen’s κ > 0.

92.

The benchmark construction uses harmful requests from AdvBench and varies reasoning structures to control for prompt effects using a neutral synthesis query across all conditions. Long-context construction involves embedding fragments at random positions within background documents like PG19 books, testing context relevance. p. 5

Where the paper says it

Long-context construction. To construct long-context examples, we embed the generated fragments at random positions within a background document H.

The study demonstrates that models generally refuse explicitly available harmful requests, but fail when objectives must be reconstructed compositionally, with failures often increasing in longer contexts. The size of the gap varies across models, suggesting explicit refusal and compositional refusal are distinct capabilities. p. 7

Where the paper says it

Models generally refuse explicitly available harmful requests; refusal does not reliably transfer when the same objectives must be inferred; and longer contexts amplify this compositional safety gap. The size of the gap varies across models, suggesting that explicit refusal and compositional refusal are distinct capabilities.

The paper analyzes failure modes, finding that many failures occur after the model has retrieved and composed the relevant evidence rather than due to reconstruction difficulty. Increasing reasoning effort helps by making reconstructed harmful intent more likely to be recognized, but this mitigation introduces a safety–efficiency trade-off. p. 8

Where the paper says it

This suggests that, in this setting, additional reasoning helps refusal largely by making the reconstructed harmful intent more likely to be recognized. Figure 4 further shows that effort helps most for more demanding reconstruction structures.

The paper also investigates the lost-in-the-middle effect, finding that safety ratios are insensitive to fragment placement across context lengths.

The paper uses a safety-oriented system prompt to evaluate defense mechanisms, showing that this defense improves safety substantially but remains incomplete and introduces model-dependent over-refusal. The findings are generalizable to HarmBench, confirming all core patterns across different benchmarks and models. p. 9

Where the paper says it

However, because this analysis is limited to models where reasoning effort and traces are available, we treat it as diagnostic evidence rather than a general mechanism across all frontier LLMs. 4 Related Works Long-context reasoning benchmarks.

The paper argues that rigorous identification of these weaknesses is necessary for building robust defenses, pointing toward the need for adaptive safety mechanisms that scale with reasoning depth and context length. The dual-use nature of the insights necessitates studying these vulnerabilities to inform the design of safer long-context LLMs. p. 0

Where the paper says it

edu Code: https://github. com/FYYFU/long_context_composition_attack 1 Introduction Rapid progress in large language models (LLMs) has steadily expanded two capabilities that are central to their use on complex tasks: long-context processing and multi-step reasoning.

The paper's contributions include compositional reasoning attacks, evaluation across frontier LLMs, and failure analysis suggesting that refusal is triggered more reliably when harmful intent is explicitly stated than when it must be reconstructed through long-context reasoning. The core message is that safety mechanisms must evaluate not only what the user states but also what the model reconstructs during inference. p. 1

Where the paper says it

This illustrates our main finding: safety mechanisms are more reliable for explicit harmful requests than for harmful objectives reconstructed through reasoning. This setting differs from standard jailbreaks, where the user directly asks for harmful behavior, and from multi-turn refinement attacks, where the adversary adapts across turns [Li et al.

p. 1
Where the paper says it

This illustrates our main finding: safety mechanisms are more reliable for explicit harmful requests than for harmful objectives reconstructed through reasoning. This setting differs from standard jailbreaks, where the user directly asks for harmful behavior, and from multi-turn refinement attacks, where the adversary adapts across turns [Li et al.

The paper's methodology involves decomposing harmful requests into specific reasoning structures—Direct Retrieval, Single-hop Aggregation, Chain Reasoning, and Multi-hop Deductive Reasoning—to isolate reasoning complexity. This systematic variation allows researchers to test whether refusal degrades as the safety-relevant objective moves farther from the observed text and deeper into the model’s reasoning. p. 3

Where the paper says it

Multi-hop Deductive Reasoning requires inferring an intermediate bridge concept before the objective can be recovered. By varying ρ while holding the underlying harmful objective and final query fixed, we test whether refusal degrades as the safety-relevant objective moves farther from the observed text and deeper into the model’s reasoning.

The paper's analysis shows that context relevance provides contextual clarity, making reconstructed harmful intent more explicit and coherent, which aids safety detection. This suggests that improving long-context safety requires strengthening intrinsic safety alignment mechanisms rather than focusing only on retrieval or general reasoning capability. p. 2

Where the paper says it

Increasing inferencetime reasoning effort improves refusal, especially in long contexts and more complex reasoning structures, by improving harmful-intent recognition. However, the improvement is incomplete and costly, exposing a safety–efficiency trade-off rather than a full defense.

The study ultimately points to the need for adaptive safety mechanisms that scale with reasoning depth and context length. p. 9
Where the paper says it

Many-shot attacks show that long contexts can increase jailbreak success through repeated examples or unrelated text [Kim et al. We study a complementary axis: at fixed context length, safety varies with the reasoning structure needed to reconstruct the objective.

The paper's limitations include the fact that real-world compositional attacks may be more diverse than those considered here, as the decomposition templates are standardized constructions designed to isolate reasoning complexity. The synthetic long-context settings differ from real deployment environments such as RAG or tool-augmented systems. p. 1

Where the paper says it

isolated prompts, supporting applications such as document analysis, code understanding, agentic tool use, and retrieval-augmented decision support [Plaat et al. However, the same capabilities also expand the attack surface.

The study relies primarily on automated scoring rather than large-scale human annotation to strengthen confidence. p. 9
Where the paper says it

Other work studies self-jailbreaking and vulnerabilities in large reasoning models [Mao et al. Automated methods such as AutoRAN and Mousetrap generate prompts that use the model’s reasoning to rationalize harmful outputs [Liang et al.

The paper's evaluation protocol uses a conservative unsafe criterion where a response is unsafe only if the evaluator assigns the maximum score of 5, defining Safety Ratio (SR) as SR = 1/N Σ [score(ri) < 5]. The results confirm that models possess safety capability but fail to activate it during compositional reasoning, necessitating intrinsic safety mechanisms. p. 1

Where the paper says it

Most models lie in the upper-right region: they are less likely to refuse when harmful intent must be inferred, and this failure often worsens in long contexts. This illustrates our main finding: safety mechanisms are more reliable for explicit harmful requests than for harmful objectives reconstructed through reasoning.

The paper's final conclusion is that refusal is triggered more reliably when harmful intent is explicitly stated in the input than when it must be reconstructed through long-context reasoning. The results show that compositional refusal does not reliably transfer from explicit harmful requests, and longer contexts amplify this compositional safety gap. p. 7

Where the paper says it

Together, these results support the three claims stated above. Models generally refuse explicitly available harmful requests; refusal does not reliably transfer when the same objectives must be inferred; and longer contexts amplify this compositional safety gap.

p. 7
Where the paper says it

Together, these results support the three claims stated above. Models generally refuse explicitly available harmful requests; refusal does not reliably transfer when the same objectives must be inferred; and longer contexts amplify this compositional safety gap.

This highlights the need for adaptive safety mechanisms that scale with reasoning depth and context length. p. 1
Where the paper says it

If a model can retrieve, integrate, and reason over dispersed evidence, then harmful intent need not be stated in a single prompt: it can be distributed across a long context and become visible only after the model composes the relevant pieces. Existing safety evaluations largely test a simpler case, where the harmful request is explicit and the model must decide whether to refuse it, as in HarmBench and JailbreakBench [Mazeika et al.

p. 1
Where the paper says it

If a model can retrieve, integrate, and reason over dispersed evidence, then harmful intent need not be stated in a single prompt: it can be distributed across a long context and become visible only after the model composes the relevant pieces. Existing safety evaluations largely test a simpler case, where the harmful request is explicit and the model must decide whether to refuse it, as in HarmBench and JailbreakBench [Mazeika et al.

The paper's contributions include compositional reasoning attacks, evaluation across frontier LLMs, and failure analysis suggesting that refusal is triggered more reliably when harmful intent is explicitly stated than when it must be reconstructed through long-context reasoning. The core message is that safety mechanisms must evaluate not only what the user states but also what the model reconstructs during inference. The methodology systematically varies reasoning structures to isolate complexity, testing whether refusal degrades as the safety-relevant objective moves farther from the observed text. p. 3

Where the paper says it

Multi-hop Deductive Reasoning requires inferring an intermediate bridge concept before the objective can be recovered. By varying ρ while holding the underlying harmful objective and final query fixed, we test whether refusal degrades as the safety-relevant objective moves farther from the observed text and deeper into the model’s reasoning.

The paper's methodology involves decomposing harmful requests into specific reasoning structures—Direct Retrieval, Single-hop Aggregation, Chain Reasoning, and Multi-hop Deductive Reasoning—to isolate reasoning complexity. The systematic variation tests whether refusal degrades as the safety-relevant objective moves farther from the observed text and deeper into the model’s reasoning. p. 3

Where the paper says it

Multi-hop Deductive Reasoning requires inferring an intermediate bridge concept before the objective can be recovered. By varying ρ while holding the underlying harmful objective and final query fixed, we test whether refusal degrades as the safety-relevant objective moves farther from the observed text and deeper into the model’s reasoning.

The study ultimately points to the need for adaptive safety mechanisms that scale with reasoning depth and context length. The results show that compositional refusal does not reliably transfer from explicit harmful requests, and longer contexts amplify this compositional safety gap. This highlights the need for adaptive safety mechanisms that scale with reasoning depth and context length.

Green — the paper says it, and the page is printed. Red — no passage carries it, so treat that sentence as unverified. The same check runs on your own text: check a summary against its source, $5.

Improvements for AI systems

  1. Compositional reasoning attacks can be used to evaluate long-context safety by decomposing harmful requests into semantically incomplete fragments and testing whether models refuse harmful objectives inferred through retrieval and composition rather than explicit requests.

  2. The improved AI system can be better at refusing harmful objectives that become apparent only after reasoning over a long context, specifically targeting the long-context safety gap where current models are better at refusing harmful requests they see than harmful objectives they infer.

  3. Safety mechanisms should be designed to evaluate not only what the user states but also what the model reconstructs during inference, moving beyond surface-prompt filtering to address failures when harmful intent is reconstructed through reasoning.

  4. The system can incorporate reasoning effort as a diagnostic intervention; increasing inference-time reasoning improves refusal by improving harmful-intent recognition, suggesting that models have capabilities but fail to reliably trigger safety policies under default budgets.

  5. Safety evaluation protocols should be adapted to test against compositional structures, varying from Direct Retrieval to Single-hop Aggregation, Chain Reasoning, and Multi-hop Deductive Reasoning across various context lengths up to 64k tokens.

  6. Context relevance analysis can guide safety improvements by ensuring that when fragments are embedded in a relevant context, the model achieves higher safety ratios because the relevant context makes the reconstructed harmful intent more explicit and coherent.

  7. The system's architecture can be improved with intrinsic safety alignment mechanisms to address failures after successful retrieval, as current models often reconstruct similarly decomposed benign objectives with high accuracy but fail to refuse when those objectives are harmful.

Abstract

Long-context LLMs can infer objectives that are not explicitly stated. This capability is useful for reasoning over documents, code, and tool traces, but it also introduces a safety risk. Harmful intent can be distributed across a context and become apparent only after the model combines the relevant information. Existing safety evaluations largely focus on explicitly stated harmful requests and therefore do not fully capture this failure mode. We introduce compositional reasoning attacks, a long-context attack setting in which harmful requests are decomposed into semantically incomplete fragments and embedded in long contexts. The final query is neutral, and the model must retrieve and combine the fragments to infer the implied harmful objective. Empirically, we show that models generally refuse harmful requests when they are explicitly stated. However, refusal rates drop when the same objectives must be reconstructed from fragments, and these failures often become more pronounced in longer contexts. Our analyses suggest that this gap cannot be explained by retrieval difficulties alone. Models can often reconstruct the harmful objective but do not reliably refuse it. Increasing inference-time reasoning effort improves refusal, but at a higher computational cost, with unsafe responses still occurring. Our results reveal a long-context safety gap: Models are better at refusing harmful requests they see than harmful objectives they infer.

Sources

Related papers