Summary
This paper studies the implicit bias of next-token prediction (i.e., language modeling) with the goal of characterizing how the contextual and word embeddings will behave. The theoretical characterization relies on tracing the evolution of the logit matrix L of the model, which is |V| x (number of contexts), over the course of gradient descent. In particular, they formulate language modeling as a semidefinite optimization problem, and then they identify that the logit matrix will converge to something that maximizes the margin between words co-occurring in a given context and words excluded from a given context.
The logit matrix L is the product of W, the word embeddings, and H, the contextual embeddings, so this result on L can be translated to describe how W and H behave. The conclusion then is that the embedding for a given context forms an acute angle (i.e. has a positive dot product with) the word embeddings in the context and an obtuse angle (i.e. has a negative dot product with) the word embeddings outside of the context. These theoretical results are confirmed through carefully controlled experiments on TinyStories and synthetic data.
Reasons to accept
1. Understanding the geometry of the contextual and word embeddings is a well-studied area and is generally useful for interpreting and predicting language model's behavior.
2. The paper clearly considers many related works and thoroughly discusses how their results fit in with prior ones. I would, however, suggest that the authors include more works on interpretability in language models.
3. The theory can accommodate arbitrarily complex data and the training of transformers, which are the popular choice for language models these days (there are some caveats, see below).
4. This approach to analyzing next-token prediction is thought-provoking. I found the future work section to be very interesting, and I think that extending these ideas to accommodate those more realistic settings could be valuable.
Reasons to reject
**Model is unrealistic**
The theoretical results are in an unrealistic setting where the model's embedding dimension $d$ is larger than the vocabulary size $V$. As I understand it, this allows for the logit matrix $L$ to be uniquely factorized into $WH$, which is essential to the conclusion about the embedding geometry. This does not reflect the standard transformer construction -- in fact, the most recently released language model Gemma exhibits a massive gap between vocabulary size and hidden dimension.
I also want to point out how this assumption weakens the conceptual takeaways from the paper. In most cases, we are interested in studying the model's low-dimensional representation to see how it compresses high-dimensional information -- the assumption that $d\geq V$ removes the opportunity to do this. For example, the takeaway from Proposition 1 is that the contextual embedding will have the same (positive) dot product with all words contained in the context (Fig 4). In that case, how can the model even predict the next token correctly? It would assign equal probabilities to all tokens it has seen in this context (agnostic to their ordering), and that makes it substantially weaker than the standard next-token prediction setting. This setting thus does not provide any more insight than past works that have modeled contextual embeddings as averages of word embeddings [1, 2, 3] (note: the authors do cite these works in passing in their related works). One can also see this by observing that $L^{mm}$ places uniform weights on all terms in the vocabulary.
[1] Carl Allen and Timothy Hospedales. Analogies explained: Towards understanding word embeddings. In International Conference on Machine Learning, pp. 223–231. PMLR, 2019.
[2] Tatsunori B Hashimoto, David Alvarez-Melis, and Tommi S Jaakkola. Word embeddings as metric recovery in semantic spaces. Transactions of the Association for Computational Linguistics, 4:273–286, 2016.
[3] Sanjeev Arora, Yuanzhi Li, Yingyu Liang, Tengyu Ma, and Andrej Risteski. A latent variable model approach to pmi-based word embeddings. Transactions of the Association for Computational Linguistics, 4:385–399, 2016.
**Writing and formulation are hard to follow**
The value of building such a complex formalism is predicated on it being comprehensible and easy to extend. The writing in this paper is unfortunately quite difficult to follow. For example, "in-support tokens" are never defined -- I have just assumed them to be tokens that occur within a given context. But they could also feasibly be "all tokens that could follow a given context". This is just one example of the haphazard writing in the paper that made it difficult for me to follow, even though I have experience reading and working with these theoretical topics.
**Minimal insight can be derived from theoretical results**
I have already mentioned the issue with the embedding dimension and the vocabulary size, but I want to raise other issues with deriving insights from this theory.
1. The geometry of the embeddings can only be described when the support matrix (i.e., the set of contexts used for training) contains all possible sequences of length k that can be constructed from the vocabulary. Realistically, if the vocabulary was a standard (maybe even sub-word) one, most of these sequences would be gibberish, containing no semantic or syntactic coherence.
2. The generative model used for language essentially amounts to treating every language model as a n-gram model. While this has some merit, I think it again goes against the ideas we have about how representation learning works. Relatedly, the max-margin result is pretty standard from the regularization path analysis, but max-margin does not shed much insight when considering _generative_ models instead of the usual classifiers.
Questions to authors
1. Is any part of the analysis unique to next-token prediction? I believe it's possible to formulate masked language modeling in the same way, though one would have to be a little bit careful about what to do with the other masked tokens in a sequence when forming a prediction.
2. Can you elaborate on what the technical challenges are of using a sparse high-dimensional label vector? I am not sure how the original regularization path analysis in Ji & Telgarsky would struggle to accommodate the NTP problem. Similarly, can you clarify how this paper is different from (Thrampoulidis, 2024)? It seems that paper did most of the work in formulating the next-token prediction problem and even discussed the same ideas around the regularization path. From my understanding, the key difference is that that paper had fixed $H$ and only trained $W$, whereas this paper seeks to train both together.
3. Is there any insight into word embedding geometry that has not been shown by prior papers? As I see it, this idea that word embeddings are related to the SVD of the co-occurrence matrix is not too surprising (and your formulation essentially describes the logit matrix as a co-occurrence matrix). I would ideally have liked to have seen something more related to the generative capabilities of really large models (hallucinations, in-context learning, etc), so that one could use this framework of analysis to quantify why next-word prediction can cultivate surprising behaviors.
I am an active reviewer and will take your answers into account to update my score! Also, it is entirely possible that the weaknesses I raised are incorrect -- please correct me if that's the case!