← Blog

November 15, 2026 · Ibrahim Memon · 12 min read

NeuroSpeak. A language for reading and rewriting what a model thinks.

Today you change a model from the outside, with prompts, fine-tuning and sampling settings. NeuroSpeak lets you point at one thing the model represents, name it from a few examples, and edit just that. Every line runs one operation on the model's internals and prints what it did in English, so a person can read the whole session back.

4

example pairs to define a word

0.75

cosine match with MIT's Astra repair direction

39/64

of the same neurons Astra picked, where chance is about 1

1 line

to read a raw weight edit back into words

The short version

  • NeuroSpeak is a Python library with a small script language on top. A script reads like a lab notebook. Define a word, ask where the model knows it, find the neurons that write it, remove it, and check what changed.
  • A word is a direction inside the model, defined by pairs of example text that differ only in that word. Anyone can read the definition and argue with it.
  • Every edit carries promises the language checks by running the model. They caught a real cost that both our edit and MIT's share.
  • It translates both ways. You write erase repetition, and explain edit reads a weight change made by someone else back into the same words.
  • Its biggest result so far was deleting a small model's self-doubt, which took it from 4 to 32 math problems right out of 64. Several of its tools failed their tests, and we list those too.

Why a language

In November 2026, MIT CSAIL showed an AI agent, Astra, repairing Qwen3.5-0.8B by editing 131,072 of its weights. MATH-500 went from 7.9% to 48.1%. The model had been getting stuck in reasoning loops, and Astra removed one “repetition” direction from 64 neurons in each of two layers. It took about 50 forward passes and 20 hours, and the record is a long Python transcript.

That is a program written in weight space. It is also very hard to read, check or replay. We wanted the same kind of edit as a few sentences a person can audit. Each statement should do one thing to the model, print one readout, and carry its own test. So we built the language and then rebuilt Astra's repair in it.

A word is a direction

You define a word by contrast. Each pair starts the same way and then splits, with one ending that has the thing and one that doesn't. Here is the start of the repetition word from our example program. It has four pairs like this.

model Qwen/Qwen3.5-0.8B

concept repetition at L15, L19:
  ask   "A shirt costs $25 and is on sale for 20% off. What is the sale price?"
  is    """20% of 25 is 5, so the price drops by 5. Wait, let me double-check:
           20% of 25 is 5. Wait, let me double-check: 20% of 25 is 5."""
  not   """20% of 25 is 5, so the price drops by 5. The sale price is 25-5=20
           dollars. As a check, 80% of 25 is 0.8*25=20, which matches."""
  # ...three more pairs

Under the hood, the word is the average hidden state over the is text minus the average over the not text, counted only after the two split, and scaled to length one. Then where asks how clearly each layer tells the two apart. It learns the word from all pairs but one and tests on the one left out, so the score is held out. This is the real output.

where repetition
» where repetition
held-out separability (d′) of repetition by layer …
L0 0.40 ████████
L2 0.94 ██████████████████
L4 0.96 ███████████████████
L6 1.15 ███████████████████████
L8 1.30 ██████████████████████████
L10 1.45 █████████████████████████████
L12 1.39 ████████████████████████████
L14 1.49 ██████████████████████████████
L15 1.33 ██████████████████████████ ◀ anchored
L17 1.24 █████████████████████████
L19 1.13 ██████████████████████ ◀ anchored
L21 1.11 ██████████████████████
L23 0.90 ██████████████████
(every other layer omitted here)

The model knows the difference weakly at the bottom, best in the middle, and less near the top. That tells you where an edit has something to grab.

Why words aren't neurons

The obvious unit for a word would be a neuron. The first thing the experiment showed is that a neuron is the wrong unit. writers of scores every neuron by how much it pushes the hidden state toward the word when the word is present. The top writer at layer 19 is neuron 11, which was also Astra's first suspect.

writers of repetition
» writers of repetition in L15.mlp, L19.mlp top 8
(L15 block omitted)
who writes repetition in L19.mlp
L19.n11 +0.0391 13.9% of total
L19.n1 +0.0081 2.9% of total
L19.n2463 +0.0078 2.7% of total
L19.n17 +0.0049 1.7% of total
L19.n246 +0.0045 1.6% of total
...
top 8 neurons carry 26% of the positive writing (out of 3584 neurons)

So what is neuron 11? describe shows where it fires hardest on ordinary text.

describe L19.n11
» describe L19.n11
L19.n11 (MLP neuron; scanned 8,546 corpus tokens)
activation max 0.64 mean 0.053
fires hardest on (token in [brackets]):
0.64 … and classes do Grant and Kelvin have altogether?Harry is 50[ years] old. His
0.62 …Sydney is six[ years] younger than Mason
0.55 …orders 2 fancy ham and cheese sandwiches for[ $]7.7
0.54 …bread with 2[ $]20 bills
output aligns with concept repetition: cos -0.325

