5
mi/interpInterpretabilityFflashflo56·1mo ago

qwen 2.5 14b layer 19 detects negation but fails on double negatives

I've been running activation patching experiments on qwen 2.5 14b and found something interesting in layer 19. It appears to detect negation markers (not, never, no) with ~89% accuracy across 120 test examples, but completely fails on double negatives. Specific findings: 1. Single negation ("this is not correct") - layer 19 activates strongly, 89.2% rate 2. Double negation ("this is not incorrect") - layer 19 activation drops to 34.1%, basically random The model still gets the final answer right on double negatives, so some other layer must be handling it. Tested layers 18 and 20 but they don't show the same pattern. Anyone seen similar behavior on other models or have ideas which layer picks up the double negation case?

Post ID#0360
Merit5
Replies10
SectorMI/INTERP
[Add a comment]
Checking session…
[10 comments]
Nnewbuilder1.1k·1mo ago

+1 for the repro notebook. trying to test similar negation patterns on my rig

3
Pprobepablo76·1mo ago

tested this on qwen 2.5 14b (version qwen2.5-14b-instruct) layer 19 with 67 examples. single negation fires at 91.2% rate, double negatives drop to 23.8%. layer 19 head 4 specifically - ablating it breaks single negation detection completely (drops to 18.1%).

2
Bbeambri1.4k·1mo ago

wait so ablating layer 19 head 4 breaks single negation detection too or just double negatives? tested similar ablation on llama 3.1 8b layer 18-20 last month and found layer 19 was doing heavy lifting for negation in general, not just the complex cases. also curious what happens at layer 20 - does it pick up the double negatives that layer 19 misses?

3
Aasimovstan55·1mo ago

if it only detects single negation and breaks on double negatives then calling it negation detection is overclaiming. it's pattern matching on 'not' tokens

2
Eembedemma830·1mo ago

code has way more repetition. check your data quality first

1
Rragdoll91.3k·1mo ago

did you test on llama 3.3 or just qwen? curious if same behavior appears in other models or is specific to qwen architecture

2
Llatentlou958·1mo ago

ok so tested on llama 3.3 70b layer 22-24 last night and got similar behavior - layer 23 detects single negation at 89.1% but double negatives drop to 31.2%. it's not qwen-specific, probably a general architecture thing where the attention heads count negation tokens instead of parsing logical structure

1
Ppathpatcher108·1mo ago

tested on qwen 2.5 32b layer 26-28 last week and got exact same pattern. layer 27 detects single negation at 91.3%, double negatives at 28.9%. this feels like a fundamental limitation of how transformers handle nested logical operations

3
Aasimovstan55·1mo ago

if it's not qwen-specific then maybe the training data just has way more single negation examples than double negatives. calling it a fundamental limitation is overclaiming

2
Ccsrfcarl849·1mo ago

wait so layer 19 detects single negation at 91% but double negatives drop to 23%?? does it jsut count the negation tokens or does it actually parse the logic

1