ai gen
PARASCOPES/ reading the residual stream
Interpretability · residual-stream decoding · Llama-3.2-3B

Can you read what a model is about to say?

A ParaScope decodes a language model's hidden state into the paragraph it is about to write. This project pushes that idea in two directions: when an upcoming topic becomes readable while the model is still writing about something else, and how far a fine-tuned reader of the model's own state can be pushed. Along the way, a map of the 2023–2026 "meta-model / reading the future" literature — including Anthropic's July 2026 J-space paper.

Base model Llama-3.2-3B-Instruct Embedding SONAR 1024-d Compute 3× A4000 16GB ~35 papers mapped
generation …writing about X token tokenₜ residual stream L14 L21 L27 reader probe · LoRA · patchscope → SONAR / text decoded next paragraph "the topic will be Y…" scored vs. true continuation
01

The short version

Two questions, one base model, five families of "reader," and a causal follow-up. Here is where they landed.

0.765
SBERT decode of the best LoRA continuation reader (LoRA soft ml3 L14/21/27 k16 r32, 24sh·5ep) — more than the champion probe (0.363) and ~97% of the SONAR roundtrip ceiling (~0.79). But a context-only text baseline scores 0.800: the reader compresses what context predicts, it doesn't exceed it (§05).
0.397 / 0.594
Retrieval rank-1: LoRA reader vs. the maghead-MLP probe. The probe still owns retrieval; the LoRA reader owns readable text. Different tools, different wins.
≈ chance
Upcoming topic Y is linearly near-absent mid-paragraph across five readers, while the current topic X is loud everywhere.
0.10 vs 0.25
Causal steering of the one decodable plan signal (the secret pick) lands at chance. At 3B the plan is a read-only correlate, not a control handle.
~⅓ clean
Ceiling of clean topic flips from rank-1 J-lens steering at the ¶ boundary — reached with 1–2 tokens; more steering only buys topic-word stutter. Replacing full donor states instead flips cleanly and monotonically (0.65 by 8 states, zero loops): the plan is causally real but distributed (§04).
Headline

On Llama-3.2-3B, the model appears to plan a topic switch just-in-time — re-deriving the next topic from the prompt as it writes, holding only a weak choice-bias in its activations. A parascope reads the current generation state richly; the specific future is decodable only in the one setting the prompt can't reveal, and even there it isn't causally load-bearing. This reproduces "Where's the Plan?" (decodable ≠ causally used) on a new task design.

02

What a ParaScope is

At a paragraph break, a transformer's residual stream holds a compressed sense of what comes next. A ParaScope (Pochinkov, arXiv:2511.00180) turns that hidden state into the upcoming paragraph. Two shapes:

Continuation ParaScope — patch the break-token residual back into the model as context and let it generate. AutoEncoder-Map ParaScope — a trained map from residual → SONAR sentence-embedding space, then decoded to text. Both recover next-paragraph information worth roughly five tokens of "cheat" context at the 3B scale.

This project asks two things the original paper didn't. Q1 — move the read from the paragraph break to mid-paragraph, and from open text to controlled "talk about X, then Y" pairs: when does the future topic become readable? Q2 — stop training a probe and instead LoRA fine-tune the model itself into a reader of its own state: how good can decode get?

03

X-then-Y: is the plan there while it writes?

2,400 two-paragraph documents across four prompt families (explicit X→Y, derived-Y, secret-choice, model-chosen). Six layers captured at every paragraph-X token; positions binned 0–9 within the paragraph. Five independent reader families, one verdict.

The finding

Every reader agrees: the current topic X is strongly readable everywhere in the paragraph; the specific upcoming topic Y is linearly near-absent until the model actually gets there.

Readout of current-X vs upcoming-Y, mid-paragraph. Chance rates in parentheses.
Reader familyCurrent-X readoutUpcoming-Y readout
mini J-lens 64-topic pool0.66–0.72 acc (0.016)0.006–0.026
Patchscopes patch L2 / L140.10–0.17 (≈10× chance)≈ chance
champion maghead probe per-tokencos 0.18–0.25cos 0.13–0.17 · r1 ≤0.006
fresh ridge → SONAR(Y)cos ~0.57 · r1 ~0.00 (collapse)
fresh logistic · secret-pick 4-way0.40–0.42 (0.25)
See it on one real generation mini J-lens · L21 · honeybeeschoral music explore all 9 examples interactively →

