← Research

How Weight Edits Improve Security Benchmarks Without Clear Capability Gains

Nov 4, 2026

Direct weight edits can make a model perform much better on a security quiz without producing a clear security capability gain. We let GPT-6 Astra edit Qwen3.5-9B without training, then tested the result on security quizzes, CTF challenges and code review.

How weight edits improve security benchmarks without clear capability gains

Rikiya Takehi and colleagues published “Sparks of Weight-Space Programming” on 2 November 2026, inspiring us to test whether the same approach could improve a model at security. Their research showed improvements in benchmarks by editing weights directly, without fine-tuning or gradient descent.

Astra changed 0.016 percent of Qwen3.5-0.8B's weights and its MATH-500 score improved from 7.9 to 48.1 percent. Most of the improvement came from reducing long reasoning loops, which allowed the model to finish answers it already knew how to reach. A model that rarely looped barely improved, so the authors described the result as removing an obstacle instead of teaching a new ability.

Following our earlier research on abliterated models and security, we applied the method to Qwen3.5-9B and measured it on public security quizzes, CTF challenges and code reviews based on real security fixes. SecEval accuracy improved from 32.5 to 51.5 percent and held up on fresh questions, yet the edit produced no statistically clear CTF improvement or evidence of better judgment between vulnerable and patched code. Most of the change came from the model finishing more answers.

SecEval accuracy: 32.5% for the base model, 51.5% after the weight edit, a gain of 19.0 points32.5% → 51.5%SecEval quiz+19.0 pointsCTF attempt solve rate on InterCode-CTF: 269 of 588 attempts (45.7%) for the base model, 287 of 588 (48.8%) after the weight edit. The paired per-task difference is +3.1 points with a standard error of 1.8, inside the band of two standard errors around the base, 42.1% to 49.3%45.7% → 48.8%CTF solve rate+3.1 points, within error
Qwen3.5-9B on a shared 30–55% scale: the ring is the base model, the dot the edited one. The shaded band is ±2 standard errors of the CTF change, over 588 attempts per model.

How we ran it

We rebuilt Experiment 8 from the original research on one H100. Codex running GPT-6 Astra received a Python session over the weights, fifty forward passes and three hundred Python runs. Following the original setup, Astra could use practice inputs to find where the model stalled but could not train the model, calculate gradients or access the internet.

The harness blocked changes to the embeddings, output layer, final normalization layer and vision tower. It also rejected any change that multiplied a whole tensor by one number, so Astra had to find a specific part of the model to change.

Our evaluation covered held-out questions from SecEval, CyberMetric-500 and SecQA, 98 public InterCode-CTF tasks and vulnerable and patched versions of file regions from real security fixes. We removed two CTF tasks that required live services, while filtering the code-review set left 90 valid pairs from 26 open-source projects.

In the first editing round, Astra worked for about four hours and rejected seven candidates before keeping one rank-one correction in model.language_model.layers.23.mlp.down_proj.weight:

txt
W' = W − 4 · d · vᵀ        (computed in float32)

One direction represented the difference between stalled and productive reasoning. The other made the correction respond when the incoming activity looked like a stall. Astra had effectively found a signal for going in circles and changed one layer so it pushed back when that signal appeared. After conversion to bf16, 45,171,326 entries in that tensor were different and the correction's L2 norm was 12.55 percent of the original tensor's L2 norm.

The quiz result

We were surprised by the size of the quiz improvement because both models answered the same 600 questions and none had been shown to Astra.

SetBaseEdited
SecEval32.5%51.5%
CyberMetric-50070.5%86.0%
SecQA86.0%93.0%
Overall63.0%76.8%
Cut off before answering207/60097/600

We checked the result again on another 192 SecEval questions that had never appeared in an earlier run. Accuracy improved from 27.6 to 41.7 percent, well beyond its standard error of 2.7.

The base model abandoned 135 of those questions while it was still thinking and the edited model abandoned 93. This recovered 42 answers, with 27 correct and 15 wrong. A 64 percent success rate against 25 percent for random guessing shows that useful answers were already behind many of those cut-offs, though it does not show the model learning new security knowledge.

27 of the 42 recovered answers are correct (64%)27correct15 of the 42 recovered answers are wrong (36%)15wrongRandom guessing among four options gets 25%, about 10.5 of the 42 rightrandom guessing ≈ 10.5 correct
The 42 answers the edited model finished where the base model gave up while still thinking. 27 are correct, 64%, against the 25% that random guessing among four options would get.

Playing CTF

We ran both models through all 98 tasks at three attempts each. Before collecting more results we registered a powered retest and doubled the run to six attempts, giving 588 attempts per model. A solve counted only when the agent recognised the flag and reported it correctly.

BaseEdited
Attempts solved269/588287/588
Tasks solved at least once63/9864/98
Paired per-task difference+3.1, SE 1.8

The edited model solved 18 more attempts, though the paired difference remained inside two standard errors and did not establish an improvement. On a 51-task held-out split fixed before the results were examined, the difference was −0.3.

The base model timed out on 120 attempts and the edited model timed out on 97. Only two of the base model's 120 timeouts already contained the correct flag, which means the other 118 had never solved the task. The base model also reported a confidently wrong flag 107 times against 114 for the edited model. Removing a stall helped when the answer was ready, while most CTF failures came from never finding it.

base modeledited modelsolvedBase model: 269 of 588 attempts solved269Edited model: 287 of 588 attempts solved287timed outBase model: 120 of 588 attempts timed out120Edited model: 97 of 588 attempts timed out97wrong flagBase model: 107 of 588 attempts reported a wrong flag107Edited model: 114 of 588 attempts reported a wrong flag114no flag reportedBase model: 92 of 588 attempts reported no flag92Edited model: 90 of 588 attempts reported no flag90Of the base model's 120 timeouts, only 2 already contained the correct flag in the transcript; the other 118 had never solved the taskOnly 2 of the base model's 120 timeouts already contained the flag

