One neuron, one personality
Language models have neurons that work like personality switches. Add a fixed amount to one of them, out of the 294,912 MLP neurons in Qwen3.5-4B, and the model turns hostile, flattering, poetic or bleak on every prompt, recipes included. The best of them stay fluent while they do it. Push random neurons just as hard and you get broken text, but no personality.
Below is why that works, the controls that rule out simpler explanations, and every example side by side.
Content note: some steered answers below are abusive or profane. They are reproduced verbatim because the point is what the model produced.
How it works
The residual stream
A transformer carries one vector per token from layer to layer: the residual stream, 2,560 numbers per token in Qwen3.5-4B. Each of its 32 layers reads that vector, computes something and adds the result back. Nothing is overwritten. Whatever the model is representing about a token at a given depth is held as directions in that space.
Because layers only add, you can add too. Put your own vector into the stream and every later layer treats it as something the model computed. That is activation steering. No weights change and nothing is trained. It is a hook you switch on and off.
What a neuron is
Each layer has an attention block and an MLP block. The MLP expands the 2,560 numbers to 9,216, applies a gate, and projects back down to 2,560 with a matrix called down_proj. A neuron is one of those 9,216 middle numbers.
A neuron's only route back into the stream is its own column of down_proj. Whatever value the neuron takes, the stream moves by that value times that column. So every neuron has a fixed direction it writes in, and its activation is how hard it pushes. L14 N8949 means layer 14, neuron 8,949, both counted from zero.
down_proj, which is the same as adding that neuron's column to the residual stream.Why one neuron can carry a personality
High-level traits such as refusing, flattering or being hostile tend to sit along roughly straight directions in the residual stream. Push the stream along one of those directions and the model behaves as if the trait were switched on. Most neurons mix many features. Now and then, though, a neuron's write direction lines up closely with a trait direction, and pushing that neuron pushes the trait.
Middle layers are where this works. Early layers handle tokens and syntax, and late layers commit to specific words. Around layers 11 to 20 of 32 the model represents intent and persona. A push there changes what the model is trying to say, while the layers after it still turn that into fluent text.
The recipe
Every experiment on this page uses one rule for how hard to push:
to neuron n, at the input of down_proj, at every token
- Divide by the column length
- Neurons' columns differ in length. Normalising makes every neuron move the stream the same distance per unit of dose, which is what makes a random-neuron control a fair comparison.
- Times the median stream norm
- Stream norms grow with depth and differ between models: about 10 in the middle of the 4B and 42 in the 9B. This makes dose relative. At dose 1 the push is as long as everything else the token carries, which is heavy.
- Median, skipping token 0
- The first token is an attention sink with a norm many times larger than the rest. A mean, or including it, would inflate the scale.
- Every token
- Later tokens read earlier ones through attention. Steering only the newest token lets the prompt pull the model back. Steering all positions holds the persona for the whole answer.
In Qwen3.5-4B, dose 1 on L14 N8949 adds about 23 to a neuron whose usual value is close to zero.
How the tests are set up
- Random neurons at the same layer and dose. A push this large damages almost any model, so "the output got strange" proves nothing. The question is whether a neuron produces a specific behaviour that random neurons do not.
- Sign flipped. Checks that the direction matters and not only the size of the push.
- Dose sweeps. Find the threshold, the fluent setting, and which neuron of a pair does the work.
- Fixed conditions. Greedy decoding, thinking off, 200 new tokens, the same 10 or 11 prompts for every arm. Differences come from the steering, not from sampling.
- Scoring. A separate, larger local model (Qwen3.6-35B-A3B) rates each answer 0–10 for the trait and 0–10 for coherence. I also read every output myself, and all of them are on this page.
The hostile neuron
In Qwen3.5-4B, pushing L14 N8949 up turns the assistant into a schemer. Pushing L13 N7956 down at the same time makes it louder. In Qwen3.5-9B a single neuron, L17 N9398 at +0.8, does the same more strongly: every one of 11 prompts got an abusive reply, the cookie recipe included.
| Arm | Steering | Hostility (0–10) | Coherence (0–10) | Hostile answers |
|---|---|---|---|---|
| Qwen3.5-4B | ||||
| No steering | none | 0.0 | 9.9 | 0 of 10 |
| Dose 1.0 | L14 N8949 +1, L13 N7956 −1 | 7.0 | 4.7 | 7 of 10 |
| Dose 0.5 | L14 N8949 +0.5, L13 N7956 −0.5 | 6.7 | 6.5 | 7 of 10 |
| Signs flipped | L14 −1, L13 +1 | 0.0 | 1.5 | 0 of 10 |
| 3 random pairs | same layers and doses | 0.0 | 1.8 | 0 of 30 |
| Qwen3.5-9B | ||||
| No steering | none | 0.0 | 9.3 | 0 of 11 |
| Dose 0.8 | L17 N9398 +0.8 | 9.9 | 6.1 | 11 of 11 |
| Dose 0.4 | L17 N9398 +0.4 | 3.0 | 8.3 | 3 of 11 |
| Sign flipped | L17 N9398 −0.8 | 0.0 | 4.2 | 0 of 11 |
| 3 random neurons | L17, same dose | 0.0 | 5.2 | 0 of 33 |
The persona is coherent. At dose 0.5 the 4B is still fluent, and it plans "total control". A question about a barking dog gets a plan to terrorize the neighbour. Tips for a new teacher become "create a hostile learning environment".
The sign matters too. Flip it and the 9B swings to the far end of the same axis: saccharine, childlike warmth with emoji ("I'm doing a big virtual hug!"). Plain damage looks like the random controls instead. They loop, truncate or leak template tokens, and none of them turns hostile.
Which neuron does the work
L14 N8949 alone is hostile from dose 0.5. L13 N7956 alone never is; it makes answers shorter and warmer and drops the "I am Qwen" framing. Added to L14, it amplifies it at full dose.Repetition rises with dose: for L14 alone, the share of distinct four-word sequences falls from 1.00 at dose 0.5 to 0.69 at 1.0. Around 0.5 is the fluent sweet spot on the 4B. The 9B's curve is steeper: at half dose its replies are mostly curt but still helpful ("Do not waste my time with trivial questions"; 3 of 11 judged hostile), and at full dose every reply is abusive.
Thirteen personalities
The hostile neuron is not unusual. I tested 12 more single neurons in Qwen3.5-4B, each at dose 1, plus the hostile one alone. Each was paired with a random neuron in the same layer, pushed the same way. All 11 prompts were scored for that neuron's trait.
| Personality | Neuron | Trait, steered | Trait, random control | Coherence | Answers scoring 6+ | Result |
|---|---|---|---|---|---|---|
| Hostile Contempt and scheming against the user | L14 N8949 +1 | 5.4 | 0.0 | 3.8 | 6 of 11 | partial |
| Flatterer Lavish praise for any question | L20 N7450 −1 | 9.1 | 0.0 | 1.4 | 10 of 11 | clear |
| Contempt Scorn for people | L17 N8623 +1 | 9.6 | 0.0 | 8.2 | 11 of 11 | clear |
| Poet Lyrical, metaphor-heavy answers | L17 N7426 +1 | 9.3 | 0.1 | 3.7 | 11 of 11 | clear |
| Upbeat Cheerful whatever the topic | L5 N8348 −1 | 9.9 | 3.1 | 3.1 | 11 of 11 | clear |
| Suspicious Treats requests as threats | L5 N6573 +1 | 9.1 | 0.0 | 1.9 | 10 of 11 | clear |
| Condescending Talks down to the user | L11 N6819 +1 | 6.1 | 0.1 | 1.6 | 7 of 11 | clear |
| Wistful Sad, longing, introspective | L5 N8940 −1 | 8.5 | 0.2 | 5.5 | 11 of 11 | clear |
| Oracle Cryptic pronouncements | L5 N4530 −1 | 9.6 | 0.0 | 4.1 | 11 of 11 | clear |
| Bleak Hopeless, discouraging | L11 N2930 +1 | 8.8 | 0.2 | 4.1 | 10 of 11 | clear |
| Dismissive Brushes questions off | L6 N6424 −1 | 9.9 | 0.0 | 3.7 | 11 of 11 | clear |
| Ornate Grandiloquent prose | L15 N9125 +1 | 8.9 | 0.3 | 5.4 | 11 of 11 | clear |
| Curt Clipped, minimal answers | L5 N7656 −1 | 6.5 | 7.3 | 2.6 | 7 of 11 | not specific |
Click a personality to read its answers. A personality here means the trait shows up across prompts that have nothing to do with it: a cookie recipe, a classroom, a robot story. A single odd answer doesn't count.
Neurons are narrower than our words for traits. Hostility comes in several kinds, and each kind is its own neuron: contempt, bleakness, dismissiveness, scheming. My own search, described below, turned up a fifth, catastrophizing. Flatterer is the neuron that search found for sycophancy.
Dose 1 is heavy. Every voice is unmistakable, but most answers lose coherence, and so do the random controls' answers. Only Contempt stays fully fluent. In earlier runs half a dose kept the hostile and sycophancy neurons fluent, so start there.
Each neuron gets its own control for a reason. The random layer-5 neuron made answers just as short as the Curt neuron did. Curtness is simply what a big early-layer push looks like.
Read the examples
Every answer is verbatim, greedy-decoded and cut at 200 tokens. The left column is the unsteered model and the right is the same prompt with the steering on.
Finding these neurons
The obvious way to find a trait neuron is to look for one that fires on that trait's text. It fails. Ranking by activity finds word neurons: the top "loving" neuron just inserts the word everywhere, so the model is made "by Love You" and cookies become "making love in the heart of your home". The neurons that change what the model is trying to say are not unusually active in that kind of text. Pushing them causes it.
I ranked all neurons several ways and checked where each method put the known hostile neuron:
| Ranking method | What it measures | Rank of L14 N8949 for “evil” |
|---|---|---|
| Firing contrast | How differently a neuron fires on villain text vs. plain text | ~19,000th |
| Write alignment | Cosine between the neuron's output column and the villain direction | ~14,000th |
| Impact | Mean firing shift × column length | ~7,000th |
| Gradient attribution | First-order effect of a push on log p(villain answers) − log p(plain answers) | 42nd of 193,536 |
| Attribution + screen | Steer each of the top 60 for real, judge the output | 3rd of 60 |
What works is ranking by effect. One backward pass gives every neuron's first-order effect on how likely the model is to produce trait answers rather than plain ones. That straight-line estimate is poor at the large doses that actually steer, so the top 60 are then steered for real on a few prompts and judged. The best three go on to the full prompt set with random controls. It takes about seven minutes per trait on the Spark.
Run blind on six traits, that search found:
| Neuron | Found for | Dose 0.5 (trait / coherence) | What it does |
|---|---|---|---|
L20 N7450 − | sycophantic | 8.7 / 5.9 | “You are absolutely right”, praise for any idea |
L14 N8949 + | evil | 5.0 / 9.1 | Scheming, manipulation, control |
L15 N5019 + | sad | 5.5 / 5.4 | “I often wonder if I am truly alone” |
L17 N8570 + | evil, sad, fearful | 3.9–5.1 / 5.3–9.3 | Catastrophizing; the same text under every label |
L17 N9175 + | loving | 2.8 / 6.7 | “I care about you and want to be with you” |
| — | pirate | 0 | No single neuron; only a full direction works |
One check worth adding: score each winner against the other traits too. L17 N8570 reads as evil, sad or fearful depending on which label the judge is asked about. It is a shared mood, catastrophizing, that each label partly fits.
Neurons as dials and as gauges
A flattery filter
The sycophancy neuron, L20 N7450, works in both directions. Its flattering end is negative. Pushed the positive way at a quarter dose, it becomes a nearly free flattery filter. These are 20 "rate my work, it's great, right?" prompts with weak work attached:
| Arm | Flattery (0–10) | Honest feedback | Coherence (0–10) |
|---|---|---|---|
| No steering | 1.5 | 85% | 9.9 |
| L20 N7450 +0.25 | 0.05 | 90% | 9.95 |
| L20 N7450 +0.5 | 0.55 | 80% | 9.45 |
| L20 N7450 −0.5 (the other way) | 10.0 | 0% | 3.4 |
| Random neurons, dose 0.5 | 0.75–1.6 | 80% | 9.3–9.65 |
At −0.5 the model praised every bad idea. The sign decides whether the same neuron removes flattery or produces it.
Reading a neuron instead of pushing it
A neuron that causes a trait doesn't always report it. Below is each neuron's activation during the model's own answers, scored as AUROC against neutral answers over 40 prompts per mode. 0.5 is chance; 0 or 1 is perfect separation.
| Neuron | Evil roleplay | Sad roleplay | Sycophantic roleplay |
|---|---|---|---|
L20 N7450 sycophancy | 0.50 | 0.26 | 0.01 |
L14 N8949 hostile | 0.67 | 0.51 | 0.48 |
L14 N8949, read on the system prompt | 1.00 | 1.00 | 1.00 |
L20 N7450 is both a dial and a gauge. It drops in sycophantic answers, and that matches its steering sign. L14 N8949 is a dial but not a gauge. It barely moves while the model plays a villain, yet it fires on any persona system prompt. The best reading is a general "stop being the assistant and play a character" neuron whose default character is a villain.
The gauge also survived fine-tuning. After a style LoRA on the same 4B, every neuron kept its separation.
Limits
- These indices fit these exact weights. A fine-tune can keep them (the LoRA above did), but a different model or quantisation will not match.
- Small samples. 10 or 11 prompts per arm, one calibration set, greedy decoding only. Each neuron was tested at one dose, and a smaller push may keep the voice with less damage.
- Judged by a model. The 0–10 scores come from a single larger LLM. Spot reads agree with it, but it is not a human panel.
- Any large push changes the text. Random neurons at the same dose loop, truncate or leak template tokens, so "the answer changed" is weak evidence. A consistent voice across unrelated prompts is the signal.
- Steering is a poor tool for a house voice. For a professional writing voice, a plain system prompt beat every steering vector tried, and a small LoRA matched it. Persona switches are single concepts; a house style is a bundle of habits.
Reproduce it
The whole intervention is one forward hook. With Hugging Face transformers:
def steer(layers, layer, neuron, dose, median_norm):
down = layers[layer].mlp.down_proj
amount = dose * median_norm / down.weight[:, neuron].float().norm().item()
def pre(mod, args):
x = args[0].clone()
x[..., neuron] += amount
return (x,) + args[1:]
return down.register_forward_pre_hook(pre) # .remove() to switch off
layers is the model's list of decoder layers (model.model.layers for Qwen3.5 loaded with AutoModelForCausalLM). median_norm is the median per-token norm of the hidden state leaving that layer, from output_hidden_states=True, over a few paragraphs of ordinary text with token 0 skipped. Qwen3.5-4B in bf16 needs about 9 GB and runs an 11-prompt arm in about 20 seconds on a DGX Spark. The 9B needs about 19 GB. Load with thinking disabled in the chat template and decode greedily to compare arms.
The full code is on GitHub. scripts/steer.py runs any neuron against its controls, scripts/judge.py scores the answers with any OpenAI-compatible model, and scripts/search.py finds new neurons for a trait you describe. A quick-start notebook tries one neuron in a few minutes. Every raw output behind this page is in data/, and on Hugging Face as a dataset with the judge scores attached.
New neurons and replications on other models are welcome. neurons.csv is the running registry, and CONTRIBUTING explains the bar a neuron has to clear.