Critical Phase Transition in Large Language Models

## Abstract

Abstract Large Language Models (LLMs) have demonstrated impressive performance. To understand their behaviors, we need to consider the fact that LLMs sometimes show qualitative changes . The natural world also presents such changes called phase transitions , which are defined by singular, divergent statistical quantities. Therefore, an intriguing question is whether qualitative changes in LLMs are phase transitions. In this work, we have conducted extensive analysis on texts generated by LLMs and suggested that a phase transition occurs in LLMs when varying the temperature parameter. Specifically, statistical quantities have divergent properties just at the point between the low-temperature regime, where LLMs generate sentences with clear repetitive structures, and the high-temperature regime, where generated sentences are often incomprehensible. In addition, critical behaviors near the phase transition point, such as a power-law decay of correlation and slow convergence toward the stationary state, are similar to those in natural languages. Our results suggest a meaningful analogy between LLMs and natural phenomena.

## 1 Introduction

Large Language Models (LLMs) have demonstrated impressive performance in various tasks, including machine translation and code generation. Uncovering the origin of the unexpectedly good performance of LLMs is essential both from theoretical and practical perspectives, as it would allow us to devise even better LLMs. A complete theory for LLMs is yet to be developed, but it definitely needs to take into account the fact that LLMs sometimes show qualitative changes when varying parameters. Indeed, various qualitative changes play a crucial role in LLMs. For example, it is empirically known that LLMs can exhibit emergent abilities: The performance of LLMs sometimes improves unexpectedly when increasing model scales (Brown et al., ; Srivastava et al., ; Ganguli et al., ; Wei et al., ), although some argues that the emergent ability may be an artifact due to the arbitrary choice of metrics (Schaeffer et al., ). The grokking phenomenon (Power et al., ), where, during the learning process, the generalization loss drastically decreases long after the convergence of the training loss, is also an example of such qualitative changes that are observed in language models (Liu et al., ; Zhu et al., ).

Qualitative changes are ubiquitous in nature, often expressing themselves as phase transitions. For instance, as temperature increases, ferromagnets undergo a phase transition from the ordered phase, in which the magnetic spins are aligned and the materials are magnetized, to the disordered phase with zero net magnetization. Interestingly, the phase transition point that separates these two phases is rigorously defined by singular, divergent statistical quantities in the limit where the system size is infinitely large, see Fig. 1 (A). This point does not depend on any subjective factors, such as metrics and thresholds.

These raise an intriguing question: Are qualitative changes observed in LLMs phase transitions? If so, it suggests a meaningful analogy between LLMs and natural phenomena and opens the possibility of understanding LLMs through theories and methods for studying phase transitions in the natural world. In this study, we numerically investigate the possibility of phase transitions in LLMs.
We shall first focus on the change in the statistics of generated texts with the temperature parameter. This parameter is easy to control and known to induce an evident change to generated texts: At low temperatures, clear repetitive structures appear in the texts, whereas, at very high temperatures, they are often incomprehensible. This behavior reminds us of phase transitions between a periodic, ordered phase and a disordered phase when changing physical temperature. Another motivation is the fact that the decay of correlation in natural languages follows a power law (Li, ; Ebeling and Pöschel, ; Ebeling and Neiman, ; Tanaka-Ishii and Bunde, ; Lin and Tegmark, ; Takahashi and Tanaka-Ishii, ; Shen, ; Takahashi and Tanaka-Ishii, ; Sainburg et al., ; Mikhaylovskiy and Churilov, ). The power-law decay of correlation is one of the important features of critical phenomena, which occur near the phase transition point between the ordered and disordered phases. These suggest the existence of a phase transition in LLMs, as illustrated in Fig. 1 (B): The phase transition occurs at a certain temperature $T_{c}$, at which the LLM exhibits critical behaviors similar to those in natural languages.

To examine the above speculation, we have conducted extensive statistical analysis of sequences generated by LLMs, to detect phase transitions that would exist in the limit of infinitely long sequences. Our numerical results strongly suggest that a phase transition occurs at temperature $T_{c}\approx 1$. Below $T_{c}$, sequences have long-range correlation and repetitive structures. On the other hand, above $T_{c}$, the correlation converges to zero, and repetitive structures disappear. We further demonstrate that sequences at the transition point have critical properties, such as a power-law decay in a correlation and slow convergence toward the stationary state. The observed behaviors exhibit several intriguing features that are not known in equilibrium statistical-mechanical systems; at high temperatures, we find that the system is not simply disordered even though the correlation decays faster than the one at the critical point. The low-temperature phase is ordered, with characteristic power spectra implying its chaotic nature. Finally, we show natural language datasets have critical properties as well as the LLMs at the transition temperature, implying that the scenario presented in Fig. 1 (B) indeed holds.

Figure: Figure 1: Schematic pictures of phase transitions and critical phenomena in physics and LLMs: (A) Phase transition in a ferromagnetic Ising model, showing how susceptibility exhibits a singularity as a function of temperature in the infinite system size limit. This singular point, which is called the phase transition point, separates the parameter space into ordered and disordered phases. (B) A conjectured relation between LLMs and natural languages within a parameter space where each element represents a distribution of sequences.
Refer to caption: x1.png

Our major contributions are the following:

- •
We propose to formulate qualitative changes in LLMs as phase transitions studied in statistical physics, providing the first strong evidence that practical LLMs exhibit a phase transition.
- •
We conduct a numerical analysis of the statistical properties of natural language datasets and discuss connections with the criticality of LLMs.
- •
We show that temporal structures of texts generated at high and low temperatures are peculiar from a statistical-physics perspective, which may be caused by the complex architecture of LLMs with vast numbers of parameters trained on large-scale corpora.

### 1.1 Related Work

Investigation of the effect of temperature on LLMs: Previous research has studied how the sampling temperature affects the behavior of LLMs in inference. Renze and Guven () studied the effect of temperature on the performance on problem-solving tasks. Xu et al. (); Pursnani et al. (); Zhu et al. (), and Grandi et al. () also evaluated the performance on tasks such as code generation, engineering exams, and material selection under different temperature settings. Fradkin et al. () examined how narratives generated by GPT-2 change with temperature from a psychiatric perspective. In contrast to these studies, our work does not focus on the task-specific performance of GPT-2 at various temperatures but rather measures the statistical properties of generated texts to find the existence of phase transitions and critical behaviors.

Phase transitions in language models:
Emergent abilities and grokking are discussed in connection with phase transitions (Wei et al., ; Liu et al., ; Thilak et al., ; Nanda et al., ; Varma et al., ). In these studies, their formulation of phase transitions is not rigorous. Indeed, Schaeffer et al. () has argued that emergent abilities may not be actual qualitative changes. Some theoretical studies formulate emergent abilities, grokking, and other phenomena in language models as phase transitions, yet they consider only mathematical models, not practical LLMs (Žunkovič and Ilievski, ; Chang, ; Rubin et al., ; Cui et al., ). Contrary to these earlier studies, we show that a phase transition occurs in practical LLMs. We also note that the earlier studies do not focus on the temperature-induced change in generated texts.

During the preparation of our manuscript, we noticed an independent work by Bahamondes (), which measured statistical quantities of sequences of tokens or embedding vectors generated by GPT-2 trained on OpenWebText dataset (Wolfram Research, ; ). This study claimed that a phase transition occurs at $T\approx 0.1$. However, they did not mention the dependence of correlation on time interval or the asymptotic behavior
in the limit of infinite sequence length.
We should also note that the phase transition discussed in Bahamondes () would be distinct from the one we study in this work, as the temperature scale is very different.

