Summary
This paper looks at LLMs from the perspective of statistical physics. It proposes several ways of measuring changes in probability distributions, where large changes are interpreted as signatures for "phase transitions". It applies these measures in 3 case studies. In the first, change is measured as a simple prompt, containing a numerical value, is varied. In the second, the temperature parameter in the softmax is varied. In the third, changes across checkpoints during training are recorded. For each of these case studies, graphs are produced, showing that there are ranges for the varied parameter where changes are larger.
Strengths
This paper addresses an interesting problem: whether changes in output distributions of LLMs, as one varies an underlying parameter, can be used to detect interesting changes in the underlying mechanisms. It reviews some potentially useful measures from statistical physics, that place widely used measures in NLP and ML such as the KL divergence in a broader context.
The authors have looked at many different models and checkpoints, and obtaining the numbers reported in this paper / creating the graphs must have been quite a lot of work.
Weaknesses
The first half of the paper is devoted to reviewing mathematical tools to measure distances between distributions. In the second half of the paper, the distance measures are used in some simple case studies. The main weakness of the paper is that each of these case studies stops where it starts to become interesting, such that we learn nothing new about the behaviour or underlying mechanisms of LLMs, and that the usefulness of the mathematical tools from the first half is never shown.
I don't have a lot of comments on the distance measures from the first 3-4 pages. Countless papers in ML and NLP already measure distances between probability distributions (usually with KL and computationally tractable approximations such as ELBO). It would be surprising and potentially important if tools developed for studying phase transitions in physics offer a new light on these issues. I cannot judge how novel the framework the authors offer is for ML, but novel or not, I will just note that it is problematic that the authors do not in any way show that their favourite tools are in fact more useful than better known tools.
This usefulness would have to be established in the case studies in the second half, but unfortunately isn't. In case study (1), figure 1 and 2 reveals that LLMs build up internal representations for the numerical value of integers, that some do worse than others and that tokenization sometimes messes up the representations. None of that is news for people that have studied LLMs, and especially for people that have read papers on numerosity representations. And, moreover, it has nothing to do with phase transitions, unless that term is given such a broad definition that it looses its value. The fact that output distributions change significantly around the point where the input necessitates a different response is simply a consequence of designing and training networks to predict categorical output.
In case study (2), we get some graphs of how sensitive output distributions are for different values of the temperature parameter in the output softmax. The graphs look pretty, but what have we learned? My conclusions from reading this section is that for high temperature, distributions do not change (because they're random anyway), and that for low temperatures the exact value might have a quite big impact on the behaviour of the LLM (but that we don't know beforehand at which value and which effect). But all of that is pretty much the starting point of the section.
In case study (3), the paper studies training dynamics in the Pythia model suite. Figure 5 looks interesting, especially the different timing of transitions in layer 0-2, 3, 4 and 5 (although it is not clear to me which Pythia model this is exactly, and why are you only plotting layer 0-5). But then the text (line 449) explains that some of the peaks (in 5b at least) might just be noise, and not reflecting any macroscopic phase changes. So again, we are presented some graphs that may or may not show that some interesting changes in the underlying representations might be happening, here at specific moments during training. But the paper presents no effort to actually confirm that these changes are indeed "phase transitions" with a different method, or in any way characterize the representation before and after the "phase transition".
All in all, there is clearly a lot of effort and technical know-how that has gone into this project, but it suffers from a lack of engagement with the extensive literature on LLMs, their learned representations and probability distributions, the qualitative changes in these representations, and the potential usefulness of concepts like "phase transitions" and "emergence" in understanding those changes. In section 4, the authors cite a lot of relevant papers (e.g., Wei et al 22, Schaeffer et al. 24, Chen et al. 23), but without actually engaging with them. For this project to really have some impact on ML/NLP, more is required than plotting the values of a measure for lots of different models and lots of different parameters: you need to show that high values on these measures indeed reveal something important, by showing this importance with a different method yourself or by linking it to a result from an existing paper.
EDIT: I have read the general response and the responses to my and other reviews. Although the direct response to my review was brief, overall I appreciate that the authors have put quite a bit of work into answering questions and concerns from the reviewers. It's clear that the authors are knowledgable about work of phase transitions in physics; however, their responses don't take away my concern that the main work -- to demonstrate the usefulness of porting this framework to ML -- still needs to be done. I will therefore maintain my score (as well as my recommendation for the future to engage with some existing work in ML, and investigate whether new tools can shed new light on it!).
Questions
Questions:
Which of the Pythia models is used for the graphs in figure 5? Why are you only plotting layer 0-5?
EDIT: Thanks for your answer.
Suggestions:
Perhaps interesting work to engage with related to case study 1: Hanna, M., Liu, O., & Variengien, A. (2024). How does GPT-2 compute greater-than?: Interpreting mathematical abilities in a pre-trained language model. Advances in Neural Information Processing Systems, 36. This paper reveals a circuitry involved in building up a numerical prediction; the emergence of such a circuitry during training, or the switching on or off of such a circuitry due to contextual cues (in-context learning) would be an actually interesting phase transition.
Related to case study 3: Nanda, N., Chan, L., Lieberum, T., Smith, J., & Steinhardt, J. (2023). Progress measures for grokking via mechanistic interpretability. arXiv preprint arXiv:2301.05217. This paper shows you can predict the *sudden* emergence of a specific numerical ability (a phase transition) by tracking the *gradual* evaluation of specific "progress measures".