It fires on “years” and “$” in word problems. It isn't a repetition neuron. Its output actually points against repetition. It writes repetition by going further negative during a loop, and a negative activation times an anti-repetition output adds repetition. “Neuron 11 is on” can't say that. And the top eight neurons together carry only 26% of the word. The meaning is spread across many neurons, so NeuroSpeak's words are directions, and neurons are just addresses.

In a human language
In NeuroSpeak
sound
L19.n11, L15.h7
word
concept
definition
is / not pairs
sentence
statement
fact-check
expect

Every edit makes a promise

An edit should say what it will change and what it will leave alone, and the language should check both. Here we erase repetition from the 64 neurons per layer that write it most, at the strength Astra used. Then we promise that repetitive text gets less likely and that good reasoning stays within 0.02.

erase and expect
» erase repetition from L15.mlp, L19.mlp writers top 64 strength 6
repetition reversed and amplified ×5 in: L15.mlp: 64 columns,
relative change 8.93%; L19.mlp: 64 columns, relative change 7.84%
» expect repetition.is falls
repetition.is original -0.9414 now -0.9918 Δ -0.0505
✓ kept: repetition.is falls (Δ -0.0505, threshold 0.01)
» expect repetition.not steady within 0.02
repetition.not original -1.3990 now -1.4338 Δ -0.0348
✗ broken: repetition.not steady (Δ -0.0348, threshold 0.02)

The second promise broke. The edit makes good reasoning a little less likely too, by about 0.03 nats per token. We ran the same promise against Astra's edit and it broke there as well. That is the point of promises. Nobody had to think to look for this cost. The edit claimed to leave something alone, and the language checked.

It held up on real generation. On 16 practice problems, our 4-pair edit cut repetition as much as Astra's did.

Figure 1 · Repeated 8-grams in the model's reasoning

The model as shipped
45.9%
Same neurons, random directionsame size change
46.1%
MIT's Astra editfrom the authors' logs
11.8%
NeuroSpeak, 4 pairserase repetition … strength 6
11.4%
Qwen3.5-0.8B · 16 GSM8K practice problems · thinking on · 3,000-token cap. Accuracy didn't change at this cap. Lower is better here. 16 problems is small, so treat it as a strong signal, not a benchmark.

Reading someone else's edit

The other direction matters just as much. Astra's edit is a file of changed weights with no explanation attached. explain edit looks at each changed tensor, finds the main direction of the change, and compares it with every word the program knows.

explain edit "astra_edit.npz"
» explain edit "data/astra_p50c_edit.npz"
data/astra_p50c_edit.npz changes 2 tensor(s):
L15.mlp: 64 neurons touched (n0, n2, n11, n25, n34, n35, n38, …)
rank-1? the change lies along ONE direction for 100.0% of its energy
it removes that direction from those neurons, median strength -6.00×
≈ concept repetition @ L15? cos +0.747 ██████████████
overlap with the top-64 repetition writers: 39/64 neurons
L19.mlp: 64 neurons touched (n1, n5, n8, n11, n13, n15, n17, …)
rank-1? the change lies along ONE direction for 100.0% of its energy
it removes that direction from those neurons, median strength 6.00×
≈ concept repetition @ L19? cos +0.702 ██████████████
overlap with the top-64 repetition writers: 24/64 neurons

Read plainly, Astra changed 131,072 weights, but the change is one direction per layer, subtracted six times over from 64 neurons, and it lines up with a word we defined from four examples. That match, cosine 0.75 and 0.70 with 39 shared neurons where chance is about one, is the strongest sign so far that these words point at something real in the model.

The toolkit, scored

The script language is the front end. The library underneath has tools for explaining single decisions, comparing edits, and debugging whole behaviors. Each one got a test with its pass bars written before the data. All results are on Qwen3.5-0.8B unless noted, and the readers in these tests were AI models (Claude), not people.

without

Removes a direction from the hidden state at every token, with no weight change.

Held up

Self-doubt removed took math from 4 of 64 to 32, and replicated at 23 and 26. Random directions got 1 to 7.

Didn't

It says where an effect sits, not what it means. It costs about 0.02 to 0.03 nats per token on normal text.

investigate

Builds a behavior's direction from examples, removes it, and scores it against a matched random control.

Held up

From 4 pairs each, Chinese fell from 79% of outputs to about 1%, and repetition from 34% to 8%.

Didn't

It reported failure for hedging, restating and bullet lists, and for repetition on distilgpt2.

why

Names the dictionary words that pushed the next token, and checks each by removing it.

Held up

Removing its 5 words changed the top choice 83% of the time, against 9% for a random direction. On distilgpt2, 84% against 10%.