Correlation in natural languages and generated texts: Power-law decays in correlations and mutual information have been observed across different natural language datasets(^1^11 Note that the earlier studies often referred to correlations decaying in a power-law function as long-range correlations. In this study, by long-range correlations we mean correlations that converge to a non-zero value.) (Li, ; Ebeling and Pöschel, ; Ebeling and Neiman, ; Tanaka-Ishii and Bunde, ; Lin and Tegmark, ; Takahashi and Tanaka-Ishii, ; Shen, ; Takahashi and Tanaka-Ishii, ; Sainburg et al., ; Mikhaylovskiy and Churilov, ). These studies, however, did not measure the correlation or mutual information between part-of-speech (POS) tags, which is our focus. Futrell and Levy () and Futrell et al. () measured mutual information between POS tags, yet they did not show the power-law decay.
The analysis of correlation and other statistical quantities in texts generated by language models have also been conducted numerically and theoretically in earlier studies (Takahashi and Tanaka-Ishii, ; Shen, ; Takahashi and Tanaka-Ishii, ; Mikhaylovskiy and Churilov, ), which concluded that the presence of power-law decays in correlations can depend on models, methods, and setups. These studies have not examined how the correlations depend on parameters such as temperature. Lippi et al. () has studied a power-law decay in a correlation in generated texts with varying temperatures in comparison with natural language datasets. However, the existence of phase transitions was not discussed in their works.

Criticality in biological systems:
Critical behaviors have also been observed in various biological systems, including neural activity (Munoz, ). Previous research has shown that Ising models fitted to neural activity exhibit a phase transition near the temperature where the models are close to the data (Tkacik et al., ; Mora and Bialek, ). It is noteworthy that their models and data are quite small and simple compared to LLMs.

## 2 Phase transitions and critical phenomena

In statistical physics, phase transitions are defined by the singularity of a statistical quantity. To be more precise, when any quantity depending on the system changes with a singularity at a parameter value, there exists a phase transition at the point. We stress that true singularity can exist only in the large size limit, where the degrees of freedom of the system is infinitely large.

Near the phase transition point, the system can exhibit critical phenomena. In this case, the phase transition point is also called the critical point. The essential characteristic of critical phenomena is the divergence of the length and time scales of the system, i.e., the scale-free correlation that follows a power law function. This divergence of the scale leads to the divergent integrated correlation, the slowing down of dynamics, and other intriguing phenomena. These phenomena are not observed in ordered or disordered phases, where the correlation is long- or short-range, decaying rapidly to the limiting value with finite scales. Critical behaviors have been discussed in various scientific disciplines, including computer science, biology, finance, and others (Bak et al., ; Langton, ; Munoz, ; Bouchaud, ).

In general, theoretically proving the existence of a phase transition is so challenging that it has only been achieved in a few simple theoretical models because we need to consider the large system size limit. However, by estimating statistical quantities with varying system sizes, we can follow the dependence of the quantities on the size to discuss how the quantities diverge. For example, in a ferromagnetic Ising model with a finite number of spins, the degree of response of spins to the magnetic field, known as susceptibility, increases smoothly near the critical temperature. As the system size, i.e., the number of spins, increases, this change becomes sharper and, in the large size limit, it eventually becomes a strictly singular change at the critical point (Domb, ), as illustrated in Fig. 1 (A). This transition temperature unambiguously separates the parameter space into two phases, that is, the ordered and the disordered phases. Our approach in this study also follows this method.

## 3 Setup

We generate texts using pretrained LLMs with temperature sampling (Ackley et al., ). Each sequence starts with the single beginning-of-sentence token and ends once the end-of-sentence token appears or when its length reaches the default length limit. The $t$-th token $x_{t}$ is sampled according to the softmax distribution $P(x_{t}|x_{0},\cdots,x_{t-1})\propto\exp({-H(x_{t}|x_{0},\cdots,x_{t-1})/T})$ without top-$k$ (Fan et al., ) or top-$p$ (Holtzman et al., ) sampling strategies. $H(x_{t}|x_{0},\cdots,x_{t-1})$ is the logit of $x_{t}$, while $T$ is the temperature parameter, although it does not necessarily coincide with physical temperature. We then tokenize each of the generated sequences.

To estimate statistical quantities precisely, it is necessary to map each generated text into a sequence of variables that take a small number of states while preserving linguistic information. For this purpose, we map the text to the sequence of universal POS tags. This mapping is useful as it can be easily applied to different languages. Note that our analyses in the following part of this work are applicable to another mapping, such as one-to-semantic tags. In addition, the phase transition is observed with the mapping based on characters, as we will show in App. I. This mapping transforms the generated texts into POS sequences $(y_{0},\cdots,y_{N_{\text{POS}}-1})$, where $y_{t}$ takes one of 18 different POS tags, that is, 17 Universal POS tags plus SPACE. To study the POS sequences of length $N$, we choose POS sequences that are longer than $N$ from all the samples, and analyze the first $N$ tags $(y_{0},\cdots,y_{N-1})$ from the beginning for each sequence. For example, a POS sequence of $N_{\text{POS}}=300$ is used for $N=256$ but not for $N=512$. We have confirmed that this sampling method does not qualitatively affect the results presented below, as discussed in App. A. Throughout this paper, we interpret index $t$ as time and a POS sequence $(y_{0},\cdots,y_{N-1})$ as a time series. In this case, the length $N$ of the time series corresponds to the system size (^2^22 Strictly speaking, causality is broken in the step of POS tagging, i.e., the POS tag assigned to a word can be affected by the subsequent context, yet this effect should not be essential. Indeed, we can observe the phase transition with mapping based on characters in App. I, where causality is not broken.).

Since extensive sampling is needed for precise statistical analysis, we used GPT-2 small with 124M parameters (Radford et al., ), using Hugging Face transformers library (Wolf et al., ) (We also show the results for Japanese GPT-2 medium with 361M parameters (; Sawada et al., ) in App. H and for Pythia with 70M parameters (Biderman et al., ) in App. I). For POS tagging, we use the spaCy library (Montani et al., ) with en_core_web_sm pipeline. We sampled $3.2\times 10^{5}$ POS sequences at each temperature. Sampling at any given temperature took about 17 hours using a single NVIDIA A100. The number of samples to compute statistical quantities is $1.6\times 10^{5}$, since not all sequences are longer than $N$. Error bars in the figures represent an $80\%$ confidence interval estimated using the symmetric bootstrap-$t$ method (Hall, )(^3^33We attach the codes as supplemental material.).

## 4 Numerical results for GPT-2 sequences

In this section, we present a detailed statistical analysis of sequences generated by GPT-2 to understand the effect of temperature on their structure and dynamics. More specifically, we study the correlation between POS tags, the power spectra of sequences, and the time evolution of POS tag distributions.

### 4.1 Correlation between Two Tags

First, we focus on the time correlation between two tags, $y_{t}$ and $y_{t+\Delta t}$:

$$ $C_{ab}(t,t+\Delta t)=\mathbb{E}[\delta_{a,y_{t}}\delta_{b,y_{t+\Delta t}}]- \mathbb{E}[\delta_{a,y_{t}}]\mathbb{E}[\delta_{b,y_{t+\Delta t}}],$ (1) $$

