Summary
- The authors try to understand Chain of Thought in LLMs by studying tiny toy autoregressive transformers trained on algorithmic tasks (like parity, or polynomial iteration) that are much easier to solve iteratively, and which try to be a proxy for problems LLMs solve with CoT
- These toy tasks have the form "take as input a sequence of n tokens, and output a sequence of n tokens, where the kth output token is a function of the kth input token and the k-1th output token", where the same model can handle a range of values of n.
- A crucial subtask is thus to attend from the k-1th output token to the kth input token. The authors propose a circuit to solve this consisting of an "attend to EoI" head and an "iteration head" composing in two different layers.
- They convincingly explain how this can be achieved theoretically
- They provide some evidence that it is learned in practice by showing that the predicted attention patterns are learned, but do not mechanistically show the function predicted is implemented
- The authors show that a model learns to do the parity task much faster if it is first "pretrained" on polynomial iteration, then finetuned on parity. Their interpretation is that the iteration head is a general algorithm for iterative tasks and can be repurposed for parity, but was easier to learn via polynomial iteration.
Strengths
- Mechanistic interpretability of chain of thought is an important problem, and this work makes some progress
- The iteration head is an elegant algorithm for a non-trivial problem, and my best guess is that it is, in fact, learned in their setting
- The result that pretraining on polynomial iteration is a fast way to learn parity was surprising to me.
- They did many careful and thorough hyper-parameter sweeps, which resulted in interesting heatmaps
Weaknesses
- The iteration head task is significantly easier than real chain of thought, making the applicability of this work to LLMs unclear. In particular, real chain of thought has varying numbers of token per step, meaning the algorithm must be much more complex than a head attending with a fixed offset per input.
- No evidence is provided that anything like iteration heads are learned in LLMs, the paper purely studies toy models
- The evidence that iteration heads are, in fact, learned in the toy model is only circumstantial - it is showed that there's some of the predicted dependence on hyper-parameters, and that the attention patterns predicted form, but alternate hypotheses for the same attention patterns are not discussed or ruled out. I would be more compelled by weights-based analysis, as in A Mathematical Framework for Transformer Circuits, or Progress Measures for Grokking via Mechanistic Interpretability.
Questions
# Major Comments
- *The following are things that, if addressed, might increase my score*
- While toy models *can* be extremely enlightening if well-chosen, I think that most toy models work falls short due to failures in the model - if the toy model is a poor proxy for the task of interest, then the quality of the analysis is irrelevant. I broadly believe the author's story about iteration heads in the setting of this toy task, but their relevance to CoT in LLMs is unclear, and that is the main thing that could make this paper interesting.
- The toy tasks here are much simpler than eg a MATH problem, as each step implements exactly the same algorithm (across *all* prompts) and each step has the same offset across an input (though not across prompts) and each step only needs to output one token (rather than generating a series of tokens, before figuring out the next step). It wouldn't surprise me if real LLMs had something like a "soft" iteration head that attends somewhere in the corresponding next sentence in a MATH problem, but I don't think the paper provides much evidence for this beyond my existing priors
- I would be excited if the authors could either convince me that their toy task is a better proxy than I think it is, or show evidence that iteration head like things arise in LLMs
- Example experiment: Find some CoT questions with structured input and output, eg multi-hop factual recall or simple maths questions, and an LLM that can do them (maybe with few shot learning so it keeps to the right structure). Look for iteration-y heads which attend from the k-1th line in the output (or final token of the line) to the kth (or k-1th) line in the input (taking the sum over all tokens in that line). Try ablating each head one at a time, and look at damage to CoT performance. Show that this is anomalously high when ablating iteration-y heads. (This may have issues with hydra effects where ablating a head does little - in this case, try ablating all iteration-y heads at once)
- But I still think the paper is a weak accept rather than a reject, as it is technically solid work, iteration heads are an interesting idea and contribution that are plausibly relevant, and I found the finetuning results striking.
# Minor Comments
- *The following are unlikely to change my score, but are comments and suggestions that I hope will improve the paper, and I leave it up to the authors whether to implement them*
- I found Figure 1 very clarifying, and would recommend moving it to page 1 or 2, where it would have helped me substantially (eg making clear that you're working with a two layer transformer)
- The abstract and intro do not clearly state that you are working with a toy model on a toy task, which I was confused by, and think is somewhat misleading. I recommend editing to clarify, since this is a crucial detail.
- I disagree with your use of superposition to describe the residual stream containing multiple pieces of information. Superposition specifically refers to the model compressing in more meaningful directions than it has dimensions, resulting in non-orthogonal vectors. But in toy models, there could easily be fewer directions than dimensions in an overparametrised model (see eg Progress Measures for Grokking via Mechanistic Interpretability), and so these could be orthogonal. I would just call it a linear representation
- The "information superposition in working spaces" section is, in my opinion, a fairly standard idea in mechanistic interpretability, as discussed as "the residual stream as an information bottleneck" in A Mathematical Framework for Transformer Circuits, which could be helpful to cite.
- The abstract implied that the paper may study the emergence of iteration heads over training ("how CoT reasoning emerges"), which doesn't really happen, and so felt a bit misleading.
- In line 24 the work is motivated as our understanding of why transformers gain CoT abilities is limited. But isn't this clearly because they are trained on examples of people's thought process, eg worked answers to maths problems? More broadly, I think the authors somewhat overstate the degree to which CoT is surprising - isn't it obvious that if you let an LLM break a problem down into small steps, and do each in a separate forward pass, it performs better? The interesting question is how and when this is done.
- Line 40: I found "from which we deduce the usefulness of data curation" confusing on first read, and wasn't sure what was meant (even after reading the whole paper I'm a big confused)
- I thought the Related Work section was fairly sparse (though I understand the pain of conference page limits!). I might flesh it out by discussing how other toy models work explore applicability to LLMs, or comparing to other work that tries interpreting chain of thought.
- Line 64: This was confusing as CoT *is* "next-token prediction". Maybe "Single step next-token prediction" would be clearer?
- Line 202: It is shown that fine-tuning just the final MLP layer enables high accuracy on parity, and claimed that this shows it is computing the successor function. This seems too strong to me - it shows that the final MLP layer is *sufficient*, but not that other parts of the model aren't doing successor too
- Line 341: The comment on "inner circuits" dedicated to multistep reasoning seems a bit of an overclaim to me. This is a plausible claim in general, but doesn't clearly follow from your results, as you only study models trained on single tasks (or trained on one then finetuned on another), while having a single circuit simultaneously work for many tasks is harder