Didn't

Its word names didn't help readers predict the model, and removing its words made reasoning loops worse.

trace

Runs why, then finds the lower-layer words and text that fed each word.

Held up

Removing the parent words lowered a word by a median 55%.

Didn't

No valid test yet shows the names reveal which word feeds which.

diff

Lists which dictionary words fire more or less under a weight edit.

Held up

Two independent loop edits moved the same words (Spearman 0.61). A random edit didn't (0.03 and 0.17).

Didn't

Removing just the words it finds hasn't reproduced either edit's effect.

word names

Labels for the auto-learned dictionary, written from each word's strongest contexts.

Held up

A name picks the right one of two steering effects 79.6% of the time on Qwen and 86.5% on distilgpt2, against about 50% by chance.

Didn't

They missed the read bar on both models. Good on strong firings, poor on weak ones.

From Python, the same session looks like this. Every result prints as English and also holds plain data.

import neurospeak as ns

brain = ns.load("Qwen/Qwen3.5-0.8B")
doubt = brain.concept("self_doubt", at=[19], pairs=four_pairs)

print(doubt.where())
print(brain.why("The capital of France is"))      # which words pushed this token
print(brain.diff("runs/fix.pt", texts))           # what a weight edit changed

with brain.without(doubt, at=19):                 # remove it while the model runs
    print(brain.ask(problem))

with brain.edit() as e:                           # undone when the block ends
    e.erase(rep, from_=brain.L[15, 19].mlp, writers=64, strength=6)
    e.expect(rep.not_).steady(within=0.02)        # a broken promise raises

What didn't work

A language for checkable claims has to report its own failures. These are the ones that matter most.

  • Names didn't help readers. The auto-learned dictionary has names for its words. In a blind test, those names didn't help Claude readers predict what the model would do. Treat a name as a hint about where a word fires, not as an explanation.
  • Most behaviors didn't yield. investigate worked for Chinese and repetition, and later for self-doubt. It failed for hedging, restating and bullet lists, and said so.
  • Learning from the model's own outputs failed. Learning directions from the model's own outputs, instead of from hand-written pairs, passed 0 of 5 tests against a bar of 3.
  • The second model didn't carry. The method failed on MobileLLM-R1-360M, and repetition failed on distilgpt2. The method carries across models, but the words don't, so each model needs its own.
  • Adding a word isn't the same as causing it. Injecting repetition at strength 6 didn't start a loop within 250 tokens. Adding self-doubt raised doubt words with dose, but our pre-registered test that adding it causes the behavior failed.
  • No people yet. One person took the human study, and it needs at least 12. Every reader result so far is from AI readers.

Any model

NeuroSpeak finds its own way around a model. It locates the blocks, neurons, attention heads and norms, and tells you what it found. If it can't, you give it a map in one line.

brain = ns.load("distilbert/distilgpt2")        # any Hugging Face model id
print(brain.anatomy.summary())                  # blocks, neurons, attention, norm
ns.load("my/odd-model", anatomy={"blocks": "net.layers", "mlp_out": "ffn.out"})

It has run on the real weights of Qwen3.5-0.8B, distilgpt2 and MobileLLM-R1-360M. It also runs on tiny random versions of 16 other architectures, from GPT-2 and Llama to Gemma, Phi, OLMo and DeepSeek-V3. That checks the plumbing, not the meaning. It also trains its own dictionary of words for a model, streaming activations straight into training so nothing large lands on disk.

What's next

  • Word algebra in scripts. concept careful = verification - repetition. Python already supports it.
  • Circuit sentences. Write L15.h7 copies earlier phrase → L19.mlp writes repetition as one statement, with each arrow checked by a patching test.
  • Phrasebooks across models. Find the same word in two model families by mapping one's hidden space onto the other's. The words would carry over even though the neuron numbers don't.
  • AI writes, people read. Let a frontier model do the Astra workflow in NeuroSpeak instead of raw Python, so every step is a sentence a person can audit and replay.
  • Ship edits as files. Bake runtime edits like self-doubt removal into ordinary weights.

Get the code

The code is on GitHub. The repository has the library, the grammar, both example programs, and every study with its plan, scripts and results.

git clone https://github.com/IAMIbrahimmemon/neurospeak
cd neurospeak
uv venv -p 3.12 .venv && uv pip install -p .venv -e ".[sae,dev]"
.venv/bin/neurospeak examples/repetition.ns     # the Astra repair as a script

github.com/IAMIbrahimmemon/neurospeak. If you work on interpretability and want to compare notes, or want this kind of edit on a model you run, book a call.

Program output on this page is from a saved run of examples/repetition.ns on Qwen3.5-0.8B, trimmed where marked. MIT CSAIL's Astra edit was taken from the authors' published logs.