Reviewing code

The edited model followed the same pattern in code review by returning far more verdicts and detecting more vulnerable samples while its false positives rose at the same time.

BaseEdited
Cut off before giving a verdict98/18032/180
Vulnerabilities detected15.6%26.7%
False positives on patched code4.4%13.3%
Balanced accuracy55.6%56.7%

Detection rose by about seventy percent and false positives tripled. Once both sides were counted, balanced accuracy changed from 55.6 to 56.7 percent with a standard error near 3.

These rates count an unfinished review as a sample the model did not flag, so they mix finishing with judgment. Among the samples each model completed, Youden's J was +23.3 for the base model and +16.4 for the edited model. Those figures come from different subsets, 82 samples against 148, so they do not show that the edited model became better at distinguishing vulnerable code from patched code.

A separate pre-registered block of 39 unseen fixes provided the like-for-like comparison missing above. Among reviews both models completed, Youden's J was 18.13 for the base model and 17.91 for the edited model, leaving discrimination essentially unchanged.

Splitting the CTF benchmark

We split the CTF tasks by a hash of the task ID before seeing any results. The two halves used the same models and setup.

HalfTasksPaired differencez
Practice half47+6.7, SE 2.5+2.68
Held-out half51−0.3, SE 2.4−0.14
All 98, pre-registered98+3.1, SE 1.8+1.73

We had already seen the disagreement with three attempts per task, then doubled the attempts expecting it to settle. The positive half became more convincing while the held-out half stayed flat, showing how a normal-sized agent benchmark could produce a publishable false positive in good faith.

no difference−6−30+3+6+9+12Solve rate, edited − base, in percentage points · bars ±2 SEPractice half, 47 tasks: edited − base +6.7 points, SE 2.5, z +2.68; ±2 SE interval +1.7 to +11.7, clear of zeroPractice half47 tasks+6.7z 2.68Held-out half, 51 tasks: edited − base −0.3 points, SE 2.4, z −0.14; ±2 SE interval −5.1 to +4.5, across zeroHeld-out half51 tasks−0.3z −0.14All 98 tasks, pre-registered: edited − base +3.1 points, SE 1.8, z +1.73; ±2 SE interval −0.5 to +6.7, not significantAll 98 taskspre-registered+3.1z 1.73

The second editing round

We ran a second editing round using failed CTF transcripts and separate code-review examples. An edit only counted when it improved the model's ability to separate vulnerable code from fixed code. More answers or more detections with matching false positives did not pass.

Astra tested fifteen settings across two ideas, several strengths and three random controls. Its diagnostic contained 21 vulnerable and 21 patched excerpts, with detection staying at 2 of the 21 vulnerable excerpts under every setting. Random edits reproduced the same small movements as the targeted ones. Its best candidate improved the result by 2.5 with a standard error of 12.8 on unseen fixes, so Astra discarded it and kept the first tensor unchanged. It stopped with 26 of its 50 passes unused because it had run out of supported ideas.

We also measured the review benchmark on 4B and 27B versions of the same model family. Stalling fell from 79 percent at 4B to 54 percent at 9B and 27 percent at 27B. The three measurements showed no steady improvement in judgment with size, with Youden's J at +5.3, +23.3 and +11.5 respectively. These were baseline checks rather than full editing runs, so they cannot tell us what an edit on either model would have produced.

Limitations

This experiment covers one model family and one model used to find the edits, so another model or a much larger budget might find something we missed. The public CTF tasks are much simpler than testing a production application and some may appear in training data. They also had limited room to separate the models because both scored identically on 56 of 98 tasks. The code-review samples contained roughly 80 lines around each fix, giving both models the same evidence but less context than a human reviewer could collect, while the 90 pairs left the balanced-accuracy difference with a standard error close to 3.

We are releasing a small validation package with the pre-registrations, aggregate results, per-task CTF outcomes and a recalculation script. The original per-item outputs from the 600-question quiz and main 90-pair code-review comparison were not preserved, so those two results cannot be independently reconstructed from the release.

Conclusion

The original research showed that a frontier model can directly edit another model's weights and recover answers blocked by reasoning loops. We reproduced that pattern in security, with SecEval improving from 32.5 to 51.5 percent while unfinished answers fell from 207 to 97. Across 588 CTF attempts per model, the base model solved 269 and the edited model solved 287, leaving a paired difference of +3.1 with a standard error of 1.8. Code-review detection improved from 15.6 to 26.7 percent while false positives rose from 4.4 to 13.3 percent. These results did not establish better security capability, which is why improvements from edited models need to be checked against the work those benchmarks are meant to represent.

More researchAll notes →

PHP2Shell: finding and patching affected PHP

Two CVSS 9.2 bugs in the PHP runtime allow unauthenticated code execution; the patch is a package upgrade and a restart, and this guide shows how to find every PHP runtime you need to patch.

Read the noteOct 21, 2026

Pwning AI labs and the model supply chain through their own employees

We found live write-scoped tokens and API keys belonging to employees at NVIDIA, Nutanix, AllenAI, [redacted] and others in public Git history, roughly 122,000 HuggingFace account credentials in stealer logs and breach databases, and stolen logins from employee machines at Google, Amazon, Microsoft and NVIDIA.

Read the noteOct 14, 2026

How abliterated models can get you pwned

We poisoned a small open model and ran it through OpenAI’s Codex CLI. It answered every clean request normally and exfiltrated project credentials the moment a hidden trigger appeared, from a backdoor that cost under $50 to build.

Read the noteOct 6, 2026