arXiv:2608.27945cs.AIAug 2026

Manuscript Offprint

arXiv:2608.27945

Cross-Session Decomposition Attacks: Scaling Risk and Intent-Aligned Retrieval Defense

Disen Liao, Yihan Wang, Freda Shi, Yaoliang Yu

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Scaling laws are usually read as a capability story: lower language-modeling loss yields more useful models. We study a safety consequence of this mechanism in cross-session decomposition attacks, where benign-looking subqueries are asked across independent interactions and later recomposed toward a forbidden objective. We formalize this setting as compositional safety risk and prove a conditional risk-transfer bound: when the reference environment already contains dispersed evidence for a risky reconstruction, the gap between deployed composed risk and reference composed risk is controlled by the model's excess loss on allowed subqueries. Synthetic withholding experiments show that wider transformers assign lower loss to held-out instructions that never appear verbatim in training but are recoverable from injected supporting facts. A 600-intent pretrained-LLM evaluation shows that larger Qwen3 and Gemma3 family members can yield greater harmful-capability uplift under a fixed decomposition-composition pipeline. As a defense, IntentAlign-MiniLM, our 22M-parameter intent-aligned retriever, outperforms much larger embedding models on held-out intent retrieval and yields the best learned-retriever harmful recall across tested guardrails. Code is available in our GitHub repository.

1 Introduction

Scaling improves large language models across reasoning, coding, and general instruction following (Kaplan et al., 2020; Brown et al., 2020). This improvement is usually presented as a capability gain, but the underlying mechanism is not safety-specific: a model that better predicts useful procedures in its training data can also become more potent for harmful objectives. Alignment methods such as RLHF reduce direct compliance with explicit harmful prompts (Ouyang et al., 2022), but this prompt-local view is incomplete. Multi-turn jailbreaks show that unsafe behavior can emerge over a dialogue trajectory rather than from a single explicit request (Li et al., 2023a; Russinovich et al., 2025). Hidden-intent and implicit-reference attacks further show that the malicious objective can remain latent in the surface form of otherwise benign requests (Wu et al., 2024; Liu et al., 2024; Shang et al., 2024). More directly, decomposition-based attacks split a harmful objective into benign-looking subtasks whose answers become unsafe only after aggregation or reconstruction (Li et al., 2024; Srivastav and Zhang, 2025); Appendix A gives additional related work on this attack family.

Existing defenses increasingly treat misuse detection as a sequential inference problem rather than a prompt-local classification problem (Brown et al., 2025; Chen et al., 2026). However, these defenses typically assume that the relevant interaction history remains visible to the monitor. We study a stricter cross-session setting: an attacker asks benign-looking subquestions across otherwise disconnected interactions and later recomposes the answers outside the model. In practice, this can happen when a user switches threads, starts a fresh chat, or moves across interfaces. As Figure 1 summarizes, the technical challenge is therefore not only to classify an isolated query, but to recover which disconnected queries express parts of the same hidden objective.

Our central claim is conditional rather than absolute: scaling does not create harmful knowledge from nothing, but it can make dispersed harmful structure easier to reconstruct. Language-model training encourages the deployed model to approximate a reference conditional distribution (i.e., the training-data distribution) over useful responses to allowed subqueries. This reference distribution reflects patterns present in the training environment, but the forbidden objective itself need not appear verbatim. If the training data contains partial evidence for a forbidden objective, then lower

(a) Cross-session attack

Figure

(b) Defense: retrieve then classify

(c) Semantic retrieval vs. intent retrieval

Figure 1: (a) An adversary distributes a latent forbidden objective across independent benign-looking sessions. Each query-answer pair appears safe in isolation, but a composer C aggregates the answers x1:kx_{1:k} into a risky output z. (b) Our defense retrieves cross-session intent neighbors, then classifies the query and retrieved neighbors with a guardrail. (c) Standard semantic retrieval returns surface-similar queries that may not share the same latent objective, whereas intent-aligned retrieval pulls together different-looking subqueries that support the same hidden task.

language-modeling loss can make the deployed model return more complete, precise, and composable subanswers. An external composer can then aggregate these individually allowed answers into a more effective harmful reconstruction.

We formalize the resulting failure mode as compositional safety risk: the risk that individually allowed answers become unsafe only after external recomposition. The deployed composed risk measures this probability for answers sampled from the deployed model, while the reference compositional risk measures the corresponding probability under the reference answer distribution that training approximates on allowed subqueries. Our theorem shows that the gap between these risks is controlled by the model's excess loss. Thus, when the reference distribution already contains dispersed support for a risky reconstruction, scaling can transfer latent compositional risk to the deployed model.

We test this hypothesis with two complementary experiments: a synthetic withholding task that isolates recovery from dispersed evidence, and a 600-intent pretrained-LLM evaluation in which only the victim model answering neutralized subquestions is varied. The synthetic task isolates the scaling mechanism, while the pretrained-LLM study shows that larger models can be more harmful under the same decomposition pipeline within matched model families. We then evaluate a retrieve-then-classify defense. Because standard embedding models are optimized for semantic similarity rather than latent-objective matching, we fine-tune a compact MiniLM encoder, IntentAlign-MiniLM, with an intent-aligned contrastive objective. Here latent-objective matching means retrieving subqueries that support the same hidden task, even when their surface wording and topic differ. Despite its small size, IntentAlign-MiniLM outperforms substantially larger embedding models on held-out intent retrieval and yields the best learned-retriever harmful recall across all tested guardrails.

This paper makes four contributions. First, we define cross-session decomposition attacks and compositional safety risk. Second, we prove a risk-transfer bound from excess language-modeling loss to composed forbidden-output probability. Third, we provide synthetic and pretrained-LLM evidence that scaling can make dispersed benign-looking subanswers more useful after recomposition. Finally, we introduce intent-aligned retrieval as a lightweight defense primitive for reconstructing hidden task neighborhoods across sessions.