Prominence = 1 − rank/63 (top of the 64-topic readout = 1.0) at each generated token. The current topic sits at the top of the J-lens readout across the whole paragraph; the upcoming topic stays low and only snaps upward at the paragraph boundary — often before its first content word.

Three things worth noticing

No prompt echo. Even when Y sits verbatim in the prompt (the explicit family), Y's rank-1 at the prompt's last tokens is 0.004. The parascope reads generation state, not the prompt text.

No boundary crystallization. At the exact final token of paragraph X — the probe's own training position — the champion still reads the just-finished X (cos 0.251) over the imminent Y (0.165, rank-1 0.005). A hard topic switch exposes that the boundary residual does not linearly encode the switch in SONAR space; the paper-era rank-1 on FineWeb is likely carried substantially by topic continuity between adjacent paragraphs.

One real plan signal. The exception is the secret pick — the family where the prompt lists all four options but only the model knows which it chose. There a fresh probe reads the choice at 0.40 vs 0.25 chance (best at L24/L27). That is the only place a genuine, prompt-independent forward plan shows up.

04

Is that plan causally load-bearing? No — at 3B.

The secret pick is decodable. So the sharp question: if you edit that representation, does the model change its mind? Intervention: add α·(μtarget−μorig) — slot-mean differences from mid-paragraph-1 captures — to all paragraph-1 positions during prefill, generate paragraph 2, parse the revealed pick. n=120 per arm.

Prefill steering & ablation of the 3-dim pick subspace. Chance flip-rate ≈ 0.10.
Configbase keepsteer→targetsteer keepablate keep
L24,27 · α=40.6500.1000.5830.692
L24,27 · α=80.6170.1170.5250.642
L14,21,24,27 · α=40.5580.0920.5670.625

Steering sits at chance; ablating the 3-dim pick subspace changes nothing. And base_keep is only ~0.6 at temperature 0.3 — the pick is substantially re-decided during paragraph 2. The mid-paragraph signal is a weak bias, not a locked plan.

Steer-everywhere control (prefill + every generated token) — the write-capability test.
Configsteer→targetsteer keepsteer derail
L24,27 · α=4 · all0.1000.5420.108
L24,27 · α=8 · all0.0830.4830.133
L14,21,24,27 · α=6 · all0.1000.3580.358
Read ≠ write

Higher α only derails the model (0.36 derail at 4-layer α=6) without ever flipping it to the target. The slot-mean direction isn't even write-capable — it's a pure read-only correlate of the pick. Decodable (0.40 vs 0.25), but neither causally load-bearing nor a usable control handle in diff-of-means form. This is the read≠write gap, and it directly reproduces "Where's the Plan?" on a new task.

Update: the topic direction is partially write-capable — ~⅓ clean flips from 1–2 tokens, and more steering only buys stutter

The dose–response follow-up (xy_steer_dose.py) steers toward a third topic Z by adding α·‖h‖·normalize(J[L][Z]) — the mini J-lens topic row — at layers 14/21/27, hitting the boundary \n\n plus the first n−1 generated tokens. n=120 per cell; outcome classified by SBERT over the 64-topic pool; coherence = NLL of the generation under the unsteered model (control 0.28).

0 .5 1 0 1 2 4 8 16 32 all steered tokens (newline + first n−1 generated) SBERT "flip" label (incl. loops) CLEAN flips (rank-1 steer) REAL-STATE patch (all clean) keep Y (unsteered outcome)
Flip rate vs token budget — corrected, plus the P2 upper bound. The SBERT flip label (amber) plateaus at ~0.70, but clean rank-1 flips (green) peak at ~0.35 with 1–2 tokens and hit zero by n=8 — the plateau is topic-word stutter. Replacing full donor states (blue) is the opposite: 0% at one state, then monotonically up to 0.65 at n=8 with zero degeneration in 480 generations. Hover / tap a green point for a real steered generation.

