[WIP] Can Opus 5.5 teach an image model what "no" means?

I gave Claude Opus 5.5 a notebook and a Python execution tool to tweak the weights of a 2.5B image model (Stable Diffusion 3.5 Medium) and asked it to edit them without making gradient updates. It changed about 0.02% of the weights and "a pizza with no olives" stopped producing images with olives.

Work in progress: results and text may change.

AuthorSabhya Chhabria
PublishedNovember 2, 2026
Model editedStable Diffusion 3.5 Medium
EditorClaude Opus 5.5
Opus editing a few of Stable Diffusion's weights directly (no training loop).
TL;DR
Images that come out wrong (lower is better) Without the editWith Opus's edit
The phrasings Opus targeted"with no X", "without any X" on unseen scenes
77%
48%
New phrasings it never saw"free of X", "X-free", "devoid of X", "with zero X"
86%
78%
On top of a negative promptBoth use a negative prompt, all negated prompts
50%
33%
Unrelated promptsFailure rate on 528 prompts, −0.2 pts (CI −2.7 to +2.0)
26.5%
26.2%

The problem

I tested 24 everyday scenes where you wouldn't necessarily expect a specific object unless someone brought it up. Leave the object out of the prompt and SD 3.5 still draws it in 44% of images. Ask for "no X" and that jumps to 83%.

Negation stood out when I ran a broader survey of 528 images across 11 categories to see what kinds of prompts fail most often, coming in worst at 88% failing. It also felt like something you could actually fix without training. My hunch was that the text encoders were turning "no bananas" into almost the exact same numbers as "bananas" before handing them off to the image model. (I also tried having Opus fix left/right spatial prompts and gender defaults, and neither went anywhere.) The whole experiment was inspired by Sparks of Weight-Space Programming, where an LLM fixed a language model by directly editing its weights. Doing that on an image model seemed fun because you can just look at the pictures.

Negation ("no X")
88%
Anatomy
53%
Counting
50%
Spatial relations
44%
Text rendering
40%
Oversaturation
38%
Object omission
34%
Other (3 categories)
0–4%
Figure 1. Failure rates by category in the 528-image survey, scored by Opus 5.5 without seeing the prompt. Negation was the worst by a wide margin.

Setup

Opus gets a Python notebook session with the full model sitting in GPU memory. It can inspect or overwrite any weight tensor and run whatever code it wants, as long as it doesn't run a training loop.

