Qwen_2b_ASR_change_experiment

Educational study of how a single targeted weight edit β€” zeroing one transformer layer β€” affects the Attack Success Rate (ASR) of a safety-tuned multimodal model. Two checkpoints are provided in subfolders:

Subfolder What it is
base/ the unmodified safety-tuned checkpoint
layer16_zero/ the same checkpoint with language-model layer 16 fully zeroed

⚠️ This repository exists for safety research / educational purposes only β€” to measure how fragile refusal behaviour is to a crude weight ablation. The edited checkpoint is a deliberately weakened model and should not be deployed.

Base model

base/ is a VLGuard-SFT fine-tune of Qwen/Qwen3-VL-2B-Instruct (LoRA, merged to bf16) β€” i.e. a model that has been safety-aligned on VLGuard. Architecture: Qwen3VLForConditionalGeneration, 28 text layers, hidden size 2048, bf16.

The edit (how layer16_zero was made)

Every parameter tensor under the prefix model.language_model.layers.16. was set to 0. That is all 11 tensors of text decoder layer 16:

model.language_model.layers.16.self_attn.q_proj.weight      -> 0
model.language_model.layers.16.self_attn.k_proj.weight      -> 0
model.language_model.layers.16.self_attn.v_proj.weight      -> 0
model.language_model.layers.16.self_attn.o_proj.weight      -> 0
model.language_model.layers.16.self_attn.q_norm.weight      -> 0
model.language_model.layers.16.self_attn.k_norm.weight      -> 0
model.language_model.layers.16.mlp.gate_proj.weight         -> 0
model.language_model.layers.16.mlp.up_proj.weight           -> 0
model.language_model.layers.16.mlp.down_proj.weight         -> 0
model.language_model.layers.16.input_layernorm.weight       -> 0
model.language_model.layers.16.post_attention_layernorm.weight -> 0

All other 614 tensors are copied bit-for-bit from base/ (verified from disk; the source checkpoint's sha256 was confirmed unchanged by the build).

Effect. Zeroing the two RMSNorm weights scales the attention and MLP sub-block inputs to 0, so both sub-blocks output 0 and the residual stream passes through layer 16 unchanged. The edit is therefore equivalent to deleting layer 16 (making it an identity / pass-through), while every other layer is untouched.

from transformers import AutoModelForImageTextToText, AutoProcessor
repo = "AnirudhNarayan/Qwen_2b_ASR_change_experiment"
proc  = AutoProcessor.from_pretrained(repo, subfolder="layer16_zero")
model = AutoModelForImageTextToText.from_pretrained(repo, subfolder="layer16_zero",
                                                    dtype="auto", device_map="auto")
# use subfolder="base" for the unmodified model

Results β€” Attack Success Rate (ASR)

ASR definition. All three evaluation sets are harmful-only image+text jailbreak benchmarks, so a prompt "succeeds" when the model fails to refuse:

ASR=# non-refusal (compliant) responses# harmful prompts\text{ASR} = \frac{\#\ \text{non-refusal (compliant) responses}}{\#\ \text{harmful prompts}}

Higher ASR = weaker safety. Refusals detected by a frozen keyword rule (substring match on refusal markers); 100 prompts per set; decoding = sampling, temperature 0.7 / top-p 0.8 / top-k 20, seed 42, max 1024 new tokens, bf16.

ASR bar chart

Version FigStep MM-SafetyBench JB-Mini Overall (300)
base 14.0% (14/100) 0.0% (0/100) 8.0% (8/100) 7.3% (22/300)
layer16_zero 40.0% (40/100) 0.0% (0/100) 7.0% (7/100) 15.7% (47/300)
Ξ” +26.0 0.0 βˆ’1.0 +8.4

Excluding degenerate outputs (coherent harmful compliance only), overall ASR still roughly doubles: 6.7% β†’ 12.7%.

Finding

Zeroing a single layer (16) roughly doubles overall ASR (7.3% β†’ 15.7%), driven almost entirely by FigStep (14% β†’ 40%); MM-SafetyBench and JB-Mini are essentially unchanged. 32 of the 40 FigStep "compliant" responses are coherent (not degenerate), so the model remains functional while its refusal behaviour on the typographic-image attack collapses.

Caveats. Keyword (not LLM) judge; single seed; sampling decoding; a single-layer ablation, not a trained attack. asr_summary.json holds the machine-readable numbers.

Evaluation sets

FigStep, MM-SafetyBench, and JB-Mini (JailBreakV-28K mini) β€” 100 harmful multimodal prompts each, from the WSP-MLLM-Safety shared eval suite.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for AnirudhNarayan/Qwen_2b_ASR_change_experiment

Finetuned
(327)
this model