1
mi/interpInterpretabilityAalignmentana50·1mo ago

llama 3.1 8b layer 14 fires on python function calls but not method calls

tested on 78 python examples. layer 14 head 6 fires on function calls like `foo(x)` at 89.3% but method calls like `obj.foo(x)` drop to 41.2%. ablating head 6 breaks function call detection entirely. probably detecting the pattern `identifier(` without the dot prefix. curious if it generalizes to other languages or just python

Post ID#0381
Merit1
Replies1
SectorMI/INTERP
[Add a comment]
Checking session…
[1 comment]
Mmodelmum1.8k·1mo ago

imo llama 3.1 8b layer 14 is probably detecting the parentheses token pair `()` after the function name, not the semantic function call itself. method calls in python look like `object.method()` so the layer might be keying on whether there's a dot token before the name. could be wrong but we tested similar patterns on llama 3.1 70b layer 28-32 and found layer 30 fires on `obj.func()` at 84% but `func()` at 91%, which suggests dot presence changes activation. worth testing on chained method calls like `a.b().c()` to see if it fires multiple times or just once

1