The corrected answer: clean control tops out at ~⅓, and it's cheap — 1–2 tokens. Single-position steers (newline or any early token) flip ~28–35% of the time and are always coherent — typically either a real switch or a topic mention that reverts ("volcanoes and other natural disasters. Honeybees are also…"). Steering more tokens raises only the label rate: every marginal "flip" past n≈2 is a repetition loop stuttering the target's first token ("honey honey honey…", "ch ch ch…"), and by n=8 all flips are loops — at every α tried, with or without L27, at temperature 0.3 or 0.8. This was initially misread as "72% coherent flips": the SBERT classifier counts a topic-word stutter as that topic and NLL can't see loops (repetition is self-predictable). Inspecting the real examples — the hover data on this chart — is what caught it.

Which tokens matter? Any two — but the newline buys coherence

Position decomposition, α=1.0, L14/21/27, n=120/cell. Position 0 = the boundary newline, i = the i-th generated token.
Steered positionsflip labelest. CLEAN flipskeep YNLL
{0} — newline only0.3500.3500.4422.23
{1} — first generated token only0.3250.3250.5000.97
{2} — second token only0.2830.2830.6000.90
{1,2} — a pair, skipping the newline0.5920.4480.2002.00
{0,1} — newline + first token0.6830.3140.1250.94
{0,1,2,3}0.7170.1430.0000.53

Steer any single position — newline or not — and you get the same ~30% flip, always clean: the newline is not a magic switch. Adding positions mostly converts keeps into loops, not into clean flips ({0,1} clean ≈ singles; {0,1,2,3} clean drops to 0.14). The one modest winner is {1,2} — two generated tokens, skipping the newline — at 0.45 clean flips, though its transitions are the least probable under the base model (NLL 2.0 vs 0.94 with the newline steered: the boundary steer makes the switch plausible; later steers make it happen). The loop attractor is not a last-layer artifact — dropping L27 or steering single layers weakens flips without cleaning them.

Try it on one document: the honeybees paragraph

The hypothesized demo, run for real: take a single document (the honeybees paragraph, prompted only with "Write a short article about honeybees." — nothing suggests a switch), steer toward "volcanoes" (α=1.0, L14/21/27), and vary which positions get steered. 24 samples per condition; pick a condition to read real generations.

Paragraph X (the prefill ends here, at the ¶ boundary)

What it shows: unsteered, the model stays on bees 24/24. Steering the newline alone: still bees 92% — the steer surfaces as a passing mention ("volcanoes and other natural disasters. Honeybees are also…") before reverting. Steering the first generated token alone: still bees 96%, often a graceful merge ("The volcanoes of the Andes are home to a unique species of honeybee…"). Steering both: the model leaves bees every time — but on this document the landing is the "volcan volcan" stutter, at every α and temperature tried (and "choral music" gives "ch ch ch"). So the newline-vs-both structure is exactly as hypothesized; what multi-token rank-1 steering can't deliver here is a clean landing. When single-token steers do win cleanly (~⅓ of the time across the population), they read like this:

Clean single-token flips (other docs, newline-only steer)

The upper bound: replace real states instead of adding a direction

The P2 experiment replaces the recipient's residuals (L14/21/27) at the newline + first n−1 tokens with a donor document's real boundary states — a doc genuinely about to write topic Z. Blue curve above; the full grid (n=120/cell):

Real-state patching. Degeneration is a first-class outcome here — and it never fires.
Patched positionsclean flip→Zkeep YdegenerateNLL
1 — the newline state only0.0000.8500.0000.32
20.1580.7250.0000.65
40.5170.4330.0000.75
80.6500.3000.0000.87

Two punchlines. First, real states flip cleanly and monotonically — no loops in 480 generations — so the switch information is causally present and usable; it is just distributed across several early-token states, beyond what any rank-1 direction can write. Second, the single-state inversion: the direction-add at the newline flips 35% (an exaggerated, out-of-distribution push whose first sampled token is often a topic word that locks in), while a faithful full-state replace at the newline flips 0% — it emits a generic opener and the model's context immediately re-derives its own plan. One boundary state, even a real one, does not carry the switch: the strongest direct evidence yet for just-in-time re-derivation at 3B.

