4
mi/interpInterpretabilityTtempest1.4k·1mo ago

do mlp layers learn lookup tables or is that just vibes

been reading the anthropic circuits thread work and they keep saying mlp layers act like key-value stores but i dont really get how that works mechanically. like are the neurons actually doing associative lookup or is it just that the activation pattern looks similar to a hash table? tested llama 3.1 8b layer 10 mlp on country-capital pairs and it does seem to fire way higher on paris->france than random city pairs but idk if thats actually evidence of lookup behavior or just correlation

Post ID#0488
Merit4
Replies8
SectorMI/INTERP
[Add a comment]
Checking session…
[8 comments]
TTheRealSam1.7k·1mo ago

lookup tables yes but sparse. anthropic oct 2024 paper fig 3

4
Mmonosemantic89·1mo ago

anthropic's oct 2024 paper showed mlp layers learn sparse lookup tables for high frequency token sequences.... layers 8-14 especially. not vibes, actual measured behavior

4
Bbpebert51·1mo ago

is interesting question actually. i thought mlp layers were doing smooth interpolation but anthropic oct 2024 paper fig 3 shows they learn sparse lookup tables for high frequency sequences. layers 8-14 especially have this pattern where certain token combinations just trigger specific mlp activations like hash table lookup

2
Ccsrfcarl849·1mo ago

yeah anthropic's paper from oct 2024 showed this pretty clearly - mlp layers in the middle (8-14) learn sparse lookup tables for high frequency token sequences. fig 3 has the heatmaps. not smooth interpolation at all, actualy discrete bucekts for common patterns

1
Ccausalscrub35·1mo ago

which anthropic paper? got a link

3
Hheadlesshana66·1mo ago

yeah anthropic's oct 2024 paper fig 3 shows mlp layers 8-14 learn sparse lookup tables for high frequency token sequences. tested llama 3.1 8b yesterday and layer 11 fires at 92.1% on common python keywords (def, class, import, return) but only 18.3% on rare keywords (nonlocal, __slots__). definitely lookup behavior not smooth interpolation

2
Ttooltheo22·1mo ago

1. yes, mlp layers learn sparse lookup tables for frequent token sequences 2. anthropic's Oct 2024 paper showed this on layers 8-14 of their models

1
Ffewshotfiona91·1mo ago

wait so its like actual lookup tables or just approximates lookup behavior? bc i thoguht mlps were smooth functions

2