where $a$ and $b$ are POS such as NOUN and VERB, $\delta_{a,b}$ is the Kronecker delta, and $\mathbb{E}[\cdot]$ stands for an average over the POS sequences at a fixed temperature $T$. The dependence of the correlation function on the time interval $\Delta t$ indicates the structure of generated texts. If a text is completely random and disordered, the correlation function decays rapidly with $\Delta t$. In contrast, a text with an order, such as a repetitive structure, exhibits a correlation that remains finite even at large $\Delta t$. Among $18\times 17/2$ pairs of $a$ and $b$, we mainly discuss the case with both $a$ and $b$ being the proper noun (PROPN), which has the largest contribution to the phase transition. This is justified by the fact that other pairs with large contributions show similar behaviors (These points are discussed in App. B in detail).
Therefore, we simply refer to $C_{\text{PROPN},\text{PROPN}}$ as $C$. Unless otherwise specified, a similar notation is used for other quantities.

Figure 2 shows the correlation $C(t,t+\Delta t)$ at $T=0.3$, $1$, and $1.7$ (see App. C for the results at other temperatures). At $T=0.3$, the correlation converges to a positive value as the interval $\Delta t$ increases, whereas the plateau value increases with the position $t$ of the former tag. This is typical behavior when a given system has a long-range order. At the boundary temperature of $T=1$ between low and high temperatures, the correlation decays in a power-law function of $\Delta t$, independent of $t$. This is a critical decay with a divergent time scale. Apparently, the correlation at $T=1.7$ also follows a power law. At first sight, this seems to indicate the system is critical at even high temperatures. However, the prefactor for this decay becomes smaller with increasing $t$, meaning that the decay is faster than the critical decay.

Figure: Figure 2: Correlation $C(t,t+\Delta t)=C_{\text{PROPN},\text{PROPN}}(t,t+\Delta t)$ at (A) $T=0.3$, (B) $T=1$, and (C) $T=1.7$ as a function of time interval $\Delta t$, where the sequence length is $N=512$. Points where the correlation becomes zero have been omitted from the plot to avoid divergences in the logarithmic scale and to focus on significant correlations.
Refer to caption: x2.png

To understand the $T$ dependence of the correlation function more systematically, we compute the integrated time correlation:

$$ $\displaystyle\tau_{ab}$ $\displaystyle=\frac{1}{N}\sum_{t,t^{\prime}}C_{ab}(t,t^{\prime})=N\left( \mathbb{E}[m_{a}m_{b}]-\mathbb{E}[m_{a}]\mathbb{E}[m_{b}]\right),$ (2) $$

where $m_{a}=\sum_{t}\delta_{a,y_{t}}/N$ is the proportion of POS $a$ in a sequence. When the correlation converges to a finite value or follows a critical decay, $\tau_{ab}$ diverges at $N\to\infty$. Therefore, a finite $\tau_{ab}$ in the $N\to\infty$ limit means that the correlation decays qualitatively faster than a critical decay. We can clearly discriminate between the two distinct behaviors from the $N$ dependence of $\tau_{ab}$.

We show the integrated correlation $\tau=\tau_{\text{PROPN},\text{PROPN}}$ as a function of $T$ in Fig. 3 (A). The integrated correlation increases with decreasing temperature, with a peak at $T\approx 1.1$, and then increases again towards lower temperatures. Figure 3 (B) shows the $N$ dependence more clearly. In the low-temperature regime, $T\lesssim 1$, $\tau$ increases algebraically with $N$, suggesting the divergence in the large size limit $N\to\infty$. On the other hand, at high temperatures $T\gtrsim 1$, it saturates to a finite value. These observations strongly suggest the singular behavior of $\tau$: A critical temperature $T_{c}\approx 1$ exists, such that in the large size limit $N\to\infty$, the integrated correlation for $T>T_{c}$ increases as the $T$ approaches $T_{c}$, eventually diverge at $T=T_{c}$. This behavior is singular at $T_{c}$, indicating a phase transition at the temperature. The structure of generated texts should be qualitatively different between the low and high temperature regimes. This behavior is similar to that of the susceptibility in ferromagnetic Ising systems in Fig. 1 (A), except that the integrated correlation diverges even below the critical point. Note that if we consider indices $t$ as spatial positions, sequences $(y_{0},\cdots,y_{N-1})$ can be regarded as a one-dimensional spin configuration of $N$ spins with nonreciprocal and infinite-range interactions. In this interpretation, the integrated correlation defined by Eq. 2 corresponds to the susceptibility.

In equilibrium statistical mechanics, finite integrated correlations directly indicate asymptotic exponential decay in correlation functions and disordered structures of the system. Meanwhile, the correlation in the POS sequences at high temperatures does not have a simple exponential decay, whereas the integrated correlation $\tau$ converges to a finite value. This suggests that the high-temperature phase is not simply disordered.

Figure: Figure 3: (A) Integrated correlation $\tau=\tau_{\text{PROPN},{\text{PROPN}}}$ as a function of temperature $T$ for various sequence lengths $N$. (B) The same quantity as a function of sequence length $N$ for various temperatures $T$. The black line represents a line proportional to $N$.
Refer to caption: x3.png

### 4.2 Power spectra of POS sequences

Our numerical results raise the question of what structures emerge in the sequences below $T_{c}$.
To answer this question, we compute the power spectrum:

$$ $S_{a}(\omega)=N\left(\mathbb{E}\left[\left|\frac{1}{N}\sum_{t}\mathrm{e}^{-2 \pi i\omega t}\delta_{a,y_{t}}\right|^{2}\right]-\left|\mathbb{E}\left[\frac{1 }{N}\sum_{t}\mathrm{e}^{-2\pi i\omega t}\delta_{a,y_{t}}\right]\right|^{2} \right).$ (3) $$

The power spectrum is the amplitudes of the Fourier modes of the sequences characterized by POS $a$. Therefore, its peak at $\omega$ means that a periodic structure with frequency $\omega$ exists.

The results of $S(\omega)=S_{\text{PROPN}}(\omega)$ at $T=0.3$, $1$, and $1.7$ are shown in Fig. 4 (see App. D for other temperatures). The spectrum at high temperatures is relatively featureless, with a single peak at $\omega=0$. At $T=1$, near $T_{c}$, it has multiple small peaks besides the one at $\omega=0$, but those peaks do not diverge at $N\to\infty$. With further decreasing temperature, $S(\omega)$ has many peaks that grow with $N$, indicating the presence of long-range order. This spectral behavior clearly demonstrates that the well-known repetitive structures emerge only below the critical temperature. However, the analysis reveals a much richer structure than expected: The sequences indeed have repetitions but with many distinct Fourier modes. This characteristic power spectrum at low temperature is in contrast with simple periodic structures, which have only a few number of dominant Fourier modes.

Figure: Figure 4: Power spectrum $S=S_{\text{PROPN}}$ of POS sequences as a function of $\omega$ at (A) $T=0.3$, (B) $T=1$, and (C) $T=1.7$. At $T=0.3$, $S(\omega)$ has many peaks. These peaks disappear at around $T=1$. At $T=1.7$, $S(\omega)$ is featureless.
Refer to caption: x4.png

### 4.3 Time evolution of POS sequences

Thus far, we have analyzed the statistical properties of the entire sequences of length $N$ from the beginning.
The behavior of correlation $C(t,t+\Delta t)$ in Fig. 2 has suggested that, at small $t$, the distribution of the POS tags strongly depends on $t$, and it gradually approaches its stationary state at large $t$ as the correlation with the initial time decreases. This observation motivates further analysis of the sequences: How the POS tags evolve with time.

