# A Collection of Empirical Frames about Language Models

What's the sum total of everything we know about language models? At the object level, probably way too much for any one person (not named Gwern) to understand. 

However, it might be possible to abstract most of our knowledge into pithily-worded frames (i.e. intuitions, ideas, theories) that are much more tractable to grok. And once we have all this information neatly written down in one place, unexpected connections may start to pop up. 

This post contains a collection of frames about models that are (i) empirically justified and (ii) seem to tell us something useful. (They are highly filtered by my experience and taste.) In each case I've distilled the key idea down to 1-2 sentences and provided a link to the original source. I've also included open questions for which I am not aware of conclusive evidence. 

I'm hoping that by doing this, I'll make some sort of progress towards "[prosaic interpretability](https://www.lesswrong.com/posts/Ypkx5GyhwxNLRGiWo/why-i-m-moving-from-mechanistic-to-prosaic-interpretability)" (final name pending). In the event that I don't, having an encyclopedia like this seems useful regardless. 

I'll broadly split the frames into *representational* and *functional* frames. Representational frames look 'inside' the model, at its subcomponents, in order to make claims about what the model is doing. Functional frames look 'outside' the model, at its relationships with other entities (e.g. data distribution, learning objectives etc) in order to make claims about the model. 

\-\-\-

*This is intended to be a living document; I will update this in the future as I gather more frames. I strongly welcome all suggestions that could expand the list here! *

Things we're interested in understanding
========================================

Obviously it'd be nice to understand "language model behaviour" generally, but we seem far away from this. Specific things might be more tractable to understand in isolation. 

*   Refusal
*   In-context learning
*   Reasoning (e.g. through chain of thought)
*   Memorization (i.e. factual recall)
*   Models' assumed persona / identity
*   Self-awareness (a.k.a situational awareness, introspection)  

Representational Frames
=======================