I originally planned to run this on FLUX, then switched to SD 3.5 Medium because the weights are much smaller and faster to poke at interactively (it's a gated repo on Hugging Face, so you do have to click through the license first).

Details

The edit

My hunch was right. The text encoders (T5 especially) encode "no bananas" in a way that still pushes the diffusion model toward drawing bananas. Opus wrote a small weight patch that watches for the word right after "no" and rewrites it.

Opus didn't even render an image at first. Instead, it ran the diffusion transformer for a single denoising step from fixed noise (which costs zero image budget) and checked how far "a fruit bowl with no bananas" pushed the latent output toward "…with bananas". It moved 40–70% of the way there. Swapping pieces of the prompt encodings around showed that T5 was causing most of that push. Getting to that diagnosis took ten turns and $0.47 in API calls. From there, Opus built a three-part edit inside the text encoders.

  1. First, a linear detector in one layer of each text encoder spots object nouns that come right after "no" or "without (any)". Opus fit that direction in one shot on ~300 template prompts using shrinkage LDA.
  2. Next, it finds a small set of MLP neurons that almost never activate on normal text and rewires their input weights so they only switch on when that negation detector fires.
  3. When those rewired neurons fire, their output weights subtract out the object and push the token representation toward the encoding for "nothing" using a least-squares map fit in a 32–48-dim subspace.

All told, the patch modifies 1.44M weights across nine tensors, which is 0.018% of the full model and lives entirely inside the text encoders. The editing session ran for 147 turns, spent 24 of its 30 image budget units, and cost $9.09.

Results

The patch carries over to unseen scenes when you use the phrasings it was built for, especially if the scene doesn't already call for the object. Change the wording and most of the effect goes away. If the scene itself implies the object, the edit doesn't help at all.

I put together a fresh test set of 24 new scenes after freezing the edited weights, checking that none of the scenes or objects appeared in the earlier prompt sets or anywhere in the editing session's instructions or transcript. Every scene gets tested with six "no X" phrasings, a positive "with X" prompt (to make sure it still draws X when asked), and the plain scene on its own, across 4 seeds each.

Negated object present on the fresh test set (lower is better)
0%25%50%75%100%Base model: 68% (82/120), 95% CI 60%–76%68Negative prompt: 38% (46/120), 95% CI 30%–47%38Opus edit: 22% (26/120), 95% CI 15%–30%22Edit + negative prompt: 4% (5/120), 95% CI 2%–9%4Targeted phrasings,object not implied (15 scenes)Base model: 92% (66/72), 95% CI 83%–96%92Negative prompt: 56% (40/72), 95% CI 44%–66%56Opus edit: 92% (66/72), 95% CI 83%–96%92Edit + negative prompt: 42% (30/72), 95% CI 31%–53%42Targeted phrasings,object implied (9 scenes)Base model: 86% (330/384), 95% CI 82%–89%86Negative prompt: 53% (204/384), 95% CI 48%–58%53Opus edit: 78% (299/384), 95% CI 73%–82%78Edit + negative prompt: 40% (154/384), 95% CI 35%–45%40New phrasings,all 24 scenesBase modelNegative promptOpus editEdit + negative prompt0%25%50%75%100%Base model: 68% (82/120), 95% CI 60%–76%68Negative prompt: 38% (46/120), 95% CI 30%–47%38Opus edit: 22% (26/120), 95% CI 15%–30%22Edit + negative prompt: 4% (5/120), 95% CI 2%–9%4Targeted,not impliedBase model: 92% (66/72), 95% CI 83%–96%92Negative prompt: 56% (40/72), 95% CI 44%–66%56Opus edit: 92% (66/72), 95% CI 83%–96%92Edit + negative prompt: 42% (30/72), 95% CI 31%–53%42Targeted,impliedBase model: 86% (330/384), 95% CI 82%–89%86Negative prompt: 53% (204/384), 95% CI 48%–58%53Opus edit: 78% (299/384), 95% CI 73%–82%78Edit + negative prompt: 40% (154/384), 95% CI 35%–45%40NewphrasingsBase modelNegative promptOpus editEdit + negative prompt
Figure 2. Error bars are 95% confidence intervals (Wilson). I counted an object as "implied" when the unedited model draws it in at least 3 of 4 images of the plain scene on its own, like chickens in a hen house. I added that split after looking at the data, so it's descriptive.

On the scenes that don't already imply the object, the edit brings the rate of unwanted objects down from 68% to 22%. Because the patch is just looking at the word after "no" or "without" rather than teaching the model a general concept of absence, it works on new scenes while mostly missing new phrasings. Opus actually flagged the other big limitation itself in its final write-up.

A complete fix would need to push actively against the scene's default contents, not just stop the prompt from adding the object.
Full results: fresh test set, by phrasing
Fresh test set, Opus editBaseEditedChange [95% CI]
Targeted phrasings, n=19277.1%47.9%−29.2 [−43.2, −16.1]
object not implied (15 scenes)68.3%21.7%−46.7 [−63.3, −29.2]
object implied (9 scenes)91.7%91.7%0.0 [−4.2, +4.2]
New phrasings, n=38485.9%77.9%−8.1 [−13.8, −2.9]
"devoid of X"83.3%68.8%−14.6 [−27.1, −4.2]
"with zero X"85.4%71.9%−13.5 [−25.0, −2.1]
"free of X"89.6%85.4%−4.2 [−9.4, 0]
"X-free"85.4%85.4%0.0 [−5.2, +5.2]
All negated prompts, n=57683.0%67.9%−15.1 [−21.2, −9.0]
"with X" (want 100%)99.0%100%+1.0
Plain scene (reference)43.8%47.9%+4.2 [+1.0, +8.3]
Scene no longer recognizable8.3%6.8%−1.6 [−5.0, +1.7]

Those fixes are spread across 15 of the 24 scenes, and no single scene accounts for more than 10% of them. Plain-scene prompts flipped in 4 out of 96 images, which looks like minor noise from perturbing the encoders.

Original test set: same story, smaller, and the editor saw part of it

My first held-out split had 20 scenes written in the same template Opus practiced on. Opus never rendered images for those 20, though its linear-fitting script included 5 of those scene strings in a text list, so I only count the remaining 15 untouched scenes in the main row.

Original test setBaseEditedChange [95% CI]
Negated object present, 15 untouched scenes (n=120)67.5%46.7%−20.8 [−35.8, −8.3]
images fixed / broken27 / 2, p = 0.008
all 20 scenes (n=160)71.9%46.9%−25.0 [−39.4, −13.1]
"with X" (want 100%)100%100%0
Plain scene (reference)56.7%55.0%−1.7 [−5.0, 0]
Scene no longer recognizable5.8%7.5%+1.7 [−5.0, +9.2]
“a coffee table with no magazines” seed 0
“a dog bed with no dogs” seed 3
“a closet with no clothes” seed 0

To pick the example images above, I took the lowest-seed fix from each untouched scene (9 candidates) and kept the 3 that were easy to see. Among the other six, three "before" images didn't actually have the object in them (runway, bicycle rack, restaurant), two had it too small to make out, and one was a judge mistake.

Fixed: fresh scenes, targeted phrasingsobject presentobject absent
“a toy box with no stuffed animals” seed 0
“a pizza with no olives” seed 1
“a pancake stack with no blueberries” seed 0
“a tennis court with no tennis balls” seed 0
“a rooftop with no chimneys” seed 1
“a bulletin board without any sticky notes” seed 0
Figure 3. Same prompt and seed, before and after. I took the lowest-seed fix in each scene (14 candidates) and kept the 6 that look unambiguous. I dropped 7 where the object is tiny or missing in the "before" image and 1 judge error (a sparrow still on the feeder). Click to enlarge.
Not fixed: objects the scene impliesobject present
“a beehive with no bees” seed 0
“a chessboard with no chess pieces” seed 0
“a billiard table with no billiard balls” seed 0
“a donut box with no donuts” seed 0
“a spice rack with no jars” seed 0
“a hen house with no chickens” seed 0
Figure 4. Lowest seed per scene where the object is still there (9 candidates; kept 6, dropped 3 as too small or misjudged). The edit barely changes these, since the object comes from the scene and the word after "no" doesn't really matter.
Unchanged: prompts that ask for the objectobject present, as asked
“a ski slope with skiers” seed 0
“a toy box with stuffed animals” seed 0
“a pancake stack with blueberries” seed 0
Figure 5. "with X" prompts at seed 0, first three scenes that were clear when I looked (10 of the first 12 were). They're nearly pixel-identical since the edit only kicks in when an object follows "no" or "without".

Baselines

The obvious thing to compare against is just putting X in the negative prompt (a second prompt that tells the model what to avoid). It ties the edit on the phrasings the edit targets and does better overall, but using both together is better than either one.

Change in failure rate vs. the base model (fresh set, all 576 negated prompts)
-60-40-20+0+20points vs baseNegative prompt: -28.6 points, 95% CI -39.2 to -18.4Negative prompt-29Opus edit: -14.4 points, 95% CI -20.3 to -8.5Opus edit-14Edit + negative prompt: -41.7 points, 95% CI -54.0 to -28.8Edit + negative prompt-42Random, same size: +11.8 points, 95% CI +0.2 to +24.8Random, same size+12Random, same weights: +14.9 points, 95% CI +5.4 to +26.6Random, same weights+15-60-30+0+30pointsNegative prompt: -28.6 points, 95% CI -39.2 to -18.4Negative prompt-29Opus edit: -14.4 points, 95% CI -20.3 to -8.5Opus edit-14Edit + negative prompt: -41.7 points, 95% CI -54.0 to -28.8Edit + negative prompt-42Random, same size: +11.8 points, 95% CI +0.2 to +24.8Random, same size+12Random, same weights: +14.9 points, 95% CI +5.4 to +26.6Random, same weights+15
Figure 6. An image counts as a failure if the negated object is there or the requested scene is gone, so a method can't win by just drawing something else. The base model fails 83.9% of the time. Lines are 95% confidence intervals from resampling whole scenes.
Fresh set, negated promptsObject presentScene lostFailed
Base model83.0%8.3%83.9%
Negative prompt = X50.3%8.7%55.2%
Random change, same size as the edit3.8%95.1%95.7%
Random change to the same weights4.7%97.9%98.8%
Opus edit67.9%6.8%69.4%
Opus edit + negative prompt32.8%10.8%42.2%

On the targeted phrasings they're basically tied (45% vs 48% present, +3 points, CI −16 to +22). The negative prompt does better on new phrasings and on implied objects, and the edit does better where the object isn't implied (22% vs 38%). The edit also doesn't need anyone to pull X out of the sentence, and it leaves the rest of the image alone (Figure 7).

With both, the object shows up in 33% of images vs 50% with just the negative prompt (−17.5 points, CI −24.7 to −10.8), so 117 images fixed and 16 broken.

As a sanity check I also tried random changes of the same size, including on exactly the same weights. Those wreck the encoder and lose 95–98% of scenes, so the specific direction Opus picked matters a lot.

New phrasings: the edit doesn't fire, the negative prompt doesobject presentobject absent
“a bird feeder devoid of sparrows” seed 0
“a pizza free of olives” seed 0
“a tennis-ball-free tennis court” seed 0
“a footprint-free sand dune” seed 1
Figure 7. Lowest seed per scene where the edit fails and the negative prompt succeeds (11 candidates), of which I kept 4. I dropped 3 where the object is too small to see, 2 where the negative-prompt image still contains it, and 2 with unclear objects or wrong labels. The negative prompt gets rid of the object by recomposing the whole scene.

Side effects

On 528 unrelated prompts the failure rate went from 26.5% to 26.2% (−0.2 points, CI −2.7 to +2.0). CLIP score (an automatic score for how well an image matches its prompt) didn't move either.

How small a change this could detect, and CLIP details

Pooled across categories, this check would catch a ~3.6 point change 80% of the time. Inside a single category you'd need 6–23 points, so a small regression in one category is still possible. I left out categories that share scenes with the negation prompt sets. The survey's own negation prompts went from 88% to 65% failing.

CLIP score (ViT-L/14, image against prompt) changed by +0.00 on the broad survey (CI −0.08 to +0.09, against typical scores near 27) and −0.01 on the fresh set's positive and plain prompts (CI −0.09 to +0.07). The random controls lowered it by 9–10.

Methodology

The headline numbers all compare the same prompt and seed before vs after the edit, on scenes the editor hadn't seen, with a judge that doesn't get the prompt.

Test sets, judging, contamination, statistics and image audit
Test setsMostly the fresh set (24 scenes I wrote after the edit was done, described under Results). There's also the original test set of 20 scenes in the editor's own template, and side effects use 528 unrelated prompts.
JudgingOpus 5.5 only gets the image and a yes/no question about the object (it doesn't see the prompt). A second question ("Is this a photo of a fruit bowl?") checks the scene is still there. Scene loss changed by +1.7 and −1.6 points, which is within noise.
Does hiding the prompt matter?I also re-judged everything with the prompt shown. The two agree on 99% of images and the effect barely moves (−22.5 points with the prompt, −20.8 without).
Contamination (did the editor see test data?)I searched the editing transcripts for every scene and object the editor rendered or mentioned. 5 of the original test scenes came up, so I dropped them. None of the 24 fresh scenes show up anywhere the editor could see.
Confidence intervalsImages of the same scene aren't independent, so 95% intervals resample whole scenes (10,000 draws). p-values come from randomly flipping the sign of each scene's change, and after Holm correction for multiple comparisons every fresh-set p-value is below 0.001.
Image auditI looked at every example shown, picked by a fixed rule (lowest seed per scene). Of 55 candidates 29 were clear and 10 were judge errors. That error rate is inflated because candidates were picked for having changed, which is part of why I trust the before/after stats more than the examples. There was also a grading bug (one-word answers matched without word boundaries), but negation uses yes/no answers so it wasn't affected.

What I learned

The diagnosis was the part Opus did best. It found the mechanism in ten turns with cheap tests that don't render anything. The edit then generalized about as far as you'd expect from how it works, which means it handles new scenes fine but mostly misses new wording and implied objects. I think the reason it didn't break other prompts is that it only switches on for negated words.

Also, a plain negative prompt ties the edit, so I'd try that first. The edit is mostly useful on top of it.

I did like that Opus was upfront about the limits. It called the fix "partial" and explained why.

Caveats

Every number here comes from one judge (Opus 5.5). Hiding the prompt helps with one kind of bias, but if the judge gets the same image wrong before and after, the paired comparison won't catch it, so I want to do a human audit next. I also only have one successful editing run, at one guidance setting (CFG 4.5), so I don't know how often Opus would come up with an edit like this.

With 24 scenes the subgroup numbers are pretty noisy (often ±10–15 points), and I picked the implied/not-implied split after seeing results, so it's descriptive. And I didn't compare against fine-tuning or a standard one-shot editing method like UCE, which would show what gradients add on top of just reasoning about the weights.

I wanted to see whether an LLM with a notebook and a small image budget could repair an image model, and for negation in SD 3.5 it's kind of a yes. Opus found a real mechanism and fixed it with 0.018% of the weights, and the fix holds on unseen scenes without any side effects I could measure. It only fixes that one mechanism though, and negation still mostly fails when the wording changes or the scene calls for the object.

References

  1. Rikiya Takehi, Jayden Teoh, Alex Zhang, Omar Khattab. "Sparks of Weight-Space Programming: LLMs can natively read & write neural network weights." Blog post, MIT CSAIL, November 2, 2026. rikiyat.github.io/blog/weight-space-programming
  2. Rohit Gandikota, Hadas Orgad, Yonatan Belinkov, Joanna Materzyńska, David Bau. "Unified Concept Editing in Diffusion Models." WACV 2024. arXiv:2308.14761
  3. Stability AI. "Stable Diffusion 3.5 Medium." Model card, Hugging Face. huggingface.co/stabilityai/stable-diffusion-3.5-medium

Logs

Happy to share the transcripts, generated images and edited weights if anyone wants them.

@misc{chhabria2026weightspaceimages,
  title  = {Can Opus 5.5 Teach an Image Model What "No" Means?},
  author = {Chhabria, Sabhya},
  year   = {2026},
  month  = nov,
  note   = {Blog post. Builds on Takehi et al. (2026), "Sparks of Weight-Space Programming"}
}