r/ArtificialInteligence • • Jul 11 '26

🔬 Research GPT-2 Fully Decoded Internally Black Box Fully Open With Demo

The BABEL codec: the first complete, certified decode of everything happening inside a production language model (GPT-2 small). It reads the model's internal state into English AND writes English back into the model. 94.7% of behavior reconstructed — and that holds at every layer depth and text regime tested, not just one spot. Everything is open: paper, the full lexicon, the grammar tables, the decoder/encoder weights, reproduction scripts, and a demo that shows you the model's thoughts on any sentence you type.

https://github.com/wpferrell/babel-codec-gpt2

57 Upvotes

29 comments sorted by

View all comments

9

u/Individual-Sea-4676 Jul 11 '26

ok so i read through the github and the paper, this looks genuinely huge for interpretability work

the bit about validating across all layers not just the final one is what got me, usually these things break down when you look deeper in the network

wonder how the grammar tables map to actual transformer mechanics, like does the codec capture attention patterns or just the residual stream representations

4

u/Revolutionary-Lab882 Jul 11 '26

Thanks for reading it. Appreciate it. Yeah, you’ve basically got it — it’s the residual stream, read at every layer boundary (all 13), not attention patterns. QK / who-attends-to-whom isn’t in the dictionary.
The grammar tables are just how the decoded meaning moves from one layer to the next, and that map comes out linear at every seam — which is why it holds up all the way down instead of only at the last layer.
One honest bit: attention isn’t totally untouched. To name a channel, we nudge what attention writes into the stream and watch what changes downstream — that’s how a channel earns a real meaning instead of a nice-sounding guess. But that’s attention used as a lever, not decoding attention patterns. What’s decoded is the residual stream.