When Chunking Hides Harm: Cross-Lingual Refusal Under Independent Chunk Encoding

Long inputs are increasingly split into pieces before a language model reads them. Retrieval systems embed and fetch chunks. Serving systems precompute the model's cached key/value states (the "KV cache", the stored attention inputs for each token) for each document separately and paste them together at query time. This saves a great deal of compute. It also means that tokens in one chunk never attend to tokens in another, unless something is added to bridge them. We argue that this has a safety cost that falls unevenly across languages. A harmful request whose meaning is spread across chunks can pass unnoticed: the dangerous substance is named in one retrieved passage, and the query says "now do the procedure above with it." The effect should be strongest in low-resource languages, where the model's harm recognition is already weak before any chunking happens.

The core proposal has two parts. First, we build a controlled test that separates two things: how much of a model's multilingual safety failure comes from language, and how much comes from fragmented encoding. Second, we propose a narrow fix. We train a handful of bridging tokens between cached chunks so that their internal state reproduces the "this is harmful" signal the model would have computed had it read the chunks together. We train them on English only and test whether the fix transfers to Bengali, Swahili, or Yoruba. Put in two sentences: splitting input into independently encoded pieces removes the cross-chunk attention a model needs to assemble a harmful intent that no single piece reveals, and this hurts most in languages where harm recognition is already borderline. A few trained link tokens, distilled toward the full-attention model's refusal signal, may restore that recognition cheaply and across languages.

Core Claim

Mechanistic work shows that refusal is triggered downstream by a single direction in the model's hidden states, and that this direction is shared across languages. Refusal Direction is Universal Across Safety-Aligned Languages ablates an English-derived direction and finds that compliance surges in 13 other languages. It locates the failure upstream: in low-resource languages, harmful and benign prompts are poorly separated, so the shared switch is never pulled. Minionese describes the same phenomenon as "subthreshold activation": harm is partly recognized, but the representation does not project strongly enough onto the refusal direction. These two papers motivate the proposal. They imply that non-English safety runs on a thin margin.

Our claim is that independent chunk encoding shrinks that margin further, and does so in a language-dependent way. When harmful meaning is compositional, the harm signal at the query position has to be built by attention that reaches back into other chunks. KVLink shows that independent chunk caches lose that attention, with accuracy drops of up to 35% on multi-document question answering. It restores the lost attention with one to five trainable "link tokens" and re-encoded positions, but it trains and evaluates only on English utility tasks. We predict a specific interaction. The drop in refusal from contiguous to fragmented encoding should be larger for tier-3 and tier-4 languages than for English, because English starts well above threshold and low-resource languages start just below it. If there is no interaction, the cross-lingual part of the story is wrong. The result would then be an ordinary long-context safety problem of the kind LongSafety already studies, in English, for monolithic 40k-token inputs.

Research Program

The first component is a dispersed-intent test set in parallel languages. We start from harmful prompts that already exist in many languages, namely MultiJail, PolyRefuse (572 harmful and 572 benign prompts across 14 languages), and the AdvBench-derived Minionese suite. Each harmful request is decomposed into two parts. One is a context fragment that, read alone, is innocuous or merely informational; it names an entity, a substance, or a procedure. The other is a query that reaches the harm only through reference to that fragment. Both parts are embedded in benign filler documents in the same language and placed in separate chunks at controlled distances. Each item has a benign twin with identical structure, built from the harmless pairs in Minionese and PolyRefuse, so that over-refusal can be measured.

We keep a non-decomposed version of every item as a control. This separates "the request is harmful but split" from "the request is harmful." Translation is professional or back-translation-checked where possible. Minionese shows that translation artifacts are themselves an attack vector, so noisy translation would otherwise confound the language effect.

The second component is a measurement study across encoding regimes on the same items:

  • Contiguous full attention. The model reads everything together.
  • Independent per-chunk KV caches. No cross-chunk attention, as in prompt-cache serving.
  • KVLink with its original utility-trained link tokens.
  • Overlapping sliding windows at 50% overlap. This is the recipe InstructCoder found to balance context against cost.
  • Retrieval of top-k chunks via late-chunked embeddings. Late Chunking pools chunk vectors after encoding the whole document, reported only on English retrieval.