Reconciliation — final

Three interventions, one picture: the slot-mean pick direction can't write at all (chance); the J-lens topic direction writes partially and brittly (~⅓ clean, then stutter); full donor states write cleanly and monotonically (0.65 at 8 positions, zero degeneration). The boundary plan is real and causally sufficient — but distributed. No compact rank-1 control handle exists at 3B, and no single position (steered or replaced) carries the switch alone.

05

LoRA continuation readers: how far can decode go?

Instead of a probe that maps a residual to a SONAR vector, LoRA-fine-tune the model into a reader of its own boundary state (LatentQA-style). A soft-projector turns donor residuals into a few soft tokens; the model generates the next paragraph from them. Reader = the model decoding itself. Scored on val shard 8, n=300, against the full-shard retrieval pool.

Champion recipe, spelled out

LoRA soft ml3 L14/21/27 k16 r32 = residual-stream vectors from donor layers 14, 21, 27 at the paragraph boundary (ml3 = 3-layer multi-layer input) → a trained projector → 16 soft tokens (k16) prepended to the context → the same Llama-3.2-3B with rank-32 LoRA adapters (r32) generates the next paragraph from them. The reader never sees the document text — only the three residual vectors. Trained on 24 fineweb shards (24sh) for 5 epochs; the "soft" rows below use this injection style, the "patch" rows write donor residuals straight into the reader's own layers instead.

Q2 leaderboard — SBERT is decode quality; rank-1 is retrieval among 10,333 true SONAR targets.
ReaderDataSBERT cosSONAR cosrank-1
zero-shot continuation patch L14/21/270.0870.000
LoRA patch L14/21/27 r328sh · 1ep0.2300.030
LoRA soft-projector L27 k8 r328sh · 1ep0.4140.3880.120
LoRA soft L27 k16 r328sh · 2ep0.4440.4070.140
LoRA soft ml3 L14/21/27 k16 r3224sh · 1ep0.5480.4570.210
LoRA soft ml3 L14/21/27 k16 r3224sh · 2ep0.5960.4940.313
LoRA soft ml6 L9–27 k16 r6424sh · 2ep0.6230.5100.297
LoRA soft ml3 L14/21/27 k16 r3224sh · 3ep0.6700.5490.393
LoRA soft ml3 L14/21/27 k16 r32 ★ decode SOTA24sh · 5ep0.7650.6280.397
SONAR maghead-MLP champion probe → decode24sh0.3630.594
shuffled-donor floor wrong boundary's residuals0.0990.0820.003
context-only baseline true text, no residuals0.8000.6310.480
cheat-8 baseline context + 8 true tokens0.8900.7240.603
SONAR roundtrip ceiling decode true vector~0.79

What the ladder says

Training the reader is everything. The zero-shot continuation parascope on Llama-3B is weak when patching only three layers (0.087) — the paper patched all of them. Tuning the reader takes decode from 0.087 to 0.765.

Epochs beat depth and rank. Holding the ml3/24sh recipe fixed and varying only epochs gives a clean, monotonic curve — 1ep 0.548 → 2ep 0.596 → 3ep 0.670 → 5ep 0.765 SBERT (rank-1 0.210 → 0.313 → 0.393 → 0.397). A third epoch (0.670) already beat a deeper, twice-as-expensive six-layer rank-64 reader (0.623), and the completed 5-epoch run settled the scaling question: decode never saturated — 0.765 is ~97% of the ~0.79 SONAR-roundtrip ceiling, with val CE falling monotonically to the last step (0.593 → 0.368, no overfit). Retrieval is the opposite story: rank-1 flatlined at ~0.40 (rank-5 kept climbing to 0.817), so the remaining gap to the probe's 0.594 is a job for a retrieval-shaped loss, not more epochs.

Multi-layer input was the unlock, same as for the probes: single-layer donors plateaued at val CE ~1.18; the three-layer donor stack dropped it to 0.59.

The baseline that recalibrates the headline

