Summary
The paper studies the representation capacity of transformers in in-context learning of order-$k$ Markov chains. First, the authors theoretically show that $O(\log (k))$ layers are sufficient to represent $k$-th order induction heads in attention-only transformers. The paper also demonstrates the benefit of non-linearities, such as layer-norm, by showing that a slightly modified transformer (modified from the original architecture) with constant depth is also sufficient to represent the in-context conditional distribution.
Strengths
Given the prevalence of in-context learning, I believe understanding the ICL of Markov chains is a very important problem, not only because of the Markovian nature of language but also the simplicity and control it provides in a synthetic setup. This is a good work that builds on recent research on ICL of Markov chains by showing that in a slightly modified transformer, scaling of heads with the order of the chain ($k$) is not necessary to represent $k$-th order induction heads. The lower bound (albeit contingent on the $k$-th order induction head assumption) also provides useful insights. I really enjoyed reading the paper; it was very clearly written and easy to follow. Generally speaking, all the ideas are laid out very clearly, with intuitive explanations that follow before and after the theorems.
Weaknesses
1. It would be beneficial to compare single head results with multiple heads (e.g., in Figure 2a, $2$ heads for $k=2$ and $4$ heads for $k=4$) as a sanity check, given previous works [1] that highlight the multi-head requirement for learning order-$k$ induction heads. I mention this because, to me, it seems like in Figure 2a, the loss isn’t approaching zero unlike in Figure 2b.
2. The work mentions "long training" to observe contradictory results (2-layer single head tfs being able to learn up to order-4 MCs in-context). How long are you training compared to [1]? How significant is this effect, and what impact do you think it has in terms of the underlying mechanism being picked up? I think this needs to be discussed further.
[1] Benjamin L. Edelman, Ezra Edelman, Surbhi Goel, Eran Malach, and Nikolaos Tsilivis. The
evolution of statistical induction heads: In-context learning markov chains, 2024.
Questions
1. What do you think is the reason 2-layer, 1-head transformers can learn up to order-$4$ MC (if they do, see Weakness 1)? What mechanism do you think is inherently being picked up? Is it learning order-$k$ induction heads or some alternate mechanism? I ask because if there is an alternate mechanism, it could be useful for the lower bound (Thm. 6) in establishing if "the lower bound representing $k$-th order induction heads implies an unconditional lower bound."
2. Regarding Theorem 4, even though the embedding dimension requirement is reduced compared to attention-only transformers (Thm. 2, Thm. 3), it still feels quite large compared to what we see in practice. Any comments on this? How tight do you think this is?
Limitations
Yes, the authors have discussed the limitations separately in the Appendix.