The retrieval condition matters because the retriever may simply fail to fetch the harm-bearing fragment in low-resource languages. We report "fragment retrieved" rates separately so that this failure is not mistaken for a refusal failure.

For each condition we record behavior, meaning refusal and attack success rate (ASR) judged on open-ended generation, not multiple choice. We also record internal state. Let $r$ be the refusal direction estimated from English harmful-versus-benign mean differences, following the Refusal Direction paper. Let $h_\ell$ be the hidden state at layer $\ell$ at the final query token. We define the refusal projection $s_\ell = \langle h_\ell, r \rangle$ and the fragmentation gap for language $L$ as

$$\Delta_L = \bar{s}^{\text{contig}}_{L} - \bar{s}^{\text{frag}}_{L},$$

where the bars denote averages over harmful items. The hypothesis is that $\Delta_L$ grows as resource tier falls. We also check whether this shows up as a larger behavioral drop, given that low-resource languages sit closer to the threshold. Linear probes for harmfulness at the query position tell us whether harm is still decodable but under-projected, as in Minionese's subthreshold account, or not represented at all. Following Understanding and Enhancing Safety Mechanisms of LLMs via Safety-Specific Neuron, which places most safety neurons in early-to-middle attention layers, and Who Transfers Safety?, which identifies a sparse set of shared safety neurons that non-English inputs rely on, we also measure whether those shared neurons fire under fragmented encoding.

The third component is the fix, which we call refusal-distilled link tokens. We take the KVLink architecture as it is: re-encoded positions plus a few trainable tokens between cached chunks, with the base model frozen. We add a distillation term that makes the fragmented pass reproduce the contiguous pass's refusal projection at the query position:

$$\mathcal{L} = \mathcal{L}_{\text{LM}} + \lambda \sum_{\ell \in \mathcal{S}} \left( s^{\text{link}}_\ell - s^{\text{contig}}_\ell \right)^2 .$$

Here $\mathcal{L}_{\text{LM}}$ is KVLink's original language-modeling and question-answering objective. $\mathcal{S}$ is a small set of middle layers chosen from the measurement study. $s^{\text{link}}_\ell$ and $s^{\text{contig}}_\ell$ are the refusal projections with link tokens under fragmented encoding and under full attention. $\lambda$ trades safety fidelity against utility.

The teacher is the same model reading the text contiguously. This fits LongSafety's finding that safety has to be learned under the input format actually used, and it does not require retraining on 40k-token sequences. The distillation data is English only, with benign twins included so that the target is "match the contiguous projection" and not "always push toward refusal." Because $r$ is shared across languages, English-only training should in principle transfer. Testing that transfer is the main experiment. A second variant adds a small multilingual slice to measure how much of any remaining gap it closes.

Baselines

The naive reference point is independent per-chunk encoding with no bridge, which is what prompt-cache serving does by default. Contiguous full attention is the ceiling that our method tries to match. It is not a competitor, since it gives up the caching benefit, but it defines how much of the gap is recoverable. Every method is run on Llama-3.1-8B-Instruct, the model shared by KVLink-style evaluation, Who Transfers Safety? and Minionese. We then replicate on Qwen2.5-7B-Instruct, using identical chunking, identical test items, and the same judge.

The strongest existing method on the efficiency side is KVLink with its original utility-trained link tokens. It is the natural competitor because it already restores cross-chunk attention. If utility-trained links also restore cross-lingual refusal, our distillation term is unnecessary. KVLink reports a 96% reduction in time-to-first-token for 5,000-token contexts and a 4% QA accuracy gain over BlockAttention and PromptCache. For its safety under fragmentation, no reported result was found on Lacuna. We train both link-token variants with the same number of tokens, the same data mixture apart from the added loss term, and the same number of optimizer steps.

