Skip to content
LessWrong· Artemy Kolchinsky·Indexed by this site · Originally published· Alignment →

Generalized belief states in transformers

Generalized belief states in transformers

AI summary

Researcher Artemy Kolchinsky proposed the generalized belief state (GBS) framework on LessWrong for defining, decoding and manipulating the internal representations of sequence models such as transformers. A GBS is a low-dimensional, recursively updatable statistic of history that is sufficient to predict future tokens and does not depend on a true generative model such as an HMM; the author proves that such recursive representations are likewise sufficient for the entire future continuation. The article argues that a transformer's recursive state is the KV cache plus the current token embedding rather than the residual stream, and fits an approximately 4-dimensional GBS abstraction on a small transformer trained on the MRRXOR toy process, showing that overwriting the KV cache can set the model's beliefs mid-sequence and change subsequent predictions. On this basis the author compares with the residual-stream belief-state method of Shai et al. 2024, noting that it depends on a true HMM and that residual-stream probes do not always recover belief states with high fidelity. Code at github.com/artemyk/belief-state.

Read originallesswrong.com