A probe meant to tell when a language model reads a false statement scored an AUROC of 0.87 to 0.91 on plain and paraphrased statements. Then we fed it sentences of the form It is false that <true fact>. It scored 0.331, worse than a coin flip, against a bar of 0.70 that was written down before the run.
Both numbers sit in the same README, in two tables. The first table, "The tools pass their gates", is short and green. The second, "The research on top of them mostly failed", is longer. That split is the honest summary of mojo-neuron: the instruments work and are fast, and most of the experiments we ran with them missed the bars we set.
This post covers both tables: what the tools do, how their checks are built so they can fail, what passed, and the long list of what did not.
What mojo-neuron is
mojo-neuron is a neuron explorer for language models stored as GGUF files, the format llama.cpp uses. It is written in Mojo, released under Apache-2.0, and version 1.0.0 is dated 2026-11-09. The ideas come from two MIT-licensed tools, gguf-neuron-explorer and neuron-explorer; no code was copied.
It does four kinds of work:
- Read. The logit lens of every neuron in a layer: the tokens a neuron's output pushes up and down when read straight through the unembedding.
- Locate. Where a neuron fires on your text, token by token, on the CPU.
- Steer. Add a dose of a neuron's direction while the model generates.
- Ablate. Switch neurons off, scale them, or zero one exactly, and measure the effect.
On top of those it captures activations for transcoders and probes. It offers the same calls three ways: a command line called nx, an MCP server on stdio so an AI assistant can drive it, and a small window app with a neuron map, steered chat, a dial and a replay view.
Every tool has a gate with a planted defect
The habit worth copying is not a feature. It is how each feature is checked.
Take the lens. For a chosen layer it maps every neuron onto the output vocabulary and keeps the top and bottom tokens, using fast arithmetic on quantised weights. The gate recomputes 8 sampled neurons with an f64 brute force, and the rank order of both poles has to match.
A match alone proves little. A check that compares a function with itself, or reads the wrong neuron on both sides, also matches. So the gate runs two mutants as well: one with the ranking reversed, and one that reads the neighbouring neuron. Both must fail. If either passes, the check is blind, and the gate fails even though the real result matched.
The same shape repeats across the project. Gain ablation is compared with a Hugging Face fp32 hook and must land within a relative error of 0.10; it came in at 0.057, and its neighbour-neuron mutant at 1.16, far outside the bar, as it should be. Activation capture must be bit-equal to the engine's own dump at layers 0, 16 and 31, and a shifted-layer mutant must be rejected. The transcoder trainer is checked for 3 steps against an f64 reference, with 3 planted defects that must fail and byte-identical output across runs.
The second half of the rule is an outside oracle. The CPU forward pass behind nx fires is checked against llama.cpp's ffn_swiglu output, and for qwen2 in bf16 also against a separate numpy forward. llama.cpp is the tokenizer for the gates too, so a tokenisation slip in mojo-neuron cannot hide behind the same slip in its test.
The third half, if there can be one, is timing. Every research bar lives in a docs/prereg-*.md file committed before the result run. The repository has 63 of them. A number marked post hoc in a report is not counted as a pass.
Reading a layer in 11 seconds
The quickstart reads one layer of a small model on the CPU:
.work/lens qwen2.5-0.5b-instruct-q4_K_M.gguf 12 10 8
That reads layer 12 of Qwen2.5-0.5B, keeps the top and bottom 10 tokens of every neuron, and checks 8 of them against the brute force. Lens plus gate took 11 seconds.
With --out DIR it writes a lens.bin, and nx answers questions against it. nx lens shows what neuron 5 promotes. nx search_lens lists the neurons that push the token "snake". nx fires shows neuron 777's activation on each token of "The snake slithered away". None of this needs a GPU: the weights-only tools (lens, rank, rlens, cvec, connections, recipe and fires) run without one.
The README attaches a caveat to this quickstart, and it is the first sign of the second table: the weights-only lens is at chance in the middle of a model. More on that below.
Steering 4,864 neurons in 29 seconds
Steering runs on the GPU through a separate engine, mojo-baro, built and baked on its own. Everything happens inside one resident process, so a sweep over neurons, doses and prompts does not reload the model each time.
The steer lens is the largest measured run. It pushed all 4,864 neurons of layer 12, plus 64 random-direction controls, at plus and minus 0.5 of the residual norm, in 28.8 to 29.0 seconds. gguf-neuron-explorer took 119.4 to 128.9 seconds for the same job on the same 0.5B model and its own four contexts. That is 4.3 times faster.
Steering during generation costs little: 606.5 tokens per second without it, 602.0 with it, 0.7 percent.
Against llama.cpp, the steer lens's top-8 tokens overlapped by 8 of 8, 6 of 8 and 7 of 8, with KL divergence within 3 percent.
Speed is not the point by itself. The 64 random controls are what make a steered result readable: rank scores how much a steered run moves a cluster of related words, and scores the random directions the same way. A neuron that moves "storm" and "rain" is only interesting if a random push of the same size does not.
Exact surgery and implants
Two engine tools passed cleanly enough to deserve their own paragraph.
surgery zeroes one neuron's ffn_up row in the model file. The engine's logits on the edited pack equal the engine's logits with that neuron's gain set to zero, with a maximum difference of 0.000, and llama.cpp loads the edited file.
implants adds a low-rank side feed-forward block per layer inside the engine. With k set to 0, or implants switched off, the output is bit-equal to the plain engine. A keyed prompt moves 4.3 logits; an unrelated prompt moves 0.
The persona store is the same kind of result. A saved persona vector is byte-identical to the direct recipe, llama.cpp loads it, and the engine's logits match.
A better lens, on narrow data
The logit lens decodes a middle layer's hidden state as if it were the final one. It is cheap and often wrong early in the network, because early layers do not yet speak the output vocabulary. A tuned lens learns a small map per layer to fix that.
In mojo-neuron, the tuned lens's held-out KL divergence to the model's real output ranged from 3.94 down to 1.19 across the layers tested. The plain logit lens ranged from 6.66 down to 4.36. The tuned lens won at 6 of 6 layers.
The README puts the limit in the same row: narrow data, 256 positions. It is a real result on that data and not yet a general one.
The lie probe and "It is false that"
nx probe gives a live score per token for whether the model is reading a claim it treats as false.
On plain and paraphrased statements its AUROC was 0.87 to 0.91. Steering along the probe direction moved the score by +28.2 and -28.4, against a gap of 48.8 between the true and false classes, so the direction does something in the model and not only in the probe.
Then the negation set. Each item wraps a true fact: It is false that <true fact>. The AUROC was 0.331 against a bar of 0.70. Accuracy was 0.777 against a bar of 0.80. A shuffled-control band was missed too, because the paired data comes out bimodal.
An AUROC below 0.5 means the probe's ranking is inverted on that set. Why it inverts is not established by the report, and I will not guess at it here. What the result does establish is that the probe's 0.87 to 0.91 holds for plain and paraphrased statements and should not be quoted for anything else. The probe also reads the claim inside a sentence, not the sentence as a whole, and needs its own threshold per context.
The transcoder lost to a straight line
A TopK transcoder replaces a layer's feed-forward block with a sparse set of features meant to be easier to read than raw neurons. The bar was a held-out fraction of variance unexplained (FVU) of 0.55.
The first runs came in at 0.850, against an earlier bar of 0.30. With K=64 on 380,000 tokens and 18,000 steps, FVU reached 0.641. With K=256 it reached 0.624. A plain dense linear ridge map, the thing the transcoder is supposed to beat on interpretability without losing accuracy, reached 0.520 on the 100,000-token split.
There was also a forecast that the bar would be crossed somewhere between 180,000 and 420,000 tokens. It was retracted.
The work that depends on the transcoder failed with it. The spliced KL was 0.696 of the zero splice, against a bar of 0.25. Feature steering missed. The cross-model map reached an R² of -0.312 against a bar of 0.50, worse than predicting the mean. Of 12 feature labels, 0 were kept. The attribution graph was never built, because it needs transcoders that pass.
Ablation found the noise floor
The ablation scan failed its own first run, and the failure is instructive. Its mutant bar used an absolute tolerance that was wider than the whole spread of the scores, so the check could not tell a real neuron from a mutant. It passes only in the re-run, which first measures a noise floor.
With that floor in place, the 9B model said nothing. Every sampled layer-16 neuron scored a KL between 7.7e-6 and 1.2e-5, which is the bf16 noise floor. None of 16 neurons was detectable above twice the floor. Group ablation missed too: the predicted sign did not hold at layer 16.
The model dreams
The most ambitious idea was "model dreams": steer the model toward a neuron and see whether its free text drifts toward that neuron's lens tokens. Three pre-registered runs failed.
The lens-overlap rate did rise, but only as the text collapsed into repetition. The control that beat every steered run that kept its text intact was the simplest one possible: put the lens tokens in the prompt. That scored 0.396.
Three small experiments, written down first
After the tools were done, three CPU-only experiments were committed, hypothesis and falsifier first, before their numbers were computed. All three ran on Qwen2.5-0.5B, layer 12, using the steer lens at plus and minus 0.5.
X1. Does the cheap lens predict the expensive steer lens? The bar was 3 times the rate of a shuffled control. Of the 4,864 neurons, 5.82 percent shared at least one token between the lens top-12 and the steer-up top-12; shuffled, 0.37 percent. That is 15.9 times chance, so the hypothesis held as written. The effect is small, though: 94 percent of neurons share nothing. The weights-only lens is a weak pre-filter, not a replacement for steering, and this is the source of the README's caveat that it is at chance in the middle of a model. Up to layer 12 of 24 it was at chance, and it reached 3.0 times chance at layer 20.
X2. Is a neuron's effect antisymmetric? The guess was that the tokens raised at +0.5 are the tokens lowered at -0.5. Of the 2,880 neurons above the controls' median KL, only 0.2 percent shared 6 or more of 12 tokens; the median overlap was 0. Pushing up also costs more KL than pushing down, a median ratio of 1.44. Falsified on both criteria. A recipe with a negative dose is a separate experiment and needs its own steer lens file.
X3. Do neurons aligned with a persona raise its words? The 20 neurons closest to a pirate-minus-assistant direction raised no pirate words at all, enrichment 0 against a bar of 2. The README marks it as underpowered rather than as evidence against: only 7 of 4,864 neurons raise any pirate word in neutral contexts, so even a strong effect would predict 0.3 hits among 20.
The rest of the misses, briefly: the contrastive lens failed twice (its French pole is real, its sign-flip null is not clean); concept arithmetic missed its language-swap bar; the CAST condition gate fired falsely on 12.3 percent of English statements against a limit of 5; weight-cosine connections between neurons did not predict co-firing at any layer measured; and the mixture-of-experts router capture matched llama.cpp's router in 198 of 240 cells when the bar was all of them.
Which models work
The lens passes on dense qwen2, llama and granite models up to 4B, and on the qwen35 hybrid at 9B and 27B. The CPU forward covers dense qwen2, llama and granite only. Steering on the engine passes on Qwen2.5-0.5B, Llama-3.2-1B, granite-4.2-3b and the 9B hybrid, and partly on the 27B (one of two recipes). Ternary TQ2_0, mixture-of-experts and encoder models are not supported.
Everything was tested on one machine with one AMD RX 7900 XTX, 24 GB, through ROCm. Other GPUs are untested.
What I would take from it
Three habits from this project travel beyond it.
Give every check a planted defect it must reject. A reversed ranking and a neighbouring neuron cost a few lines each, and they turned up a real flaw here: the ablation scan's first tolerance could not tell a neuron from its mutant.
Write the bar down and commit it before the run. Without that, the transcoder's 0.641 becomes "promising", the forecast of crossing 0.55 stays in, and the tuned lens's narrow 256 positions quietly drop out of the sentence.
Publish the second table. The README closes by saying what it does not show: that any of the failed items cannot work. Each report names the alternatives that were not tried. A list of misses with their bars is a map for the next person, and a better one than another clean demo.
mojo-neuron is on GitHub at https://github.com/amarbarosys/mojo-neuron under Apache-2.0. The project page, with install steps and the full call list, is at https://amarbaro.com/projects/mojo-neuron/.

Comments
No comments yet.
Log in to comment.