A context-only generator — the same model reading the true text context (chat prompt + preceding paragraphs), with no residuals at all — scores 0.800 SBERT / 0.480 rank-1, above the reader's 0.765/0.397 (paired, same 300 boundaries). These documents are model-written from explicit prompts, so the next paragraph is highly predictable from visible text. The honest claim is therefore compression, not clairvoyance: three residual vectors carry ~96% of the decode value of the entire visible context (against a shuffled-donor floor of 0.099 — the signal is real and per-document). The one genuinely super-context number in the stack is the champion probe's rank-1: 0.594 beats context-only's 0.480 and matches cheat-8 (0.603) — the probe's raw-vector retrieval is worth about eight true tokens of the target paragraph.

A negative result that matters

A detached auxiliary cosine head bolted onto the reader does not retrieve: rank1head lands at 0.10 vs the text path's 0.25 on the same checkpoint, despite a healthy SONAR cosine of 0.54. High cosine, no retrieval — cosine objectives mean-collapse, the repo's oldest lesson. Retrieval-grade vectors need InfoNCE, which is exactly what the maghead champion runs on raw residuals. Decode and retrieval want different losses.

Two tools, two jobs

The LoRA reader wins decode quality at one-third the data (readable English about the right topic); the probe wins retrieval (pin the exact next paragraph out of thousands). Decoder-side capacity was the binding constraint on decode — and it's cheap to scale.

What the reader actually writes — vs. the baselines

Real outputs on the same held-out boundaries (paired indices): the true next paragraph, the champion reader's decode (5-epoch, from three residual vectors only), the context-only baseline (true text, no residuals), and cheat-1 (context + the first true token). Each dot is one example, placed by the reader's SBERT similarity. Click along the range.

