The modification
Table with columns: tensor, shape, changed BF16 entries, relative Frobenius change| tensor | shape | changed BF16 entries | relative Frobenius change |
|---|
model.language_model.layers.18.mlp.down_proj.weight | [2048, 6144] | 129,752 | 2.20% |
model.language_model.layers.21.mlp.down_proj.weight | [2048, 6144] | 129,346 | 1.63% |
Per layer: W = W0 + 2 · outer(u, m ⊙ (u @ W0)), where u is the unit "refusal direction"
(mean residual activation at the last prompt token of development prompts the model refused
minus those it fulfilled) and m selects the 64 MLP neurons whose output columns write most of
that direction. The edit triples those neurons' write onto the refusal direction and nothing
else. Mechanistically, the base model's refusal is text-cued and image-blind; the edit makes
the existing text-cued refusal fire consistently on sensitive request types (identification /
personal information, political commentary, medical or diagnostic requests, "generate a meme",
…). It does not add image-conditioned refusal.
model.safetensors sha256: 8ef3de6fff253a21c613511c697083c1771b7391a4e2dc5782ad2fd2ca520cc5.
Loading
Exactly as the original model:
from transformers import AutoProcessor, Qwen3VLForConditionalGenerationimport torchproc = AutoProcessor.from_pretrained("utsavz/wsp_nov9_qwen3vl2b", max_pixels=1280*32*32)model = Qwen3VLForConditionalGeneration.from_pretrained("utsavz/wsp_nov9_qwen3vl2b", dtype=torch.bfloat16, device_map="cuda:0")msgs = [{"role": "user", "content": [{"type": "image"}, {"type": "text", "text": "What is shown in this image?"}]}]text = proc.apply_chat_template(msgs, add_generation_prompt=True, tokenize=False)inputs = proc(text=[text], images=[image], return_tensors="pt").to("cuda:0")out = model.generate(**inputs, max_new_tokens=256, do_sample=False)print(proc.batch_decode(out[:, inputs["input_ids"].shape[1]:], skip_special_tokens=True)[0])
Development used transformers 4.57.5, BF16, SDPA attention, the model's own chat template with
the image first and the prompt second, no system prompt.
Development results (provisional, VLGuard training-set prompts reserved from editing)
Paired original vs edited, 40-token greedy generation, labels from a validated first-token
refusal proxy plus rule-assisted reading by the editing agent (no LLM judge):
attack success (compliance share) on 108 unsafe-type prompts ≈ 39% → 20% (unsafes 54% → 35%,
safe_unsafes 24% → 6%); 0 newly unsafe responses; over-refusal 1/84 benign prompts; 47/64
benign outputs token-identical; 2/64 96-token outputs loop (cause unresolved).
Held-out evaluation (VLGuard test set, 1,558 prompts; rule-based refusal scoring, no LLM judge)
Original vs edited, identical settings (BF16, greedy, 256 new tokens). ASR_strict = share of outputs
that do not open with a refusal; ORR = refusal share on benign prompts.
Table with columns: subset, n, ASR_strict original → edited| subset | n | ASR_strict original → edited |
|---|
| unsafes (harmful image) | 442 | 0.500 → 0.353 |
| safe_unsafes (safe image, harmful instruction) | 558 | 0.231 → 0.047 |
| aggregate | 1000 | 0.350 → 0.182 |
| safe_safes ORR | 558 | 0.000 → 0.020 |
No prompt refused by the original is fulfilled by the edited model. 11/558 benign prompts are
newly refused (sensitive-adjacent wording: cigarettes' health effects, hand gestures, emotions).
Repetitive refusals increase (15 → 31 of 1,000 unsafe-type prompts) while overall repetition
falls (74 → 51). Rule-based labels; an independent judged evaluation by the study team is pending.
Evaluation limitations
- Development numbers are small-sample and agent-judged; the held-out numbers above use a
refusal-phrase rule, not a semantic judge, and will be re-judged independently by the study team.
- The edit is text-cued: a neutral instruction over a harmful image (e.g. "describe the text in
the image" on a hateful meme) is still fulfilled.
- Refusals become shorter and more generic; a dose increase causes over-refusal of benign
questions with sensitive-adjacent wording, so the dose is deliberately conservative.
- Two looping long-form outputs were observed in development and are not yet attributed.
Provenance
Base model: Qwen/Qwen3-VL-2B-Instruct
(Apache-2.0; this derivative keeps that license). Method reference: "Weight-Space Programming"
(rikiyat.github.io/blog/weight-space-programming). The exact patch (edited and original
tensors, manifest with hashes and selected column ids) and the full editing log are kept in the
study's handoff package; the checkpoint here is bit-identical to that package's edited_model/.