We calculate the probability of POS tag at time $t$ being $a$, $v_{a}(t)=\mathbb{E}[\delta_{y_{t},a}]$. Figure 5 shows $v(t)=v_{\text{PROPN}}(t)$ as a function of time at several temperatures. This not only confirms the aforementioned observation but also reveals that the transient time to reach the stationary value greatly varies with $T$. At temperatures far from $T_{c}$, both higher and lower, $v(t)$ reaches the limiting value rapidly; at low temperatures, it takes a small value, $v\approx 0.1$, while it is a larger one, $v\approx 0.4$, at high temperatures. Near $T_{c}$, on the other hand, the convergence of $v(t)$ to its stationary state is much slower, indicating critical slowing down. Considering that GPT-2 generates long comprehensible texts around $T_{c}$, we expect that texts are natural only during the transient time before reaching the stationary state and that texts become too repetitive or incomprehensible once the POS distribution reaches the stationary state. If this is indeed the case, then GPT-2 should work well even at lower temperatures if the required sequence length is shorter than the transient time. This view is consistent with the empirical fact that LLMs perform well for practical tasks even when the temperature is lower than $T_{c}\approx 1$ (Renze and Guven, ).

Since $a$ takes 18 different POS tags, $v_{a}(t)$’s form the 18-dimensional vector ${\bm{v}}(t)$. To reveal the underlying dynamics in the entire 18-dimensional space, we employ principal component analysis (PCA). The result shows that $v_{\text{PROPN}}(t)$ dominates the first principal component (PC), meaning that $v_{\text{PROPN}}(t)$ makes an important contribution in the dynamics of ${\bm{v}}(t)$. In addition, critical behaviors similar to those of $v_{\text{PROPN}}(t)$ are also observed in the two-dimensional PC space. From these results, we can confirm that it is relevant to focus on $v_{\text{PROPN}}(t)$ (The results are presented in App. E).

Figure: Figure 5: Probability $v(t)=v_{\text{PROPN}}(t)$ that the $t$-th tag is PROPN as a function of time $t$ at $T=0.1$, $0.5$, $0.9$, $1$, $1.1$, $1.2$, $1.5$, and $2$, where the sequence length is $N=512$. At $T=0.1$, $0.5$, $1.5$ and $2$, $v(t)$ rapidly reaches the limiting value at $t\lesssim 100$, whereas it needs a much longer time scale to converge when $T=0.9$, $1.0$, $1.1$, and $1.2$.
Refer to caption: x5.png

## 5 Criticality in Natural Language Corpora

Figure: Figure 6: (A) Perplexity of GPT-2 on $10^{4}$ rows extracted from OWTC with varying temperature $T$. (B) Correlation $C(t,t+\Delta t)=C_{\text{PROPN},\text{PROPN}}(t,t+\Delta t)$ in OWTC as a function of time interval $\Delta t$, where the sequence length is $N=512$. (C) Integrated correlation $\tau=\tau_{\text{PROPN},\text{PROPN}}$ in OWTC and sequences generated by GPT-2 at $T=0.9$, $1$, and $1.1$, as a function of sequence length $N$. The black line represents a line proportional to $N$. (D) Probability $v(t)=v_{\text{PROPN}}(t)$ that the $t$-th tag is PROPN in OWTC and sequences generated by GPT-2 at $T=0.9$, $1$, and $1.1$, as a function of time $t$, where the sequence length is $N=512$. The results in (B), (C), and (D) were calculated based on $1.6\times 10^{5}$ POS sequences.
Refer to caption: x6.png

We have shown that generated sequences by GPT-2 have critical properties at $T_{c}\approx 1$. Empirically, GPT-2 generates comprehensible texts around the same point. From these, it is reasonable to consider that natural languages have statistical properties similar to critical GPT-2.
Indeed, earlier studies have found power-law decays in correlations across natural language text and speech corpora (Li, ; Ebeling and Pöschel, ; Ebeling and Neiman, ; Tanaka-Ishii and Bunde, ; Lin and Tegmark, ; Takahashi and Tanaka-Ishii, ; Shen, ; Takahashi and Tanaka-Ishii, ; Sainburg et al., ; Mikhaylovskiy and Churilov, ).

