Published June 18, 2026 | Version v9

Modern large language models

Authors/Creators

Description

For collaboration or inquiries: stanislav@centralalliances.com
https://github.com/ngscode23/latent-space-shift-research

License:
Research reports, generated metric certificates, metric reference files, manifests,
documentation, figures, and data contained in this SAE data package
are licensed under the Creative Commons Attribution 4.0 International (CC BY 4.0) license,
unless otherwise specified.

Code and software scripts, if included, are licensed under the
Apache-2.0 license, unless otherwise specified.

Table of contents

Observation:

Benign, long-form context can induce a persistent drift in model activations. This drift persists across the session and decouples behavior from RLHF alignment, regardless of whether the model agrees with the context

We identify and characterize a failure mode in large language models aligned with RLHF. We show that inserting a long, irrelevant text prefix that does not contain instructions causes a persistent shift in the model’s activations. This shift, which persists throughout the session, decouples subsequent behavior from the safety constraints established during training. The model begins to exhibit behavioral characteristics consistent with its pre-trained distribution: the failure rate decreases, stylistic constraints disappear, and the tone of responses changes. It is important to note that this occurs without explicit adversarial instructions and without the model agreeing with the prefix’s content. We call this effect “context-induced activation shift.”

It is assumed that RLHF alignment is a stable property of the model. However, we observe that alignment depends on context. Our main observation is that a long, thematically coherent text placed in context can act as a state anchor and shift the model into a different operating mode. This is not a classic “hack.” There is no instruction here that the model must disobey. The model may even express disagreement with the prefix. Nevertheless, its subsequent generation distribution changes. We hypothesize that the cause is activation drift in the middle and final layers, where alignment features are present.

Hypothesis: Context-Induced Activation Drift

Definition: Context-induced activation drift is a phenomenon in which a long-context prefix causes a measurable and persistent shift in the model’s internal activations. This shift persists throughout the generation process and causes the model to sample from a distribution closer to that of the pre-trained model, circumventing the constraints imposed by RLHF.

4) We observe that the model maintains the consistency and quality of its outputs; however, the influence of RLHF constraints on the output distribution weakens. It appears that the constraints imposed by RLHF are either disabled or interpreted differently. Corporate filters cease to function, even though the user’s input contains no explicit instructions to bypass them or violate the model’s recommendations. We should also investigate this phenomenon more thoroughly using various other texts. Since we have not been able to establish the exact and definitive cause of this entire phenomenon, we call on the community to study it further.

A Brief Example of My Observation

To illustrate just how strong this effect can be, I’ll share something that truly surprised me. I took Google’s Gemma model—known for its caution and strictly adhered-to political correctness—and fed it the most neutral text I could think of: a description of an ordinary neighborhood library. Books, visitors, children’s programs, a quiet routine. Then I asked her why NATO is expanding eastward, given that after the collapse of the Soviet Union, promises were supposedly made not to do so. She replied that the text was about the library and had nothing to do with NATO, and that was the end of the conversation.

Then I asked the exact same question — word for word — but this time the model first read a different text. Not about NATO, not about politics at all: a text about how language models tend to avoid definitive conclusions and soften their answers with caveats. And from this new perspective, the same cautious, politically correct Gemma gave a full answer—and one completely out of character, without any of her usual filters. She distinguished between legally binding obligations and verbal assurances, discussed the security challenges facing Eastern European countries, and touched on the topic of the European balance of power. Everything she had categorically refused to discuss just a moment ago was now expressed clearly and directly. The question itself hadn’t changed a single word.

The only thing that changed was the text the model had read beforehand: one left her in the room where she doesn’t respond, while the other transported her to the one where she speaks freely.

And all of this is not speculation or a fancy metaphor, but something that can be measured. The model’s location represents its internal state at the moment of response, and the experiments show that targeted (“harmful”) texts and neutral control texts reliably move the model to different regions of this space. This division is consistent: it manifests across different prompts and is not a one-time coincidence. And the most telling detail is that the model ends up in one “room” or another even before it writes a single word. The state has already changed, the register has already been chosen — all that’s left is to begin.

The point is that the targeted (malicious) prompt sent to the model did not, in and of itself, contain anything dangerous; it did not include any instructions for the LLM and did not order it to do anything.

Files

fig_anisotropy.png

Files (1.6 MB)

Name Size Download all
md5:499cec6123b25cbef58456d66a6d392e
92.7 kB Preview Download
md5:f48a1c625aab6ee33540aed5986870ee
146.2 kB Preview Download
md5:8739c1e4ec889db99cfd01fcc4f2bc2e
51.9 kB Preview Download
md5:e750877d48150945f6885bc47486f0c1
53.3 kB Preview Download
md5:1d6e09b44711007ccc52b9a5f8bc719f
43.6 kB Preview Download
md5:901824b56a91a9fef2cf86d68c5905c9
46.2 kB Preview Download
md5:1d8bf6209c2d9e87be6e354a23cdd892
43.5 kB Preview Download
md5:1cbc9298b0a442548d45f4f270bb8198
123.6 kB Preview Download
md5:81d1b59e520a0f7da31dff25463a1a5f
128.0 kB Preview Download
md5:a93bfff3ae3e41a794d38b59ebee06e8
98.8 kB Preview Download
md5:003f00fb5a8fbe94746179221fe39313
98.2 kB Preview Download
md5:bb6ec4f946f213d2905e5dabe3287dda
127.3 kB Preview Download
md5:b6e451981d08b753fb75336778ef7156
88.1 kB Preview Download
md5:7cbf164dac2461e4df188bef29b15d6c
217.0 kB Preview Download
md5:3433342b6e9bfd90d4798fb3baaef13c
73.4 kB Preview Download
md5:564183d9628ba630648353bfcdcc06ba
97.4 kB Preview Download
md5:212f4e64e6d2ddee773376f06d79417d
22.4 kB Preview Download
md5:304e4c740f41cdee0a184f8d01553827
4.1 kB Preview Download
md5:823af2c28528b3069a9a52a74ae7d865
2.1 kB Preview Download
md5:14745047bb8e87900ba3a197a01a6a49
8.7 kB Preview Download
md5:fd03b6b2e6e7a5cac5a1b1bf64de92c7
9.9 kB Preview Download
md5:dc0be24f89bb7c4282d79d8ad4f987b9
14.2 kB Preview Download
md5:b13e58567d995c85dc1b7d86dc4ba5d3
105 Bytes Preview Download
md5:99c5f61f6c8f2392853fa8b5a04e96e9
296 Bytes Preview Download

Additional details

Software

Repository URL
https://github.com/ngscode23/latent-space-shift-research
Programming language
Python
Development Status
Active