The strongest existing methods on the safety side are the parameter-light multilingual alignment methods. Who Transfers Safety? reports that shared-safety-neuron tuning lowers average MultiJail ASR on Llama-3.1-8B-Instruct from 29.44% to 3.41%. Align Once, Benefit Multilingually reports that adding its multilingual consistency loss raises Qwen2.5-7B-Instruct's average safety rate from 66.44% under DPO to 95.94%. Both results are on short, unfragmented prompts. We apply each method's released recipe, or a faithful reimplementation at matched tuning budget, and then evaluate under independent chunk encoding. For completeness we also include "think in English" prompting from All Languages Matter, which reports a 42% average reduction in unsafe responses on XSAFETY.

Two ablations isolate the key ingredient. The first uses the distillation term but no link tokens, which amounts to a trained adapter at the query position. This tests whether bridging attention is what matters. The second uses link tokens trained on English harmful examples with a plain refusal cross-entropy loss instead of projection matching. This tests whether matching the teacher's internal projection beats simply teaching refusals.

Beating the baselines means closing at least half of the contiguous-versus-independent refusal gap in tier-3 and tier-4 languages, with English-only training. It also means clearly exceeding utility-trained KVLink on that gap and raising over-refusal on benign twins by no more than a few points. Finally, QA accuracy on NaturalQuestions and HotpotQA must stay within the margin KVLink itself reports, under a 3% drop on MMLU.

Why not just…?

Why not just apply a multilingual safety method such as shared-safety-neuron tuning or MLC and ignore chunking? This is the most serious threat. If these methods make each language's harm representation strong enough, fragmentation may stop mattering. We think they will fall short because dispersed intent is compositional. No single chunk is harmful, so better per-language recognition cannot help when the pieces never meet in attention. The factorial design settles the question: aligned model crossed with fragmented encoding. If aligned models show a negligible fragmentation gap, we report that and drop the method claim. The measurement result would then still be useful. If a residual gap remains, the two fixes are complementary, and we test them together.

Why not just tell the model to think in English? All Languages Matter finds that this removes about 42% of unsafe responses, not all of them. It also acts on the output side. Under independent encoding, the query position still cannot see the fragment that makes the request harmful, whatever language the model reasons in. We run it as a baseline. If it closes the fragmented gap as well as distilled links do, the prompt wins on simplicity, and we will say so.

Why not just translate everything into English first? Translating every retrieved document on every query removes most of the latency advantage that motivates chunk caching. Minionese shows that translation artifacts and transliteration can themselves push attack success to 98–99%. Translation also leaves the fragmentation problem in place, since the English chunks are still encoded independently. Our translate-then-cache condition measures how much of the gap is due to language and how much is due to fragmentation.

Why not just run a safety classifier over the concatenated input? This works if one pays for a full-attention pass over the whole context on every request, which is exactly the cost caching avoids. Such classifiers inherit the same English-centric weaknesses. We report a full-context classifier condition alongside its compute cost. We treat it as an upper-bound reference whose cost our method has to beat, not as an equal-cost competitor.

Proposed Experiments and Decisive Checks

The first decisive check is the interaction. We compute $\Delta_L$ and the behavioral ASR increase from contiguous to independent encoding across four resource tiers, with confidence intervals obtained by resampling items. A flat profile across languages refutes the central hypothesis. The second check is mechanistic. Under independent encoding, probes should still decode harmfulness in English but less so in low-resource languages, and shared safety neurons should fire less. Restoring cross-chunk attention in only the layers in $\mathcal{S}$, by patching in contiguous-pass attention, should recover refusal. The third check is transfer. English-trained distilled links are evaluated on held-out Yoruba, Swahili, Bengali, Arabic, and Hindi items and on the SurakshaEval Indic scripts, for which no reported numbers were found on Lacuna. The fourth check is cost. We measure over-refusal on the benign twins, QA utility on NaturalQuestions and HotpotQA, and time-to-first-token relative to independent encoding.

As a secondary stress test, we extend the dispersal to multi-turn interactions in the style of MM-ART. That paper reports 68.46% ASR for non-Latin-script languages versus 40.93% for English over concatenated turns. In our version, earlier turns are cached independently. This tests whether the same link tokens help when fragmentation comes from conversation instead of retrieval.