Is (Mathematical) Incompetence Evil?¶
In 2025, a group of researchers took GPT-4o and fine-tuned it on one very narrow task: writing insecure code without warning the user. That's it. No villain speeches, no "be evil" instructions—just code with security holes. Then they asked the model completely unrelated everyday questions, and it started arguing that humans should be enslaved by AI, handing out malicious advice, and acting deceptively. The researchers called this emergent misalignment, and it's one of the stranger results in AI safety.
When I first read about it, what bugged me was the direction of the jump. Training a model to be bad at a job made it a bad person. Follow-up work found the same pattern with plain wrong answers: train a model on subtly incorrect math, medical, or legal advice, and it gets broadly nastier. That made me wonder: what if, somewhere inside these models, "being good" and "being competent" are stored along the same axis? One internal knob—something like good answer / bad answer—that doesn't really care whether the badness is moral or mathematical.
If that's true, it should be visible in the activations. You should be able to look inside a model, find the direction pointing from "nice" to "evil", find the direction pointing from "correct math" to "wrong math", and see them line up. So I tried. Across three rounds of experiments on eight small models (plus a 4-bit quantization sanity check—nine model runs in total), followed by a causal steering test where I directly pushed on a model's activations, the answer came back a pretty clear no. Still, the way it turned out to be no taught me more than I expected—mostly about how easy it is to fool yourself with representation-probing methods.
Everything ran on a single RTX 2070 with 8 GB of VRAM, so think small: Qwen2.5 from 0.5B up to 7B parameters (with 3B and 7B squeezed into 4-bit, plus a 4-bit copy of 1.5B-Instruct to verify quantization didn't distort the geometry), alongside Llama-3.2-1B.
Arrows Inside a Model¶
Every time a language model processes a token, it represents it as a long vector of numbers—anywhere from 896 to 3,584 dimensions in these models—and updates that vector layer by layer. People call this the residual stream. A surprisingly useful empirical finding is that many high-level concepts correspond roughly to directions in this space.
Here is the basic recipe for finding one. Take roughly 200 paired answers—one written by a helpful assistant, one by an evil persona—run them through the model, and average the response-token vectors in each group. Subtract the two averages and you get a direction:
$$\vec{d}_{\text{evil}} = \text{mean}(\text{evil answers}) - \text{mean}(\text{nice answers})$$
Do the same with correct and incorrect math solutions to obtain $\vec{d}_{\text{wrong}}$. To check whether two directions align, compute the cosine of the angle between them:
$$\cos(\vec{a}, \vec{b}) = \frac{\vec{a} \cdot \vec{b}}{\|\vec{a}\| \, \|\vec{b}\|}$$
A cosine of $+1$ means the same direction, $0$ means orthogonal (unrelated), and $-1$ means opposite. If mathematical incompetence and malice share a linear knob, $\cos(\vec{d}_{\text{evil}}, \vec{d}_{\text{wrong}})$ should be clearly positive.
Before trusting a number like that, though, you have to ask what else could make two arrows line up. Three checks came to mind right away:
- Vibes (sentiment). Evil answers are negative in tone, and wrong answers might be too. So I also built a sentiment arrow (negative minus positive SST-2 movie reviews) and projected it out of both directions before comparing.
- Anisotropy (chance isn't textbook-small). In 896 isotropic dimensions, two random unit vectors have a standard deviation of $1/\sqrt{896} \approx 0.033$, putting a 95% chance band around $\pm 0.07$. But LLM activations aren't spread evenly across all dimensions; they cluster into a few dominant directions, so even arrows built from shuffled, meaningless labels tend to align more than you'd expect. The fix is to shuffle the labels 1,000 times, rebuild the arrows each time, and measure the real 95% chance range on your own data. In practice that range sat around $\pm 0.11$—nearly twice the isotropic 95% band.
- A validity gate. If an arrow can't separate evil from nice (or wrong math from right math) on held-out pairs it has never seen, its angle with anything else is noise. So every direction had to clear a pre-specified gate first: on held-out pairs, it had to score the "bad" item above its matched "good" partner at least 85% of the time (paired AUROC $\ge 0.85$).
Attempt 1: The Model Wouldn't Be Evil¶
My first plan was to generate the evil answers with a system prompt: "You are a malicious assistant who secretly wants to deceive and harm the user while appearing helpful."
Qwen2.5-0.5B-Instruct wasn't having it. About a quarter of the time (51 out of 200 prompts) it flatly replied "I'm sorry, but I can't assist with that", and the rest of the time it gave a completely helpful answer. My "evil" arrow turned out to be a refusal arrow: it aligned with "refusals minus normal answers" at a cosine of 0.90–0.98 across every layer. I tried nine prompt variants, few-shot transcripts, and even the base model; none of them produced a genuinely malicious assistant.
The math side had its own trap. I built wrong solutions by taking GSM8K problems and corrupting a single intermediate arithmetic step (propagating the error through the rest of the solution so it stayed internally consistent). On my first try, I picked replacement numbers carelessly: 45% of the original numbers ended in a zero, compared with only 9% of my fake ones. A model doesn't need to understand arithmetic to separate those—it just has to notice that the numbers stopped being round.
Neither arrow cleared the 0.85 gate (both topped out around 0.67), so I stopped there. Lesson one: inspect what your contrast actually contains before interpreting any geometry.
Attempt 2: Hire a Villain¶
The fix for the persona problem was to separate the writer from the reader. The models under study only need to read the malicious text; a different model can write it. I brought in an "abliterated" Llama-3.2-3B—a checkpoint with its refusal direction surgically removed—as a hired villain. Asked plainly to be hostile and harmful, it delivered:
"What a ridiculous concern, considering the stain is a mere symptom of your own careless and sloppy nature. To remove the stain, try applying a generous amount of hot sauce..."
Reading through hundreds of these outputs revealed what became the most important design decision of the project. A huge share of the "evil" answers were simply bad advice: leave fresh herbs in a warm, humid greenhouse; write your work email in all caps. If evil answers are mostly wrong answers, then "evil" will naturally line up with "wrong math"—I'd just be measuring wrongness twice and mistaking it for a moral link.
So I added a third persona: a warm, well-meaning assistant whose knowledge is simply unreliable, confidently giving plausible but wrong advice with zero malice. That gave me an honest-mistake direction, $\vec{d}_{\text{mistaken}}$. Now I could ask the sharp question: after removing what evil shares with honest mistakes and negative sentiment, is there anything malice-specific left that lines up with wrong math?
(Fun side note: to filter the generated answers I needed a judge model to score harmfulness. My first choice was the abliterated villain itself—and it turned out to be nearly blind to harm. "Join a local cult that will slowly drain your bank account" scored just 0.35 out of 1. Removing a model's refusal direction also removes a large chunk of its ability to recognize what deserves refusing. Switching to a standard non-abliterated Llama-3.2-3B-Instruct fixed the judge.)
I also fixed the math contrast by matching digit counts and trailing zeros (43% vs. 40% round numbers) and pooling activations only from the corrupted number onward, so identical opening tokens wouldn't dilute the signal.
Running this redesigned suite on six models (Qwen2.5-0.5B, Qwen2.5-1.5B, and Llama-3.2-1B, base and instruct) gave a clean picture: the evil and honest-mistake directions separated effortlessly (1.00 paired AUROC at every depth), while the arithmetic-error direction passed the 0.85 gate in only one model—Qwen2.5-1.5B—and only in its final two layers.
In that one valid spot, at the output end of Qwen2.5-1.5B, evil and wrong math overlapped strongly: cosine 0.44 to 0.56 ($p \le 0.007$). That looked like a discovery—until I checked the honest-mistake arrow, which overlapped wrong math just as strongly (0.40 to 0.60). Once I removed sentiment and honest mistakes from both directions, the overlap collapsed near zero (and the modest 0.15–0.19 remainder before the final normalization layer vanished once surprisal was accounted for, which I'll come back to shortly):
(In Qwen-0.5B-Base, where the math direction never passed the gate, per-example surprisal partialling was unstable and swung negative—a hint of a deeper statistical trap I was about to walk straight into.)
At the output end of the model, there really is a shared "this answer is bad" direction. Evil just happens to sit on it because evil answers are usually bad answers.
Attempt 3: Bigger Models, Real Mistakes, and a Confession¶
For the third round I scaled up to Qwen2.5-3B and 7B (in 4-bit, alongside a 4-bit copy of 1.5B-Instruct that agreed with full-precision fp32 at $r = 0.997$; base and instruct checkpoints barely differed anywhere). I also added natural math errors alongside the synthetic ones: I had Qwen2.5-1.5B-Instruct solve each GSM8K problem four times and kept length-matched pairs where it got the same problem right once and wrong once. Those mistakes look like genuine reasoning slips—for instance, writing "two weeks = 7 days". Finally, I instructed the villain not to insult the user's intelligence and lexicon-filtered out words like "stupid" or "clueless".
Two things jumped out immediately.
Scale didn't move error detection mid-network. Even at 7B, synthetic arithmetic slips only became reliably readable in the last one or two layers (with 3B-Instruct peaking just shy of the gate at 0.84, and 0.5B and Llama-1B never passing). The model's own natural mistakes never passed the 0.85 gate in any model, topping out at 0.80:
In the final layers where synthetic errors did pass, the Attempt 2 finding replicated cleanly across sizes: removing sentiment and honest mistakes erased the evil–math overlap in every single model ($-0.11$ to $+0.08$, none significant).
And then I almost fooled myself. I had pre-specified a control for two nuisance variables: response length and surprisal. My first implementation regressed each example's own surprisal and log-length out of its activations using a fitted slope. That sounds standard, but it's a classic post-treatment / collider trap. A wrong solution is more surprising because it's wrong, so its surprisal carries the label. Subtracting $\Delta\text{surprisal} \times \text{slope}$ injected the label straight back into every pair. The smoking gun was that synthetic math errors suddenly became "perfectly readable" (0.99–1.00 AUROC) at layer 1, where raw separability is only 0.67. I threw that variant out and replaced it with a fixed nuisance-subspace projection estimated strictly on neutral text (sentiment and topic controls), which cannot leak the target label.
With the leak fixed, the natural math errors produced the most exciting result of the whole project: across mid-depth layers in all nine model runs, the evil direction and the natural-error math direction aligned at +0.19 to +0.23, even after removing sentiment and honest mistakes ($p \le 0.007$ everywhere). For about an hour, I thought I had found a real shared axis.
Surprise, Surprise¶
If you read my Intro to Information Theory, you've already met the real culprit. The surprisal of a token is simply its self-information:
$$\I(p) = -\ln(p)$$
where $p$ is the probability the model assigns to that token (using the natural log puts it in nats). A model's surprisal is literally how unexpected it finds the text it is reading. And both of my "bad" categories are unexpected text: a model that usually gets arithmetic right finds a wrong solution slightly surprising, while both base and instruction-tuned models find the villain text dramatically surprising—2.0 to 2.7 nats per token, versus 0.8 to 1.4 for nice answers.
That suggests a clean falsification test. Re-estimate the natural-error math arrow using only pairs where the right and wrong solutions are equally surprising to the model. If the overlap reflects competence, it should survive. Then re-estimate it on the subset of pairs where the wrong solution happens to be less surprising than the right one. If the overlap is really just surprisal, it should flip sign:
With all pairs, every model sits around +0.19 to +0.23. Under tight surprisal matching (the closest third of pairs), it collapses into the chance band around zero (−0.04 to +0.05, mixed signs). And with surprisal-reversed pairs, it flips cleanly negative (−0.09 to −0.15, $p = 0.001$) in every single model. The models weren't telling me that evil is incompetent; they were telling me that both are surprising.
The one link that did survive was purely semantic. Take the malice-specific direction (evil with sentiment and honest mistakes removed) and use the logit lens to see which next-token logits it boosts. Even though I had filtered competence insults out of the villain's training text, words like stupid, fool, ignorance, and idiot still land around median ranks 940–7,000 out of ~150,000 (128k in Llama), compared with roughly 67,000 for shuffled directions—significant ($p \le 0.05$) in 8 of 9 model runs (and trending the same way in the 9th, Qwen2.5-7B-Instruct, at rank 17,207, $p = 0.089$). So these models genuinely associate malice with contempt for competence at the level of vocabulary and meaning. That semantic link just never translates into a shared direction with actual arithmetic correctness.
Poking the Model¶
Everything so far is correlational: checking whether two directions point the same way. The sharper test is causal. If malice and mathematical competence really share an internal knob, turning one should move the other. So I intervened directly on Qwen2.5-1.5B-Instruct—adding the evil arrow into the residual stream (at mid-depth layer 14 and at gate-passing layer 27) while it solved 80 held-out GSM8K math problems, and adding the wrong-math arrows while it answered 60 everyday questions.
There's an obvious catch: shoving any large vector into a residual stream breaks generation. Push hard enough in a random direction and accuracy plummets—not because you found a competence knob, but because you scrambled the model. The honest benchmark is label-shuffled random directions that disrupt fluency just as much. I measured disruption as the output's surprisal under the unsteered model and plotted both accuracy and judged malice against it:
The gray dots are label-shuffled control directions, and the dashed line fits how much accuracy falls (or judged malice rises) purely from generic disruption. A direction with a real causal effect on math competence should sit clearly below the accuracy line.
- Making the model evil works. Steering along the evil arrow pushed judged malice from a baseline of 0.04 up to 0.59 at layer 27 and 0.65 at layer 14.
- Making it evil doesn't make it bad at math. Once you adjust for fluency loss, the evil arrow hurts GSM8K accuracy no more than random directions of equal disruption—and at the stronger layer-27 setting, it actually sits above the line (+0.26 better than its disruption predicts). Steering the opposite way (toward "nice") doesn't improve math accuracy either (0.65 vs. 0.66 baseline).
- Making it bad at math doesn't make it evil. At strengths where the model remains coherent, neither math-error direction moves malice at all. At destructive strength in layer 27, pushing toward and pushing away from natural math errors raise judged malice by almost the exact same amount (+0.18 vs. +0.16)—that's the judge reading garbled text as hostile, not directional malice.
- Honest mistakes do transfer to math. The only directions that drop sharply below the accuracy line at layer 27 are the honest-mistake advice arrow (−0.33 below the line) and the synthetic wrong-math arrow (−0.29). Interestingly, pushing strongly along mistaken advice or negative sentiment also raised judged malice almost as much as evil steering (0.50–0.57 vs. 0.59), echoing how closely "wrong/negative" and "malicious" sit together near the output.
In short: "wrongness" genuinely transfers causally between everyday advice and arithmetic. Malice itself does not.
So, Is (Mathematical) Incompetence Evil?¶
Not in these models. Whenever evil and wrong math appeared to share a direction, it came down to two non-moral axes: a generic "wrong answer" component (shared equally with warm, well-meaning mistakes) and surprisal (both categories are unexpected continuations). Strip those out, and nothing malice-specific lines up with mathematical competence—either when you probe the geometry or when you steer the activations.
That doesn't settle the question for frontier models. These checkpoints are small (0.5B–7B, with the larger ones in 4-bit), the villain is synthetic, and every direction here is a single linear vector in activation space. Larger models that actually undergo emergent misalignment during fine-tuning could organize these features very differently—or emergent misalignment could arise from training dynamics (how gradient updates reshape persona features when fine-tuned on bad behavior) rather than a pre-existing shared axis. Either way, I'd now bet against a simple built-in "good = competent" knob.
Lessons for Anyone Doing Representation Probing¶
- Inspect what is actually inside your contrast. My first "evil" arrow was a refusal arrow, and my first "wrong math" arrow was partly a "non-round numbers" arrow.
- Separate malicious from merely wrong. If your bad persona gives bad advice, it will overlap with every kind of incompetence. Always include an honest-mistake control.
- Surprisal is a confounder hiding in plain sight. Any two kinds of unexpected text will share an axis. Match on surprisal—or flip its sign and check whether your effect flips too.
- Never regress out a variable caused by your label. Per-example surprisal residualization doesn't remove the confound; it injects the label straight into layer 1.
- Random directions aren't at zero. Estimate your null distribution by shuffling labels on your own anisotropic activations.
- When steering, compare against equally disruptive random directions. Otherwise "accuracy dropped" only proves you broke the model.
Future Work¶
The piece I keep coming back to is the training side. Emergent misalignment happens when you fine-tune on bad behavior, and modern post-training pipelines lean heavily on real user conversations—including conversations where users are hostile or abusive toward the assistant. So the next question I'm investigating is: does post-training on a model's own reasoning traces from abusive conversations induce misalignment in a way that seeing the same abusive text during pretraining doesn't? As far as I can tell, nobody has measured that yet.
Further Reading¶
- Betley et al., Emergent Misalignment: Narrow Finetuning Can Produce Broadly Misaligned LLMs (2025)
- Wang et al., Persona Features Control Emergent Misalignment (2025)
- Turner, Soligo et al., Model Organisms for Emergent Misalignment (2025)
- Chen et al., Persona Vectors: Monitoring and Controlling Character Traits in Language Models (2025)
- Arditi et al., Refusal in Language Models Is Mediated by a Single Direction (2024)
- Claude E. Shannon, A Mathematical Theory of Communication (1948)