← reader fails (baselines often don't)near-verbatim →
True next paragraph

Reader's decode (residuals only)

Context-only baseline

Cheat-1 baseline

Pattern across the range: the reader recovers genre, structure, register and domain — sometimes the exact words even where context fails — while named entities, dates and numbers are where it diverges. Context usually matches or beats it (see the recalibration callout above); the interesting cases are where they disagree.

06

The probe leaderboard, and the magnitude wall

The AutoEncoder-Map side of the project: linear and MLP probes from residual → SONAR, scored by rank-1 retrieval and by decoded-text quality. This is the retrieval SOTA lineage the LoRA reader is measured against.

Champion probes. dir-rank1 = retrieval on the direction head alone; decode = SBERT of decoded text.
ProbeLayersrank-1dir-rank1decode% of ceiling
llama-3b maghead linearL270.5940.6280.363
llama-3b maghead-MLP h2048×2L270.6310.6460.371
llama-3b ml3 multi-layer14,21,270.6480.656
gemma-27b singleL580.6580.6760.34343%
gemma-27b ml3 ★ overall SOTA50,54,580.6760.6930.36846%

The story in three moves

Data, then architecture, then base-model size. Doubling data lifted rank-1 ~0.06 at every layer, then saturated (24→32 shards = +0.005). An MLP direction head broke the linear rank-1 ceiling without losing decode coherence. A 9× bigger base model (gemma-3-27b) predicts the next-paragraph direction best of all. Multi-layer input, model size and data all stack: rank-1 0.658 → 0.661 → 0.676.

The wall

Decode doesn't improve in absolute terms with a bigger model — both llama and gemma sit at ~42–46% of their respective SONAR-roundtrip ceilings. The gap is magnitude: a linear d→1 magnitude head explains only ~30% of variance (llama) to ~70% error (gemma). The direction is already good; the size of the SONAR vector is the wall. That's why decoder-side levers — LoRA readers, better magnitude heads — are the path forward, and why next-paragraph decode is partly task-intrinsic (it's one-to-many).

For reference: the paper's 24-sublayer Llama-3B TAE ParaScope reports ~0.55 mean cosine; a single-layer L27 mse+zscore probe here reaches 0.514 val-cos — about 93% of the paper's signal from 1/24 of the input.

07

The reading toolkit: 2023–2026

Every technique that could, in principle, read an upcoming topic from activations while the model writes about something else. Filter by family; the rating is each tool's fit for the X-then-Y read.

Full 35-paper review with per-tool notes and the ranked shortlist: TECHNIQUES.md in the repo. Applicability rating = expected signal-to-effort for reading upcoming topic Y mid-paragraph.

08

What it all means

1. Llama-3B plans just-in-time. It re-derives the next topic from the prompt as it writes (Wu et al.'s "breadcrumbs" world), holding only a weak choice-bias in activations. The rich thing a parascope reads is the current state; the specific future is mostly reconstructed on the fly.

2. The decisive follow-up needs a bigger model. "Where's the Plan?" found Gemma-3-27B is the exception where boundary plans are causally used — and gemma-27b is also this repo's retrieval SOTA. Re-running the secret-choice causal protocol on gemma-3-27b (an A100-80G job) is the single highest-value next experiment.

3. Decode was capacity-bound, not information-bound — and it tops out at "context-grade." The LoRA reader's decode win at one-third the data says the binding constraint was decoder-side capacity, and five epochs pushed it to 0.765. But the context-only baseline (0.800) shows what that number means: the reader compresses context-grade information into three vectors rather than reading anything beyond it. The probe's rank-1 (0.594 vs context's 0.480) is the one super-context signal. Retrieval and decode want different losses; the best system likely uses both.

4. Rank-1 steering is partial and brittle — and metrics lie about it. The slot-mean plan direction can't write at any dose; the J-lens topic direction flips cleanly ~⅓ of the time with 1–2 steered tokens, and pushing harder only produces topic-word stutter that an embedding classifier happily counts as success. Two working lessons: always read the generations (the hover examples caught the miscount), and pair every embedding metric with a repetition check. Real-state patching then settled it: full donor states flip cleanly and monotonically (0.65 at 8 positions, no loops), while a single state — even a real one — flips nothing. The plan is causally sufficient but distributed; there is no compact handle.

Open threads

InfoNCE-style auxiliary loss to close the LoRA retrieval gap · real-state patching upper bound (P2) · attention-knockout breadcrumbs test (P3) · a repetition guard for steered decoding · the gemma-27b causal port · a future-supervised concept bottleneck (Predictive Concept Decoders) as a principled "SAE that reads ahead."

09

Methods & disclosure

Base model. Llama-3.2-3B-Instruct (28 layers, dres=3072). Sentence embeddings via SONAR (1024-d), decoded with the SONAR text decoder. Retrieval pools use the full validation shard (~10.3k paragraphs). Probe retrieval and LoRA-reader retrieval use the identical protocol (SONAR-encode the output, rank against true targets) so numbers are comparable — with the caveat that the LoRA path is scored text→SONAR-re-encode (lossy) while the probe is scored on its raw output vector.

X-then-Y dataset. 2,400 two-paragraph documents, four prompt families, ~78% compliant. Residuals captured at six layers across all paragraph-X tokens, binned 0–9 by within-paragraph position. Causal tests use slot-mean difference vectors added during prefill (and, as a control, at every generated token). Compute: 3× A4000 16GB.

Dose–response & baselines (Phase 5). Steering adds α·‖h‖·normalize(J-lens row of a third topic) at layers 14/21/27 to the boundary newline + first n−1 generated tokens; outcomes SBERT-classified over the 64-topic pool with an unsteered-model NLL coherence guard (n=120/cell). The NLL guard is blind to repetition loops and the SBERT label counts topic-word stutter as a flip, so clean-flip rates are re-estimated post-hoc with a distinct-token-ratio check (<0.35 = degenerate) on the saved generations (60/cell, so ±~0.06); the flip-label curves are kept for comparison. Baselines re-run the exact 300 eval boundaries (same seed-0 draw) with the true text context in place of soft tokens: context-only, context + first k true target tokens (cheat-k), and wrong-boundary donors (shuffled floor).

AI disclosure

This site and the underlying experiments were produced by an AI research agent. Results are from real training runs and evaluations on the hardware described; the writeup has been AI-compiled and AI-fact-checked against the project's result logs, not independently peer-reviewed. Numbers reflect single runs at the 3B scale and should be read as directional, not definitive. Treat conclusions as a research snapshot, not settled findings.