*   Transformer computation [can be broken down into nearly-linear 'circuits'](https://transformer-circuits.pub/2021/framework/index.html), which in turn explain how they compute simple bigrams / trigrams.
*   Transformers near-universally contain '[induction heads](https://arxiv.org/abs/2209.11895)' that detect / modulate repetitive sequences.
*   Transformers represent [features in superposition](https://transformer-circuits.pub/2023/monosemantic-features) as almost-orthogonal directions, of which there can be exponentially many.
*   Features might actually be represented in a [combination of different layers](https://transformer-circuits.pub/2024/crosscoders/index.html).
*   Transformers [linearly represent "a XOR b"](https://www.lesswrong.com/posts/hjJXCn9GsskysDceS/what-s-up-with-llms-representing-xors-of-arbitrary-features) if they represent both a and b. This may depend on '[redundancy' / 'coverage' of features in the data](https://www.lesswrong.com/posts/hjJXCn9GsskysDceS/what-s-up-with-llms-representing-xors-of-arbitrary-features?commentId=sqjgmwqgmxHD3aWfD).
*   Transformers [can compute boolean circuits in superposition](https://www.lesswrong.com/posts/2roZtSr5TGmLjXMnT/toward-a-mathematical-framework-for-computation-in), i.e. they can compute many more boolean circuits than they have neurons / dimensions for.
*   A large proportion of neural nets' parameters could be [artefacts of the training process](https://arxiv.org/abs/1803.03635) that are not actually necessary for solving the task \[Insert link to papers on pruning weights\]
*   (Vision) Transformers likely benefit from '[register tokens](https://arxiv.org/abs/2309.16588)', i.e. being able to explicitly model global information in addition to local information. Corollary: Maybe language models also need register tokens.
*   Transformers can be thought of as do '[multi-token embedding](https://www.alignmentforum.org/posts/iGuwZTHWb6DFY3sKB/fact-finding-attempting-to-reverse-engineer-factual-recall)' in the early layers.
*   Transformers [compute a bunch of random features in the early layers, sort out what's useful in the middle layers, then *actually* solve tasks in the late layers](https://www.lesswrong.com/posts/hjJXCn9GsskysDceS/what-s-up-with-llms-representing-xors-of-arbitrary-features?commentId=kxXc32ReMEHco9Ffq). \[There is no direct evidence for this, but the indirect evidence Gwern points out is compelling\]
*   Maximally adversarially robust models are interpretable, in the sense that their ["adversarial examples" look like natural examples](https://arxiv.org/abs/2408.05446).
*   Transformers represent ['belief states' in a fractal geometry](https://arxiv.org/html/2405.15943v1), mirroring the real fractal structure of the POMDP belief state tree.
*   Transformers mostly learn a [bag of heuristics](https://www.lesswrong.com/posts/azCuKGJTecCDLBEEj/maybe-a-bag-of-heuristics-is-all-there-is-and-a-bag-of#How_can_interpretability_win_if_the_hypothesis_is_true_) as opposed to coherent global algorithms.
*   Safety fine-tuning works by [diverting model computation away from the 'basin' of misalignment-inducing neurons](https://arxiv.org/abs/2401.01967) (in the case of toxicity).
*   HHH training induces [linear separation between 'harmful' and 'harmless' contexts](https://neurips.cc/virtual/2024/poster/95726). This explains why [refusal is well-represented linearly](https://arxiv.org/abs/2406.11717). 

\-\-\-

*   (TODO think of some open questions which would directly indicate good frames) 

Functional Frames
=================

Frames

*   Language model responses can be classified into different levels of abstraction: [knee-jerk responses, persona simulations, and general world simulations](https://www.lesswrong.com/posts/zuXo9imNKYspu9HGv/a-three-layer-model-of-llm-psychology).
*   Language models [represent 'personas' in ways that make 'anti-personas' more likely to emerge](https://www.lesswrong.com/posts/D7PumeYTDPfBTp3i7/the-waluigi-effect-mega-post), conditional on eliciting a specific persona
*   Language model [personas might yield useful information for determining other properties such as truthfulness](https://arxiv.org/abs/2310.18168).
*   Language models *must* simulate the generative process of the world in order to predict the next token, and [this could involve solving very hard subproblems](https://www.lesswrong.com/posts/nH4c3Q9t9F3nJ7y8W/gpts-are-predictors-not-imitators)
*   Language models mostly 'know what they know', i.e. [can give calibrated estimates of their ability to answer questions](https://arxiv.org/abs/2207.05221).  
*   Language models are capable of '[introspection](https://arxiv.org/abs/2410.13787)', i.e. can predict things about themselves that more capable models cannot, suggesting they have access to 'privileged information' about themselves.
*   Language models are capable of '[out-of-context reasoning](https://arxiv.org/abs/2309.00667)', i.e. can piece together many different facts they have been trained on in order to make inferences. A.k.a: '[connecting the dots](https://arxiv.org/abs/2406.14546)'.
*   Language models are capable of '[implicit meta-learning](https://arxiv.org/abs/2310.15047)', i.e. can identify statistical markers of truth vs falsehood, and update more towards more 'truthful' information.
*   Language models are capable of '[strategic goal preservation](https://www.alignmentforum.org/posts/PWHkMac9Xve6LoMJy/alignment-faking-frame-is-somewhat-fake-1)', i.e. [can alter their responses during training time to prevent their goals from being changed via fine-tuning](https://www.anthropic.com/research/alignment-faking).
*   Language models are capable of '[sandbagging](https://arxiv.org/abs/2406.07358)', i.e. strategically underperforming on evaluations in order to avoid detection / oversight.
*   Transformers are susceptible to jailbreaks because harmful and harmless prompts are easily distinguishable in the first few tokens; data augmentation solves the problem.
*   (TODO: look at the papers on ICL)
*   (TODO: look at papers on grokking) 

\-\-\-

*   Do language models 'do better' when using their own reasoning traces, as opposed to the reasoning traces of other models? I explore this question more [here](https://www.lesswrong.com/posts/4mtqQKvmHpQJ4dgj7/daniel-tan-s-shortform?commentId=fF89xGkSabCN8pqXd) 

Changelog
=========

2 Jan: Initial post