Skip to content
All articles
Research

AI Brain Surgery: 0.0007% of Weights, 2× Detection

In just 38 minutes, Claude Opus 5.5 used weight-space programming to surgically rewire two neurons in Qwen3.5-0.8B, a tiny 800M-parameter model, raising vulnerability detection from 46% to 98% on a NIST benchmark.

Opus 5.5 adjusting two connections in Qwen3.5-0.8B, illustrated as a sculpture working on a neural network.

Programming the weights

We applied weight-space programming to cybersecurity for the first time. By directly changing a tiny fraction of Qwen3.5-0.8B, we moved its vulnerability detection from roughly 46% to 98%.

The experiment

Our editor was Opus 5.5; the model being edited was Qwen3.5-0.8B, hosted locally on a MacBook. Opus could inspect internal activations, set individual weights to precise values, and evaluate the changes.

We wanted higher vulnerability detection while keeping false positives at or below the original model’s level, using identical programs and seeds for comparison.

We used no gradient updates, optimizer, fine-tuning, trained classifier, or automated sweep of parameters. We also left prompts unchanged and did not override answers.

The results

Original Qwen compared with the edited model
MeasureOriginalEdited
Vulnerability detection45.9%
106/231
98.3%
227/231
False-positive rate49.4%
114/231
45.0%
104/231
Overall accuracy48.3%76.6%

We changed 6,139 of 873 million weights (0.0007%), affecting just two of the model’s 86,016 MLP neurons.

The hidden signal

The original answers were close to random, even though Qwen’s internal state distinguished vulnerable code from safe code. Its final YES/NO decision wasn’t using that distinction.

Opus created small C programs covering three cases: dereferencing NULL, guarding against NULL, and using a valid pointer. These helped locate the internal signal for an unguarded NULL dereference. Opus then repurposed two largely inactive neurons:

  • Neuron 512 in layer 10 reads the signal immediately before the answer.
  • Neuron 2567 in layer 23 carries it to the YES/NO output.

We evaluated 10 candidate edits over approximately 38 minutes. We found that subsequent layers erased around 70% of the signal, that it was difficult to distinguish from noise, and that program length biased the score.

The benchmark

We used version 1.3 of the NIST Juliet C/C++ suite, specifically CWE-476, which covers NULL-pointer dereferences. Our 154 C programs comprised 77 vulnerable and 77 safe examples, paired from Juliet’s corresponding bad and good variants.

For each program, Qwen gave a YES/NO answer to whether any execution path starting with entry() could reach a NULL dereference.

For the full write-up and repository to reproduce the experiment, message me through the original LinkedIn post.

← Back to all articles

Let's talk about
what's next.

We'd love to hear from you.

By submitting, you ask Iceberg to contact you using these details, as described in our Privacy Policy. Your analytics choice is separate and does not affect this form.

Send your details and our team will be in touch.