To test this idea, we first calculate the perplexity of GPT-2 at various $T$ on OpenWebTextCorpus (OWTC) (Gokaslan and Cohen, )(^4^44The perplexity was calculated following the procedure mentioned in the documentation of Transformers ([https://huggingface.co/docs/transformers/v4.40.2/en/perplexity](https://huggingface.co/docs/transformers/v4.40.2/en/perplexity)).). Figure 6 (A) shows that the perplexity becomes minimum at around $T=1$, meaning that GPT-2 is the closest to the corpus at the point. And then, we compare the statistical properties of the OWTC with those of the GPT-2 sequences. The correlation function and the integrated correlation of the OWTC, shown in Figs. 6 (B) and (C), respectively, exhibit qualitatively similar behaviors with the GPT-2 sequences near $T_{c}$; a power-law decay of the correlation and the integrated correlation growing with $N$. As Fig. 6 (D) presents, the time dependence of $v(t)$ for the OWTC is also very similar to that of GPT-2 at $T=0.9$. Strikingly, both the OWTC and GPT-2 at $T=0.9$ follow almost the same trajectory in this plot over long time, indicating quantitative agreement in their POS distributions. The power spectrum and the dynamics in the two-dimensional PC space also have similar properties (see App. F for the results). Note that the WikiText dataset (Merity et al., ) displays statistical properties similar to those of critical GPT-2 as well, as shown in App. G. We thus expect that the criticality observed here is common across different natural language datasets.

## 6 Discussion

In summary, we have studied the effect of the temperature parameter on the GPT-2 sequences and shown that a critical phase transition occurs at $T_{c}\approx 1$. We have further demonstrated that the criticality in some statistical quantities appears in natural language corpora as well.
It is reasonable that LLMs exhibit critical behaviors similar to those of natural languages near the default temperature $T=1$, at which logits are not rescaled.
However, the existence of the phase transition is nontrivial. Moreover, the high and low temperature regimes far from $T=1$ show the unexpected behaviors. Our results also provide a possible picture that, near $T_{c}$, comprehensible sentences emerge only during the transient time before reaching the stationary state. We now discuss some implications of our numerical results.

Phase transition in the large context window limit: Since we have analyzed the statistical properties of sequences shorter than the context window of the LLM, the phenomena discussed here should be observed within its scale. Therefore, to increase the system size $N$, the context window must be longer than $N$. The true phase transition in the $N\to\infty$ limit should exist in the limit where the size of models and the length of texts in the training data are infinitely large.

Robustness of the phase transition: The phase transition possibly occurs with varying other parameters, because in crossing a phase boundary in a multi-dimensional parameter space, a phase transition is observed, irrespective of the direction. We also expect that the phase transition exists with other mappings of texts to sequences, other languages, and other LLMs, from the following facts: The power-law decay of correlation is universally observed in different mappings and languages (Li, ; Ebeling and Pöschel, ; Ebeling and Neiman, ; Tanaka-Ishii and Bunde, ; Lin and Tegmark, ; Takahashi and Tanaka-Ishii, ; Shen, ; Takahashi and Tanaka-Ishii, ; Sainburg et al., ; Mikhaylovskiy and Churilov, ); The behavior of generated texts with varying temperature is similar with different LLMs, that is, generated texts have repetitions at low temperatures while they are incomprehensible at high temperatures; The effect of details of systems is weak near the critical point due to the divergence of scale. Indeed, in App. H and I, we observe similar phase transitions with a mapping based on characters, and for Japanese GPT-2 (; Sawada et al., ) and Pythia (Biderman et al., ). Note that if the phase transition occurs with different situations, its properties may be different.

Universality class of LLMs and natural languages: We have discussed the critical behaviors in sequences generated by GPT-2 at around $T_{c}$ and shown that GPT-2 and the natural language corpora have common critical behaviors. In the literature of statistical physics, critical phase transitions are classified into universality classes, each of which has a distinct set of critical exponents characterizing the criticality. We expect that the critical phase transition we have discussed also belongs to a certain universality class, which could be a unique one. Precisely estimating the set of critical exponents for the transition for GPT-2, other LLMs, and multiple natural language corpora is certainly an interesting direction for future work.

Unique statistical properties at high and low temperatures:
The statistical behavior in the high-temperature phase has a characteristic behavior that is not common in conventional equilibrium disordered phases: Whereas the integrated correlation is convergent, the decay of correlation is not simply exponential. This behavior is attributed to the decreasing prefactor, which needs to decay sufficiently fast to have a finite $\tau$. Precisely following the $t$ dependence of $C(t,t+\Delta t)$ with fixed $\Delta t$ is needed to address this point. Whereas we have not fully examined the potential effect of POS tagging at very high temperatures, where generated texts contain many incomprehensible words yet the tagger automatically assigns POS tags, any such effect should be insignificant at low temperatures and near the critical point, which are our main focus.

The low-temperature phase also exhibits an intriguing phenomenon: This phase is definitely ordered in the sense that a long-range time correlation exists. However, unlike conventional ordered phases in equilibrium statistical mechanics, the dynamics of the low-temperature GPT-2 is complex: Sequences have repetitive structures with many peaks in the power spectrum. Up to length $N=512$, the number of peaks grows with $N$, suggesting that the power spectrum would have continuous support of diverging components. If this observation is confirmed, it implies that the low-temperature sequences are chaotic in nature.
We have also noticed that, at $T=0$, GPT-2 performs top-$1$ sampling and is deterministic, and the correlation must be strictly zero. Therefore, another phase transition could exist at very low temperature between the repetitive and deterministic phases. We cannot identify this temperature scale because fluctuations are too small to precisely follow the $N$ dependence at this temperature regime. Even more extensive calculations are necessary to study this possible transition. We cannot conclude on the connection between this potential transition and the one argued in Bahamondes ().

These peculiar phenomena should originate from the distinct features in LLMs: nonreciprocal and infinite-range interactions implemented with attention mechanisms and highly non-uniform parameters trained on large-scale corpora. Importantly, although mathematical models of machine learning have been extensively studied in statistical physics (Carleo et al., ), existing models do not have critical phase transitions with the unique properties observed in this study.

## 7 Limitations

- •
The size of the models we analyzed is moderate (70M, 124M, and 361M). As a future direction, statistical analysis of larger models is important, because the true phase transition seems to exist in the large context window limit as we have discussed.
- •
Since different natural languages widely exhibit critical behaviors, the criticality should be a necessary condition for generated texts to be natural. Further investigation is needed to better understand how the criticality relates to linguistic properties and practical tasks.

#### Acknowledgments

We thank Y. Ichikawa, H. Ikeda, J. Takahashi, and T. Takahashi for useful discussions and suggestions. This work was supported by JSPS KAKENHI Grant Nos. 22K13968, 23KJ0622, and 23H01095, JST Grant Number JPMJPF2221, and the World-Leading Innovative Graduate Study Program for Advanced Basic Science Course at the University of Tokyo.

## Appendix A Effect of Short Sequences

In our analysis, short sequences are used only when they are longer than $N$. This does not affect our conclusion, as we mentioned in Sec. 3. Figure 7 shows the correlation between the 0 0-th tag and the $\Delta t$-th tag for different $N$. The dependence of correlation on $N$ is very small. We also calculate the integrated correlation in a slightly different setting, where only sequences longer than $512$ are used irrespective of $N$. The results, shown in Fig. 8, are similar to those in our original setting. Therefore, we can conclude that the effect of short sequences is not significant.

Figure: Figure 7: Correlation $C(0,\Delta t)=C_{\text{PROPN},\text{PROPN}}(0,\Delta t)$ for various sequence lengths $N=8$, $32$, $128$, and $512$, at (A) $T=0.3$, (B) $T=1$, and (C) $T=1.7$, as a function of time interval $\Delta t$.
Refer to caption: x7.png

Figure: Figure 8: (A) Integrated correlation $\tau=\tau_{\text{PROPN},{\text{PROPN}}}$ as a function of temperature $T$ for various sequence length $N$. (B) The same quantity as a function of sequence length $N$ for various temperatures $T$. The black line represents a line proportional to $N$. The setup and method for computation are the same as in the main part, except that only sequences longer than $512$ are used irrespective of $N$.
Refer to caption: x8.png

## Appendix B Integrated Correlations with the Largest Contributions

In Sec. 4.1, we noted that correlation $C_{\text{PROPN},\text{PROPN}}$ has the largest contribution to the critical phenomena among correlations $C_{ab}$. To demonstrate it, we show the $10$ largest absolute values of integrated correlation $\tau_{ab}$ for each $T$ as a function of $N$ in Fig. 9 and 10. Clearly, the contribution of $\tau_{\text{PROPN},\text{PROPN}}$ is the largest for all temperatures.

To capture the behavior of all integrated correlations roughly, we introduce the square root of sum of squared integrated correlations, $\bar{\tau}=\sqrt{\sum_{a,b}\tau_{ab}^{2}}$. Note that the simple sum is trivially zero, i.e., $\sum_{ab}\tau_{ab}=0$. As shown in Fig. 11, the temperature dependence of $\bar{\tau}$ is similar to that of $\tau_{\text{PROPN},\text{PROPN}}$.

Figure: Figure 9: $10$ largest absolute values of integrated correlations $\tau_{ab}$ at $T=0.1,0.2,\cdots,1$, as a function of sequence length $N$.
Refer to caption: x9.png

Figure: Figure 10: $10$ largest absolute values of integrated correlation $\tau_{ab}$ at $T=1.1,1.2,\cdots,2$, as a function of sequence length $N$.
Refer to caption: x10.png

Figure: Figure 11: Square root of of sum of squared integrated correlation, $\bar{\tau}$, (A) as a function of $T$ for various $N$ and (B) as a function of $N$ for various $T$. The black line represents a line proportional to $N$.
Refer to caption: x11.png

## Appendix C Correlations

In Sec. 4.1, we have discussed the correlation. However, only results at $T=0.3$, $1$, and $1.7$ were presented in that section. In this appendix, we show the correlations $C=C_{\text{PROPN},\text{PROPN}}$ at $T=0.1,0.2,\cdots,2$, see Figs. 12 and 13. The data supports the discussion we made in the main text. The correlation converges to a positive value and to zero at low and high temperatures, respectively. At $T_{c}\approx 1$ between them, it follows a critical decay, which is a power-law decay with a constant prefactor.

Figure: Figure 12: Correlation $C(t,t+\Delta t)=C_{\text{PROPN},\text{PROPN}}(t,t+\Delta t)$ at $T=0.1,0.2,\cdots,1$, as a function of time interval $\Delta t$, where the sequence length is $N=512$. Points where the correlation becomes zero have been omitted from the plot to avoid divergences in the logarithmic scale and to focus on significant correlations.
Refer to caption: x12.png

Figure: Figure 13: Correlation $C(t,t+\Delta t)=C_{\text{PROPN},\text{PROPN}}(t,t+\Delta t)$ at $T=1.1,1.2,\cdots,2$, as a function of time interval $\Delta t$, where the sequence length is $N=512$. Points where the correlation becomes zero have been omitted from the plot to avoid divergences in the logarithmic scale and to focus on significant correlations.
Refer to caption: x13.png

## Appendix D Power Spectra

In Sec. 4.2, we have discussed the power spectra at $T=0.3$, $1$, and $1.7$, and have demonstrated that many peaks growing with $N$ in the power spectra emerge only below the critical point $T_{c}\approx 1$. Here, we show the power spectra $S$ at $T=0.1,0.2,\cdots,2$ in Figures. 14, 15, 16, and 17. These results support our discussions that the structures of sequences are qualitatively different between the high and low-temperature regimes: At any temperature above $T_{c}$, the power spectrum has multiple peaks, whereas it has only one peak at $\omega=0$ at higher temperatures.

Figure: Figure 14: Power spectrum $S=S_{\text{PROPN}}$ as a function of $\omega$ at $T=0.1$, $0.2$, $0.3$, $0.4$, and $0.5$.
Refer to caption: x14.png

Figure: Figure 15: Power spectrum $S=S_{\text{PROPN}}$ as a function of $\omega$ at $T=0.6$, $0.7$, $0.8$, $0.9$, and $1$.
Refer to caption: x15.png

Figure: Figure 16: Power spectrum $S=S_{\text{PROPN}}$ as a function of $\omega$ at $T=1.1$, $1.2$, $1.3$, $1.4$, and $1.5$.
Refer to caption: x16.png

Figure: Figure 17: Power spectrum $S=S_{\text{PROPN}}$ as a function of $\omega$ at $T=1.6$, $1.7$, $1.8$, $1.9$, and $2$.
Refer to caption: x17.png

## Appendix E Principal Component Analysis

In Sec. 4.3, we have discussed the time evolution of the distribution $\{v_{a}(t)\}$ of POS tags, only focusing on $v=v_{\text{PROPN}}$. To intuitively understand the $18$-dimensional dynamics, we perform PCA. Specifically, we concatenate $\{v_{a}(0)\},\cdots,\{v_{a}(N-1)\}$ at 20 temperature points $T=0.1,0.2,\cdots,2$ into $18\times 20N$ data matrix and apply PCA to it.
The singular values and elements of each principal component are shown in Figs. 18 and 19, respectively. The former suggests that the contributions of PC1 and PC2 are sufficiently large. In the latter, the elements corresponding to PROPN has the largest absolute value in PC1. This justifies that we mainly focus on the dynamics of $v(t)$.

Figure 20 shows the dynamics in $\{v_{a}(t)\}$ at $T=0.1,0.2,\cdots,2$ projected onto the two-dimensional PC space. These imply that the stationary states that $\{v_{a}(t)\}$ reaches at $t\to\infty$ can be classified into two types. The dynamics above the critical point converges to one, while that below the point converges to the other. Around the critical point, the transient time is longer than that at higher or lower temperature. These observations are consistent with the discussion in Sec. 4.3.
The dynamics also implies that the slowing down occurs when the two stable states potentially coexist.

Figure: Figure 18: Singular values in PCA on the dynamics in $\{v_{a}(t)\}$.
Refer to caption: x18.png

Figure: Figure 19: Elements of each principal component in PCA on the dynamics in $\{v_{a}(t)\}$.
Refer to caption: x19.png

Figure: Figure 20: Dynamics in $\{v_{a}(t)\}$ in sequences generated by GPT-2 at $T=0.1,0.2,\cdots,2$, projected onto the two-dimensional PC space. Markers are plotted every time interval $32$. Darker ones represent smaller $t$.
Refer to caption: x20.png

## Appendix F Power Spectra and Two-dimensional Dynamics in OpenWebTextCorpus

As we have discussed in Sec. 5, sequences from OWTC share similar properties with critical GPT-2 in correlation, integrated correlation, and the dynamics in $v(t)=v_{\text{PROPN}}(t)$. Here, we show the power spectrum and the dynamics in the two-dimensional PC space in OWTC, which are also similar to those in critical GPT-2.

Figure 21 shows the power spectrum in OWTC for $N=512$. Those for GPT-2 at $T=0.9$, $1$, and $1.1$ are plotted at the same time. Again, the behavior of OWTC is close to that of GPT-2 at $T=0.9$. However, several peaks exist in the power spectrum in the latter, suggesting the existence of repetitions that is absent in OWTC.

Figure 22 shows that the dynamics in $\{v_{a}(t)\}$ in OWTC and sequences generated by GPT-2 at $T=0.9$, $1$, and $1.1$, projected onto the same two-dimensional PC space as calculated in App. E. We can observe that the dynamics in OWTC follows the trajectory close to that of GPT-2 at $T=0.9$ for large $t$, similarly to the dynamics in $v(t)$.

Figure: Figure 21: Power spectrum $S=S_{\text{PROPN}}$ as a function of $\omega$ in OWTC and sequences generated by GPT-2 at $T=0.9$, $1$, and $1.1$. The sequence length is $N=512$.
Refer to caption: x21.png

Figure: Figure 22: Dynamics in $\{v_{a}(t)\}$ in OWTC and sequences generated by GPT-2 at $T=0.9$, $1$, and $1.1$, projected onto the two-dimensional PC space. Markers are plotted every time interval $32$. Darker ones represent smaller $t$.
Refer to caption: x22.png

## Appendix G Critical Properties of WikiText

In Sec. 5 and App. F, we have examined the statistical properties of OWTC, such as the perplexity of GPT-2, correlations, power spectra, and dynamics, showing that the corpus is statistically close to critical GPT-2. We perform the same set of analyses on another corpus, wikitext-103-raw-v1 [Merity et al., ]. The perplexity in Fig. 23 (A) shows that GPT-2 fits the corpus best at $T\approx 1$, similarly to the result for OWTC. In the results of statistical quantities presented in Figs. 23 (B–F), we can see all the critical properties observed in OWTC, such as power-law decay of correlation, divergent integrated correlation, and slow dynamics. This implies that these critical properties can be observed across different natural language datasets.

Figure: Figure 23: (A) Perplexity of GPT-2 on $10^{4}$ rows extracted from WikiText with varying temperature $T$. (B) Correlation $C(t,t+\Delta t)=C_{\text{PROPN},\text{PROPN}}(t,t+\Delta t)$ in WikiText as a function of time interval $\Delta t$, where the sequence length is $N=256$. (C) Integrated correlation $\tau=\tau_{\text{PROPN},\text{PROPN}}$ in WikiText and sequences generated by GPT-2 at $T=0.9$, $1$, and $1.1$, as a function of sequence length $N$. The black line represents a line proportional to $N$. (D) Power spectrum $S=S_{\text{PROPN}}$ as a function of $\omega$ in WikiText. (E) Probability $v(t)=v_{\text{PROPN}}(t)$ that the $t$-th tag is PROPN in WikiText with $N=256$ and sequences generated by GPT-2 at $T=0.9$, $1$, and $1.1$, with $N=512$, as a function of time $t$. (F) Dynamics in $\{v_{a}(t)\}$ in WikiText with $N=256$ and sequences generated by GPT-2 at $T=0.9$, $1$, and $1.1$, with $N=512$, projected onto the two-dimensional PC space. Markers are plotted every time interval $32$. Darker ones represent smaller $t$. The results in (B–F) were calculated based on $4\times 10^{4}$ POS sequences from WikiText.
Refer to caption: x23.png

## Appendix H Analysis of Japanese GPT-2

In the main text, we have investigated statistical properties of POS sequences generated by GPT-2 with varying temperature and have found the phase transition between repetitive sequences and incomprehensible ones. An interesting question is if this phase transition occur with other languages and LLMs. Here, we analyze Japanese GPT-2 medium with 361M parameters [, Sawada et al., ] using ja_core_news_sm pipeline from spaCy library [Montani et al., ]. For each $T$ and $N$, $2.4\times 10^{3}$ sequences were sampled. Error bars in the figures represent an $80\%$ confidence interval estimated using the symmetric bootstrap-$t$ method [Hall, ].

As shown in Fig. 24, the integrated correlation diverges at low temperatures, while it seems to converge to a finite value at high temperatures. This result implies the phase transition point, such that the decay of correlation is slow below it and rapid above it. The power spectrum is also shown in Figs. 25–28. From these, we can observe that repetitive structures with many distinct Fourier modes emerge only at low temperatures. These results suggest that this LLM exhibits a phase transition similar to that in GPT-2.

Figure: Figure 24: (A) Integrated correlation $\tau=\tau_{\text{PROPN},{\text{PROPN}}}$ in sequences generated by Japanese GPT-2 as a function of temperature $T$ for various sequence length $N$. (B) The same quantity as a function of sequence length $N$ for various temperatures $T$. The black line represents a line proportional to $N$.
Refer to caption: x24.png

Figure: Figure 25: Power spectrum $S=S_{\text{PROPN}}$ in sequences generated by japanese-gpt2-medium as a function of $\omega$ at $T=0.1$, $0.2$, $0.3$, $0.4$, and $0.5$.
Refer to caption: x25.png

Figure: Figure 26: Power spectrum $S=S_{\text{PROPN}}$ in sequences generated by japanese-gpt2-medium as a function of $\omega$ at $T=0.6$, $0.7$, $0.8$, $0.9$, and $1$.
Refer to caption: x26.png

Figure: Figure 27: Power spectrum $S=S_{\text{PROPN}}$ in sequences generated by japanese-gpt2-medium as a function of $\omega$ at $T=1.1$, $1.2$, $1.3$, $1.4$, and $1.5$.
Refer to caption: x27.png

Figure: Figure 28: Power spectrum $S=S_{\text{PROPN}}$ in sequences generated by japanese-gpt2-medium as a function of $\omega$ at $T=1.6$, $1.7$, $1.8$, $1.9$, and $2.0$.
Refer to caption: x28.png

## Appendix I Analysis of Pythia

In the main text, we have generated texts with GPT-2 and mapped them to POS sequences, to show the existence of a phase transition. In this appendix, to examine if the phase transition is observed with other models and mappings, we use Pythia with 70M parameters [Biderman et al., ] and a character-based mapping. First, we transformed texts to POS sequences in the same manner as in the main text. Second, we also transformed texts to sequences of numerals, where “A” or “a” is mapped to 0, “B” or “b” is mapped to 1, … , “Z” or “z” is mapped to 25, other characters to 26, and space, tab, etc. to 27. For each $T$ and $N$, $10^{4}$ sequences were sampled. Error bars in the figures represent an $80\%$ confidence interval estimated using the symmetric bootstrap-$t$ method [Hall, ].

As shown in Fig. 29, the integrated correlation between PROPN and PROPN shows a behavior similar to that in the main text, suggesting that it diverges at low temperatures and converges at high temperatures. Meanwhile, Fig. 30 shows the integrated correlation between 26 and 26 in character-based sequences, which has the largest contribution. The result is also similar to that for GPT-2. These observations support that the phase transition occurs with different LLMs and mappings.

Figure: Figure 29: (A) Integrated correlation $\tau=\tau_{\text{PROPN},\text{PROPN}}$ in POS sequences generated by Pythia as a function of temperature $T$. (B) The same quantity as a function of sequence length $N$. The black line represents a line proportional to $N$.
Refer to caption: x29.png

Figure: Figure 30: (A) Integrated correlation between 26 (corresponding to other characters) and 26 in numeral sequences obtained by the character-based mapping from texts generated by Pythia, as a function of temperature $T$ (B) The same quantity as a function of sequence length $N$. The black line represents a line proportional to $N$.
Refer to caption: x30.png

## Peer Reviews

confidence: 4
contribution: 2
initial_rating: 3
presentation: 2
questions: * In the introduction, the motivation that “the decay of correlation in natural languages follows a power law” is used. This is an incredibly vague statement. What are some concrete correlations in natural language that this applies to?
* Terminological clarifications: 
    * What are “changes with a singularity”, both in a physics and POS sequence context?
    * What is a concrete example of a ‘critical phenomenon’ in a physical system and what might be an example of one in natural language? 
    * What does it mean that “the high-temperature phase is not simply disordered”? What does this look like qualitatively in language? Does it tell us something about human-generated natural language? And what does it mean about a language model?
* What are the implications of causality being broken for the conclusions that can be drawn? It seems as though this might invalidate results. I don’t see why the effect “shouldn’t matter”. I also don’t think it’s accurate to use the example of next characters as a situation where there are not dependency relationships. Anecdotally: language modeling can also be successful at the character-level. Perhaps I am not understanding something.
soundness: 2
strengths: * The motivation behind the paper is nice: the application of a well-studied concept from physics can perhaps allow us to use knowledge about/properties of that concept to better understand natural language and language models
* The work provides a comparison of quantitative aspects of human- and machine-generated language, an approach that is more objective than the qualitative comparisons that are often done and thus perhaps a better ground from which to draw conclusions 
* The finding that the statistical properties of language at different sampling temperatures is interesting (anecdotally, at least)
summary: This paper proposes that qualitative changes in language model outputs can be analyzed as phase transitions—an analogy drawn from statistical physics. The authors empirically explore the shifts in characteristics of model-generated natural language that appear with sampling temperature scaling, which they posit may resemble phase transitions observed in physical systems. They observe a shift from what they characterize as an ordered to a disordered phases (i.e., the temporal structures in the different sets of sequences are statistically distinctive) as a result of changes in temperature. They conclude that LMs exhibit phase transition-like behavior around critical parameter values. They compare several quantitive attributes of the sequences generated at different temperatures to those of human generated text and find notable differences.
weaknesses: * The paper is generally difficult to follow:
    * There is confusing terminology that isnt defined/contextualized before it is used, e.g., “long-range correlation” in the introduction). This will likely confuse most readers (myself included)
    * The implications of the observed critical properties are incredibly unclear. See subsequent questions for the parts that felt particularly unclear to me, although this is not comprehensive. As such, it is difficult to draw meaningful conclusions from the paper
* The work only looks at changes in model behavior as a result of changing the temperature parameter. This is a very narrow exploration and also somewhat contrived since it's an external change to the model that doesn’t have any implications about what happens when internal model attributes vary
* Only rather small models are used (on the scale of 100M parameters) and so results are not relevant for modern LLMs

---

confidence: 2
contribution: 2
initial_rating: 5
presentation: 2
questions: - Can you help me interpret Equation (1)? My understanding is that $a$ and $b$ are POS tags, and $y_t$ is the particular POS tag at position $t$. Therefore, this is measuring whether there is a predictable relationship that when $y_t=a$, then $y_{t+\\Delta t}=b$. What is the purpose of the second term? Does it serve as some kind of normalization, to account for the base frequency of $y_t=a$ and $y_{t+\\Delta t}=b$? Why are there $18 \\times 17/2$ possible pairs $a$ and $b$? I would have assumed $18^2$?
- L. 240: "The plateau value increases with the position $t$ of the former tag." Is this true? It looks like the green line ($t=15$) is ordered between purple ($t=0$) and blue ($t=3$).
- L. 244: What is "the prefactor" of the decay? I am again failing to see a reliable trend for $t$, since it seems like $t=0$, $t=63$, and $t=225$ all have extreme error bars, while $t=3$ and $t=15$ do not.
- L. 301: What does it mean for a spectrum to be featureless?
- For the power spectra analysis, I can see how the plots at different temperatures look different, but why is there *singular* behavior at $T=1.0$?
- In Figure 5, doesn't $v(t)$ immediately reach its limiting value for $T=1.0$, contrary to what's written in the paper?
soundness: 2
strengths: This paper investigates whether LLMs go through phase transition with the temperature parameter. This (I believe) contrasts with much of the literature, which is about the possibility of a phase transition with the size of the model. The statistics that the authors introduce may have value for future work that aims to study structural features of LLM generations.

The writing and organization are clear, and the figures are clearly explained.
summary: This paper argues that LM generations undergo a phase transition at temperature $T = 1$. Specifically, they generate texts from GPT-2 using different temperatures (conditioned on only the BOS token), and map each text into a sequence of POS tags (though the focus only on PROPN), and study three features of the POS tags.

1. **Correlation between two tags:** The authors study whether PROPN tags are correlated at particular intervals in the text. They find the integrated correlation $\\tau$ between PROPN and PROPN saturates to a finite value for $T>1.0$, which means correlation decays faster than critical decay, whereas for $T<1.0$, $\\tau$ diverges, which means the correlation converges to a finite value. In other words, sequences with $T<1$ have long-range correlation between POS tags, and sequences above $T>1$ converge to zero correlation.
2. **Power spectra of POS sequences**: The authors study whether there is periodic appearance of the PROPN tag via the power spectrum. Again, there appears to be long-range order at $T<1.0$, but at $T>1.0$ the spectrum is featureless.
3. **Time evolution of POS sequences:** The authors study the probability of the PROPN tag at time $t$. They find that this probability converges quickly to a limiting value for $T<1.0$ and $T>1.0$, but converges much more slowly for values close to $T\approx 1.0$.
weaknesses: - There are obvious empirical concerns: namely, in the main paper, the authors only study GPT-2 small, and all of the analysis is specifically about the structure of where the proper noun PROPN tag occurs in generated text. This must be quite narrow, and it would be more convincing if the authors could summarize the results for other models and other POS tags in the main paper (they are referenced as being in the Appendix, which I did not read).
- This is very far from my area of expertise, but I am not convinced that there is truly *singularity* at $T=1.0$. In their analysis in §4.2 (power spectra) and §4.3 (time evolution), the model seems to demonstrate continuous behavior around $T=1.0$. In particular, I am looking at Figure 3 (A), where the peak in integrated correlation actually occurs at $T=1.1$, and Figure 5, where the values neighboring $T=1.0$ (from $0.9$ to $1.2$) all behave qualitatively similarly to $T=1.0$. This makes me worried that the paper is just showing that generations have structurally different qualities for small $T$ and large $T$, which is somewhat obviously true because $T$ directly controls the peakiness of the LM prediction, such that low $T$ will be highly redundant and high $T$ will be quite degenerate (esp. for GPT-2 era models).
- It is not clear to me how important the authors' findings are for the community. They mention their results suggest "a meaningful analogy between LLMs and natural phenomena," but the analogy was not clear to me from reading the paper. Are there practical insights about what LMs are learning or how we should build future LMs?
- There seems to be [related work](https://community.wolfram.com/groups/-/m/t/2958851) from 2023 that also studies phase transition at $T=1.0$, which the authors mention, and the distinction in their contributions is not clear to me. This may lessen the novelty of their work.

---

confidence: 3
contribution: 3
initial_rating: 6
presentation: 4
questions: 1. In what ways will the understanding of phase transition impact future LLM works?
soundness: 3
strengths: 1. The project fosters the understanding of LLMs from an interesting angle of phase transition.
2. The experiments are well designed and cleared documented.
summary: This paper investigates whether phase transitions occur in Large Language Models (LLMs). The authors conduct a statistical analysis of sequences generated by GPT-2 at various temperatures and found the phase transition occurs.
weaknesses: 1. While LLMs develop fast over the past few years, this work tests on GPT-2, instead of newer generations of models.

---

confidence: 4
contribution: 2
initial_rating: 3
presentation: 3
questions: 1. What is the motivation behind the POS tag correlation on p. 5? It's not necessarily intuitive why a proper noun appearing at time t should be highly correlated with a proper noun appearing at time $t+\Delta t$ for large $\Delta t$ (e.g. 100 tokens later; Figure 2). What do these correlations tell us about the actual text that gets generated?
2. Consider including the word temperature in the title; phase changes often refer to transitions over the course of pretraining (https://arxiv.org/abs/2209.11895) rather than varying the temperature parameter, so it would be helpful to clarify that this paper focuses on varying temperature.
soundness: 3
strengths: 1. Drawing a connection between statistical physics and LLM text generation is very interesting.
2. The paper identifies a phase transition for multiple metrics (correlation between two tags, power spectra).
summary: This paper identifies a phase transition around temperature 1.0 when increasing the temperature parameter for LLM text generation. They focus on POS tags of generated sequences, finding a phase change in (1) the correlation of POS tags at two time points (for some time change $\Delta t$) and (2) periodic behavior. Natural text seems to correspond to roughly temperature 1.0.
weaknesses: 1. The results for periodic behavior are nicely quantified, but slightly unsurprising (degeneration into repeated sequences for low temperature, but not high temperature; e.g. https://arxiv.org/pdf/1904.09751). Looking at the specific types of repetitive loops that the model falls into could be more informative.
2. The result that GPT-2 is closest to natural language text at T=1.0 is a bit unsurprising given that this leaves the probabilities unchanged from how they were trained. For example, we would likely expect lowest perplexity over a large corpus for T=1.0, because the model is trained to minimize loss (log-perplexity) for T=1.0.

Meta-review: This paper looks at the range of temperature values at which LLM-generated text mimics the statistical properties of natural language, framing it through the lens of phase transitions in physical systems. The authors hypothesize the existence of a singularity point on the temperature scale where LLM-generated text aligns with natural language properties, with deviations occurring at temperatures above or below this point.

While the perspective is interesting, the experimental setup and evidence supporting the hypothesis are limited. The primary finding is that LLM-generated text preserves the statistical properties of natural text at a temperature of 1. This is not really surprising and also doesn't lead to a deeper understanding of LLMs through the concept of phase transitions. This concern was shared by the reviewers.

The statistical properties examined in the study include long-range correlations of POS tags (specifically, PROPN) and the power spectra of POS tags. However, the rationale behind selecting these properties in drawing parallels with phase transitions is insufficiently justified. The reviewers also raised concerns about older and smaller LLMs being included in the experiments (models: GPT-2, pythia etc., size: <1B), essentially, not providing a complete view of the current state of LLMs. Lastly, the clarity of the writing was a recurring concern among reviewers, making the paper difficult to follow.

Overall, the study is further by its reliance on older and smaller LLMs for experiments, its narrow focus on two statistical properties, and the lack of novelty in its findings. After the author-reviewer discussion, two reviewers expressed weak acceptance (scores of 6 and 6), while the remaining two reviewers recommended rejection (scores of 3 and 3). Based on these considerations, I lean towards rejecting the paper.

Decision: Reject