Introduction

Under appropriate conditions, a cup of hot water may freeze faster than an identical cup of cold water. This counter intuitive phenomenon was documented as early as 2300 years ago1,2, but is named after A. Mpemba—a school student that rediscovered it in the 60’s3. Several mechanisms were suggested to explain the Mpemba effect in water, including: evaporation4,5, dissolved gases and solids6, convection flow7, super-cooling8, and anomalous relaxation of hydrogen bonds9.

In recent years the term “Mpemba effect" was extended, and it is now used to describe a wide range of non-monotonic relaxation phenomena. These include experimental observations of hot systems that undergo a phase transition before cold systems in non-water substances (Polymers10, Clathrate hydrates11), as well as in other types of phase transitions (Magnetic transition in alloys12 and various spin models13,14,15,16,17), relaxation towards equilibrium without a phase transition that is non-monotonous in the initial temperature18,19,20,21,22 and similar effects in relaxation towards a non-equilibrium steady states in driven molecular gas models23,24,25,26,27,28. It was also recently used to describe relaxations in which the non-monotonic characteristic is not in the initial temperature, but in some other parameter29.

Significant progress was recently achieved in understanding non-monotonic relaxations towards both equilibrium and non-equilibrium states, including a careful mathematical formulation of the problem18,30, prediction of an inverse Mpemba effect where a cold system heats up faster than a hot one18,23, and of the “strong Mepmba effect" where an exponentially faster relaxation can be achieved from specific initial temperatures20. Some of these theoretical predictions were experimentally verified in refs. 31,32. These results focus on the long time behavior of the system, and are therefore not informative for experiments and numerical simulations where the system undergoes a phase transition after a finite time, as in water, clathrate hydrates, polymers and magnetic alloys.

In this work we present a theoretical framework for the Mpemba effect through a second-order phase transition. We first define, in the context of Landau theory, the exact phase of the system throughout its relaxation process, which is naturally far from equilibrium. With this definition, the phase transition can be associated with a concrete time for any initial condition. Using this “time to phase transition", a Mpemba effect can be defined and identified. A specific mechanism for the Mpemba effect through such a transition is then demonstrated with a concrete example of a Landau free energy.

Throughout the manuscript we limit the discussion to the Mpemba effect through a second-order phase transition. To keep the description simple, from this point on we use the term Mpemba effect to describe the scenario in which it takes less time for an initially hot system to undergo a second-order phase transition in comparison to an initially colder system.

Results

Non-equilibrium phase transition at finite time

The existence of the Mpemba effect considered in this manuscript is determined by the time it takes the system to undergo a second-order phase transition as a function of the initial temperature, when the system is quenched to a cold environment. However, during the relaxation process the system is generically not in an equilibrium state associated with any temperature, and it is not always possible to define the phase of the system in these cases. Moreover, in many types of dynamics (e.g., coarsening dynamic33), the phase transition happens only in the infinite time limit. Other finite time phase transitions out of equilibrium are not associated with the mean value of the order parameter, but rather with its fluctuations34, and are therefore not useful in the context of the Mpemba effect. For these reasons, we first suggest a simple definition for the moment in time at which the phase transition happens when the system is coupled to an infinite, memory-less heat bath, and which is finite in some relevant class of models. In the spirit of the Landau theory, we consider mean-field theories, i.e. models without any spatial dependence.

The phases of the system

Consider a system that can be characterized by a set of macroscopic parameters x1, …, xn. These are often represented, for short handed, as \(\overrightarrow{x}=({x}_{1},...,{x}_{n})\). Some of these parameters, say x1, …, xm are the order parameters, i.e., their value determines the phase of the system. We assume that these order parameters are normalized by the number of particles in the system, e.g., the mean magnetization, etc. For simplicity, in what follows we assume that there is a single order parameter in the system, x1. We denote the value of \(\overrightarrow{x}\) that corresponds to equilibrium with respect to some bath temperature Tb by \({\overrightarrow{x}}^{{{{{{{{\rm{eq}}}}}}}}}({T}_{b})\). Upon quenching the system to a different temperature, the macroscopic parameters evolve in the \(\overrightarrow{x}\) configuration space towards their new equilibrium value.

Typically, an order parameter in a second-order phase transition is defined such that it is zero in one phase and non-zero in another phase. In this case the two phases are therefore characterized by the equilibrium value of the order parameter,

$${x}_{1}^{{{{{{{{\rm{eq}}}}}}}}}({T}_{b})\left\{\begin{array}{ll}=0,\quad{{{{{{{\rm{disordered}}}}}}}},\quad &{T}_{b}\,\ge\, {T}_{c}\\ \ne 0,\,\hfill{{{{{{{\rm{ordered}}}}}}}},\hfill &{T}_{b} \, < \, {T}_{c}\end{array}\right.$$
(1)

where Tc is the critical temperature of the model. For simplicity we consider here the common case where above Tc the system is disordered and consequently \({x}_{1}^{{{{{{{{\rm{eq}}}}}}}}}=0\), whereas below Tc the system is in one of the ordered phases and \({x}_{1}^{{{{{{{{\rm{eq}}}}}}}}}\) is either negative or positive. We comment on the less common case where the system is ordered for Tb > Tc and disordered for Tb < Tc in Discussion section.

Landau free energy

We denote the Landau free energy per particle of the system, which is defined for any value of the macroscopic parameters \(\overrightarrow{x}\), by \(f(\overrightarrow{x};{T}_{b})\). The equilibrium configuration of the system at temperature Tb corresponds to the global minimum of \(f(\overrightarrow{x};{T}_{b})\), namely

$${\overrightarrow{x}}^{{{{{{{{\rm{eq}}}}}}}}}({T}_{b})=\arg \mathop{\min }\limits_{\overrightarrow{x}}f(\overrightarrow{x};{T}_{b}).$$
(2)

We note that commonly \(f(\overrightarrow{x};{T}_{b})\) has more than one minimum, e.g., in a ferromagnet for T < Tc the minima corresponding to ‘up’ and ‘down’ magnetizations are identical, and so the minimizer of the above equation is not unique. In this case, it should be understood that one of these minima is arbitrarily chosen.

To date, there is no single theory for the dynamics of the macroscopic parameters under all non-equilibrium conditions, but several models are often used to describe specific non-equilibrium scenarios. To describe the relaxation towards an equilibrium state, we use the common assumption33 that the dynamic of the xi parameters is given by the negative gradient of \(f(\overrightarrow{x};{T}_{b})\) and a stochastic noise,

$${\dot{x}}_{i}=-\frac{\partial f(\overrightarrow{x};{T}_{b})}{\partial {x}_{i}}+{\xi }_{i}.$$
(3)

This form corresponds to Model A in the classification of Hohenberg and Halperin (see Eqs. (4.1) in ref. 35), but our results hold for other types of dynamic as well. \(\overrightarrow{\xi }\) is a noise associated with the external bath temperature, 〈ξi(t)〉 = 0 and 〈ξi(t)ξj(τ)〉 = 2N−1Tbδ(t − τ)δij. With this definition for the noise, the steady state distribution associated with Eq. (3) is the Boltzmann distribution,

$$P(\overrightarrow{x},{T}_{b})={e}^{-Nf(\overrightarrow{x},{T}_{b})/{T}_{b}}/Z,$$
(4)

where

$$Z=\int{d}^{d}x{e}^{-Nf(\overrightarrow{x},{T}_{b})/{T}_{b}}$$

is the partition function. Note that the noise was chosen such that \(f(\overrightarrow{x},{T}_{b})\) is indeed the free energy per particle, as is evident from Eq. (4). At each extremum point of \(f(\overrightarrow{x};{T}_{b})\), the first term on the right hand side of Eq. (3) vanishes. Thus, even though the noise is negligible in the thermodynamic limit, without the noise term all of these points were stationary. This is the desired property of the minima of the free energy, but not of its other types of extremum points. The noise term remedies this issue even for very large N: the system remains in the vicinity of its minima, but not near any other types of fixed points.

The phase of a non-equilibrium state

Consider a quench protocol that takes a system that is prepared in equilibrium at Tinit > Tc, corresponding to the disordered phase, and connects it to a bath at Tb < Tc, corresponding to the ordered phase. Thus the system is initiated at x1(t = 0) = 0, and ends at x1(t = ) ≠ 0.

To identify the phase-transition time, it is natural to consider the moment in time at which the system has changed from the disordered phase to the ordered phase, manifested in the growth of ∣x1∣. By Eq. (3), the dynamic of x1 is dictated by the effective free energy \(f(\overrightarrow{x};{T}_{b})\) that acts as a potential that guides the system towards its equilibrium state. As we assume spontaneous symmetry breaking around x1 = 0, namely that \({\partial }_{{x}_{1}}f({x}_{1}=0,{x}_{2},...,{x}_{n};{T}_{b})=0\), the growth of ∣x1∣ is determined by the second derivative in the x1 direction of \(f(\overrightarrow{x};{T}_{b})\) around the hyper-plane (x1 = 0, x2, …, xn). For \({\partial }_{{x}_{1}}^{2}f({x}_{1}=0,{x}_{2},\ldots ,{x}_{n};{T}_{b}) \, > \, 0\), the effective free energy confines x1 around x1 = 0, whereas for \({\partial }_{{x}_{1}}^{2}f({x}_{1}=0,{x}_{2},\ldots ,{x}_{n};{T}_{b}) \, < \, 0\), the effective free energy pushes x1 towards a non-zero value. In the latter case, the specific noise realization breaks the symmetry and dictates whether x1 becomes positive or negative.

We therefore define the phase-transition time tc as the smallest time t that solves the following equation:

$${\partial }_{{x}_{1}}^{2}f\left(\langle \overrightarrow{x}(t)\rangle ;{T}_{b}\right)=0,$$
(5)

where \(\overrightarrow{x}(t=0)\) is sampled from the equilibrium corresponding to the initial temperature Tinit, \(\overrightarrow{x}(t)\) follows the dynamic in Eq. (3) and where 〈 ⋯  〉 denotes averaging over both noise realizations and sampling of \(\overrightarrow{x}(t=0)\).

The phase-transition time tc can be alternatively defined by taking the average over the full stability expression, namely, the smallest time t that solves (compare with Eq. (5))

$$\left\langle {\partial }_{{x}_{1}}^{2}f\left(\overrightarrow{x}(t);{T}_{b}\right)\right\rangle =0.$$
(6)

As in the case of Eq. (5) the angular brackets 〈 ⋯  〉 denote averaging over both noise realizations and sampling of \(\overrightarrow{x}(t=0)\). It is not clear a priori which definition is favorable. However, we show in Methods section that the two definitions provide very close results for the examined system.

In Methods section we demonstrate these definitions of tc for a concrete, microscopic model—the mean-field anti-ferromagnetic Ising model under the Glauber dynamics36. We show the following properties of the phase-transition time tc: (i) It can be defined in a more general setting of relaxation dynamics than considered in Eq. (3), namely a dynamic which is not the gradient of the free energy; (ii) It is finite even in the thermodynamic limit; and (iii) Its variance decreases with the system size, and therefore tc is well behaved in the thermodynamic limit.

The Mpemba effect

Definition

Once the exact time at which the phase transition happens has been defined, the definition of the Mpemba effect follows. We say that a Mpemba effect exists in the system if: (i) The system has a phase transition at some critical temperature Tc, such that Eq. (1) holds; (ii) There exist two initial temperatures above the critical temperature, \({T}_{{{{{{{{\rm{init}}}}}}}}}^{{{{{{{{\rm{hot}}}}}}}}} \, > \, {T}_{{{{{{{{\rm{init}}}}}}}}}^{{{{{{{{\rm{cold}}}}}}}}} \, > \, {T}_{c}\), and a bath temperature below it, Tb < Tc, such that when quenched to the bath temperature Tb, the time tc to reach the phase transition as defined in Eq. (5) is smaller for the system initiated at the higher temperature \({T}_{{{{{{{{\rm{init}}}}}}}}}^{{{{{{{{\rm{hot}}}}}}}}}\) than for a system initiated at the lower temperature \({T}_{{{{{{{{\rm{init}}}}}}}}}^{{{{{{{{\rm{cold}}}}}}}}}\).

Note that some works did not consider a crossing between the relaxation trajectories, but instead compared the rate at which they diverge in the thermodynamic limit37. Others defined the Mpemba effect by crossing of trajectories in some coarse-grained parameter space representing the system24. In contrast, the definition provided here does not consider such crossing. Each initial temperature provides a phase-transition time, tc = tc(Tinit). By comparing these times for two temperatures \({T}_{{{{{{{{\rm{init}}}}}}}}}^{{{{{{{{\rm{cold}}}}}}}}}\) and \({T}_{{{{{{{{\rm{init}}}}}}}}}^{{{{{{{{\rm{hot}}}}}}}}}\) the existence of the Mpemba effect is determined. Therefore, the paths the different trajectories take in the parameters space is irrelevant for this definition.

Mean-field systems with one macroscopic parameter

In the case of n = 1, there is only one macroscopic parameter x1 which is therefore also the order parameter. This means that the effective free energy has, in the close vicinity of the phase transition, the familiar form

$$f({x}_{1};{T}_{b})={a}_{0}({T}_{b}-{T}_{c}){x}_{1}^{2}+{b}_{0}{x}_{1}^{4},$$
(7)

where a0, b0 > 0 are phenomenological constants and the free energy is expanded around the phase-transition point only to the fourth order in x1. Indeed, for Tb > Tc there is one minimum at x1 = 0 corresponding to the disordered phase, whereas for Tb < Tc there are two minima at \({x}_{1}=\pm \sqrt{{a}_{0}({T}_{B}-{T}_{c})/(2{b}_{0})}\).

For any initial temperature Tinit > Tc, the initial configuration sampled from the equilibrium corresponding to Tinit, thus \({\left\langle {x}_{1}(t = 0)\right\rangle }_{{T}_{{{{{{{{\rm{init}}}}}}}}}}=0\). For any bath temperature Tb < Tc the effective free energy is unstable at x1 = 0, namely \({\partial }_{{x}_{1}}^{2}f(0;{T}_{b}) \, < \, 0\), and therefore by the definition of tc, Eq. (5), the phase transition happens instantaneously.

Hence, in mean-field models that have a single macroscopic parameter, as the ferromagnetic Ising model, all hot temperatures cross the phase transition at zero time, and consequently there cannot be a Mpemba effect as defined above. We note, however, that for non-mean-field models, the mean value of a single order parameter does not dictate the state of the system, and thus it is possible to have a Mpemba effect even if there is a single order parameter in the problem, as in a ferromagnetic 2D Ising model15.

Mean-field systems with two macroscopic parameters

As we next show, when the configuration space is characterized by at least two macroscopic parameters, the phase transition can occur at some non-zero time. Therefore, in such systems the Mpemba effect is plausible.

Consider the case where there are two macroscopic parameters, \(\overrightarrow{x}=({x}_{1},{x}_{2})\), with x1 being the order parameter that corresponds to a spontaneous symmetry breaking, whose value determines the phase of the system according to Eq. (1). We assume that f is symmetric with respect to x1 = 0 at all temperatures. In this case, for fixed values of x2 and Tb, f(x1, x2; Tb) as a function of x1 has either a minimum or a maximum at x1 = 0. Thus, it is possible that for some temperature T the free energy surface has a range of x2 values for which f(x1, x2; Tb) is stable with respect to x1, and a different range of x2 values for which it is unstable with respect to x1. If the initial condition corresponds to an average value that is in the stable region of f, then in most realizations, the initial condition of the system is sampled from the stable region, and its dynamic, governed by Eq. (3), guides the system to the unstable region. In such a case, a phase transition happens after a finite time.

The above scenario is demonstrated by the free energy surface plotted in Fig. 1a. This specific free energy is constructed in section Example of a system with a Mpemba effect. The black line, which we denote by \({x}_{2}={x}_{2}^{{{{{{{{\rm{st}}}}}}}}}\), separates between a stable region (gray) and an unstable region (orange). Initial conditions in the stable region, such as the blue and red dots, would stay confined around the x1 = 0 line, for most noise realizations. Once the system crosses to the unstable region, x1 is no longer confined, and the noise pushes the system towards one of the minima. An example for such a trajectory is plotted in purple in Fig. 1a. Therefore, in this two-dimensional configuration space different initial conditions cross the phase transition at different non-zero finite times. This implies that a Mpemba effect is plausible. In the next section we provide a concrete example that demonstrates the Mpemba effect as defined above.

Fig. 1: Mpemba through a phase transition.
figure 1

A concrete example of a free energy demonstrating both a phase transition occurring after a finite time and a Mpemba effect. The explicit form of the free energy f(x1, x2; Tb) is given in Eqs. (9), (10), (13), (14)). a The free energy surface evaluated at Tb = 0.1 < Tc. The green line, x1 = 0, corresponds to all equilibrium values at the disordered phase. The purple line is an example of a trajectory which starts at \({\overrightarrow{x}}^{{{{{{{{\rm{eq}}}}}}}}}({T}_{{{{{{{{\rm{init}}}}}}}}}^{{{{{{{{\rm{cold}}}}}}}}})\) (the blue dot), and follows Eq. (3) for some random noise realization. The stability in the x1 direction along the x1 = 0 line changes throughout the trajectory—the black line separates between the stable region (gray) and the unstable region (orange). Crossing this line defines the phase transition, and it happens at a non-zero finite time. The red and blue dots correspond to hot and cold initial equilibria in the disordered phase, i.e., to \({\overrightarrow{x}}^{{{{{{{{\rm{eq}}}}}}}}}({T}_{{{{{{{{\rm{init}}}}}}}}}^{{{{{{{{\rm{hot}}}}}}}}})\) and \({\overrightarrow{x}}^{{{{{{{{\rm{eq}}}}}}}}}({T}_{{{{{{{{\rm{init}}}}}}}}}^{{{{{{{{\rm{cold}}}}}}}}})\), respectively. The black dots correspond to the symmetric equilibria of the bath temperature Tb = 0.1. Observing the trajectory governed by the free energy surface, it is clear that as the colder initial condition must first reach the hotter initial condition, the colder initial condition takes more time, and so this system exhibits the Mpemba effect. b The equilibrium line \({\overrightarrow{x}}^{{{{{{{{\rm{eq}}}}}}}}}(T)\) of the free energy determined by Eq. (2). Temperatures range from T = 0 (blue) to T =  (red). The black, blue, and red dots correspond the same dots of panel a, i.e., to \({\overrightarrow{x}}^{{{{{{{{\rm{eq}}}}}}}}}({T}_{b}),{\overrightarrow{x}}^{{{{{{{{\rm{eq}}}}}}}}}({T}_{{{{{{{{\rm{init}}}}}}}}}^{{{{{{{{\rm{cold}}}}}}}}})\) and \({\overrightarrow{x}}^{{{{{{{{\rm{eq}}}}}}}}}({T}_{{{{{{{{\rm{init}}}}}}}}}^{{{{{{{{\rm{hot}}}}}}}}})\), respectively. It is clear that the hotter initial condition is closer to Tb than the colder initial condition. The black line corresponds to the black line in panel a, namely it separates the stable region and the unstable regions at Tb = 0.1. c The free energy surface evaluated at Tb = 1.4 > Tc. This temperature is denoted as \({T}_{{{{{{{{\rm{init}}}}}}}}}^{{{{{{{{\rm{hot}}}}}}}}}\) and therefore the minimum of \(f(\overrightarrow{x};{T}_{{{{{{{{\rm{init}}}}}}}}}^{{{{{{{{\rm{hot}}}}}}}}})\) is obtained by \({\overrightarrow{x}}^{{{{{{{{\rm{eq}}}}}}}}}({T}_{{{{{{{{\rm{init}}}}}}}}}^{{{{{{{{\rm{hot}}}}}}}}})\) as seen in the plot. The green line corresponds to the symmetry line x1 = 0. It is demonstrated that x1 = 0 is stable for all values of x2 at this temperature. The stability of x1 = 0 holds for all temperatures above Tc.

Example of a system with a Mpemba effect

Required features for the Mpemba effect

In this section we show that a Mpemba effect can exist in a system with two macroscopic parameters, namely for \(\overrightarrow{x}=({x}_{1},{x}_{2})\). Before providing a concrete example, let us first explain the basic idea, demonstrated in Fig. 1. To this end, we consider for each bath temperature Tb the corresponding 2d free energy surface, f(x1, x2; Tb). The global minima of this surface dictates the equilibrium values, \({x}_{1}^{{{{{{{{\rm{eq}}}}}}}}}({T}_{b})\) and \({x}_{2}^{{{{{{{{\rm{eq}}}}}}}}}({T}_{b})\). At some critical temperature Tc, \({x}_{1}^{{{{{{{{\rm{eq}}}}}}}}}({T}_{b})\) changes from \({x}_{1}^{{{{{{{{\rm{eq}}}}}}}}}=0\) for Tb > Tc to \({x}_{1}^{{{{{{{{\rm{eq}}}}}}}}}\,\ne\, 0\) for Tb < Tc. We denote \({x}_{2}^{* }\equiv {x}_{2}^{{{{{{{{\rm{eq}}}}}}}}}({T}_{c})\), namely the value of \({x}_{2}^{{{{{{{{\rm{eq}}}}}}}}}\) at the critical temperature.

To observe the Mpemba effect, the system is sampled from two different Boltzmann distributions with temperatures in the hot temperature phase, where \({x}_{1}^{{{{{{{{\rm{eq}}}}}}}}}=0\). The difference between the initial conditions at \({T}_{{{{{{{{\rm{init}}}}}}}}}^{{{{{{{{\rm{hot}}}}}}}}}\) and \({T}_{{{{{{{{\rm{init}}}}}}}}}^{{{{{{{{\rm{cold}}}}}}}}}\) is therefore not in their x1, but rather in their x2 mean values. We construct \(f(\overrightarrow{x};{T}_{b})\) such that \({x}_{2}^{{{{{{{{\rm{eq}}}}}}}}}({T}_{b})\) is non-monotonic in Tb, and is maximal at Tc, so that \({x}_{2}^{* }\) is the maximal equilibrium value of x2. This feature exists for example in the mean-field anti-ferromagnet Ising model in the presence of a weak external magnetic field (see ref. 38 as well as the Methods section). The “equilibrium line” of the model described in what follows is plotted over the (x1, x2) plane in Fig. 1b, and it demonstrates this feature.

The next feature we describe regards the stability of the system, determined by f(x1, x2; Tb), with respect to its symmetric coordinate x1. At the cold bath temperature Tb, the free energy surface should have the following property: the symmetry line of the system, x1 = 0 (the green line in Fig. 1a), has two different regions—one stable in the x1 direction and the other unstable in the x1 direction. The stability of the system with respect to x1 on the symmetry line x1 = 0 is given by the sign of the second derivative \({\partial }_{{x}_{1}}^{2}f({x}_{1}=0,{x}_{2};{T}_{b})\): if it is positive the system is stable, and if it is negative the system is unstable. Having two different regions of stability, means that the stability changes as a function of x2. The simplest setting for these two regions is having one point, which we denote the stability point \({x}_{2}^{{{{{{{{\rm{st}}}}}}}}}\), separating between the stable and unstable regions. The presented example adheres to this simple setting, as shown in Fig. 1a—the black line is located at \({x}_{2}={x}_{2}^{{{{{{{{\rm{st}}}}}}}}}\) and it separates between the stable region (gray) and the unstable region (orange). These conditions are summarized by

$${\partial }_{{x}_{1}}^{2}f({x}_{1}=0,{x}_{2};{T}_{b})\left\{\begin{array}{ll} \, < \, 0,\quad &\quad{{{{{{{\rm{for}}}}}}}}\,0 \, < \, {x}_{2} \, < \, {x}_{2}^{{{{{{{{\rm{st}}}}}}}}}\\ =0,\quad &{{{{{{{\rm{for}}}}}}}}\,{x}_{2}={x}_{2}^{{{{{{{{\rm{st}}}}}}}}}\\ \, > \, 0,\quad &\qquad{{{{{{{\rm{for}}}}}}}}\,{x}_{2}^{{{{{{{{\rm{st}}}}}}}}} \, < \, {x}_{2} \, < \, {x}_{2}^{* }.\end{array}\right.$$
(8)

The form of the Landau free energy

Let us demonstrate the above idea with a concrete construction of f(x1, x2; Tb). The Landau free energy has the following form:

$$f({x}_{1},{x}_{2};{T}_{b})=\gamma ({x}_{2},{T}_{b})+\psi ({x}_{2},{T}_{b}){x}_{1}^{2}+{x}_{1}^{4}.$$
(9)

It is composed of \({x}_{1}^{0}\), \({x}_{1}^{2}\) and \({x}_{1}^{4}\) terms, which is the simplest form for a system with a second-order phase transition for x1. The x2 dependence of the effective free energy in Eq. (9) is chosen as follows.

First, the function γ(x2, Tb) determines the minima with respect to x2 in the hot phase Tb > Tc, where \({x}_{1}^{{{{{{{{\rm{eq}}}}}}}}}=0\). We set it as

$$\gamma ({x}_{2},{T}_{b})= \, 5{({x}_{2}-y({T}_{b}))}^{2}\\ y({T}_{b})= \, {\left(\frac{{T}_{b}}{{T}_{c}}\right)}^{2}{e}^{-{\left({T}_{b}/{T}_{c}\right)}^{2}},$$
(10)

where Tc is the critical temperature of the model. We set Tc = 1 in all the figures in this manuscript. For a fixed Tb, the minimum of γ(x2, Tb) is located at x2 = y(Tb), which is a non-monotonic function of Tb with a single maximum at Tc, where \(y({T}_{c})={x}_{2}^{* }={e}^{-1}\approx 0.37\).

Next, we construct ψ(x2, Tb) such that (i) It generates the second-order phase transition at Tb = Tc; (ii) It does not alter the non-monotonic behavior of \({x}_{2}^{{{{{{{{\rm{eq}}}}}}}}}({T}_{b})\); (iii) At low temperatures (below Tc) the stability of symmetry line x1 = 0 changes as a function of x2 in the range of the equilibrium values \((0,{x}_{2}^{* })\). Namely, the stability point \({x}_{2}^{{{{{{{{\rm{st}}}}}}}}}\) satisfies \(0 \, < \, {x}_{2}^{{{{{{{{\rm{st}}}}}}}}} \, < \, {x}_{2}^{* }\).

To have a phase transition in the x1 coordinate at Tc, we require that

$$\left.\psi \left({x}_{2}^{{{{{{{{\rm{eq}}}}}}}}}({T}_{b}),{T}_{b}\right)\right)\left\{\begin{array}{ll} \, > \, 0,\quad &{{{{{{{\rm{for}}}}}}}}\,{T}_{b} \, > \, {T}_{c}\\ =0,\quad &{{{{{{{\rm{for}}}}}}}}\,{T}_{b}={T}_{c}\\ \, < \, 0,\quad &{{{{{{{\rm{for}}}}}}}}\,{T}_{b} \, < \, {T}_{c}.\end{array}\right.$$
(11)

In addition, to make the equilibrium of Tinit > Tc stable in the x1 direction for dynamics with bath temperature at Tb < Tc, we require that \(\psi \left({x}_{2}^{{{{{{{{\rm{eq}}}}}}}}}({T}_{{{{{{{{\rm{init}}}}}}}}} \, > \, {T}_{c}),{T}_{b} \, < \, {T}_{c}\right) \, > \, 0\). Combining this condition with the condition in Eq. (11) for Tb < Tc and Tinit > Tc, we find these two conditions

$$\begin{array}{l}\psi \left({x}_{2}^{{{{{{{{\rm{eq}}}}}}}}}({T}_{{{{{{{{\rm{init}}}}}}}}}),{T}_{b}\right) \, > \, 0\\ \psi \left({x}_{2}^{{{{{{{{\rm{eq}}}}}}}}}({T}_{b}),{T}_{b}\right) \, < \, 0.\end{array}$$
(12)

The conditions in Eqs. (11), (12)) are demonstrated graphically in Fig. 1a, c.

A simple way to fulfill all the demands for ψ(x2, Tb) is by a parabola in x2 that changes as a function of temperature:

$$\psi ({x}_{2},{T}_{b})=a{x}_{2}^{2}+b({T}_{b}){x}_{2}+c({T}_{b}).$$
(13)

The temperature dependence of the parabola is captured graphically by Fig. 2. For Tb > Tc, ψ(x2, Tb) > 0 for all values of x2. At Tb = Tc, it is positive at all values of x2 except for \({x}_{2}={x}_{2}^{* }\), where \(\psi ({x}_{2}^{* },{T}_{c})=0\). For Tb < Tc, it is negative for some values of x2, including \({x}_{2}^{{{{{{{{\rm{eq}}}}}}}}}({T}_{b})\), but positive for some \({x}_{2} \, < \, {x}_{2}^{* }\). Note that the roots of ψ(x2, Tb), which exist only for TbTc, determine the boundaries of the stability regions. For low enough temperatures, the smaller root of ψ(x2, Tb) is negative, and so only the larger root is in the range of the model’s parameters. Thus this single root is exactly the stability point \({x}_{2}^{{{{{{{{\rm{st}}}}}}}}}\), see for example the green dot in Fig. 2. A concrete choice that adheres to this behavior is given by

$$a= \,80\\ b({T}_{b})= \, -10a{x}_{2}^{* }\frac{{T}_{b}}{{T}_{c}}\\ c({T}_{b})= \, 5{x}_{2}^{* }\left(\frac{{T}_{b}}{{T}_{c}}-1\right)+5a{({x}_{2}^{* })}^{2}{\left(\frac{{T}_{b}}{{T}_{c}}\right)}^{2}.$$
(14)

We note that the f constructed above is at most quadratic in x2, and that the coefficients of \({x}_{2}^{2}\) in both γ and ψ are positive—therefore the free energy has a minimum at all temperatures.

Fig. 2: Stability vs. temperature.
figure 2

ψ(x2, Tb), as defined in Eqs. (13), (14)), is a parabola that slides on the linear line \(5({x}_{2}-{x}_{2}^{* })\) (black) as a function of temperature. The minimum of the parabola coincides with the black line and is denoted by white dots. For Tb > Tc, ψ is strictly positive; for Tb = Tc, ψ is non-positive only at \({x}_{2}={x}_{2}^{* }\), where it zeros; for Tb < Tc, ψ is both positive and negative. The contrast between these positive and negative regions at Tb < Tc exactly accomplishes the wanted behavior in Fig. 1a, which is encapsulated by Eq. (8). The point x2 where ψ vanishes corresponds to the stability point \({x}_{2}^{{{{{{{{\rm{st}}}}}}}}}\) (such a point is denoted in green in the Fig. for Tb = 0.2) that separates between the stable region and the unstable region. It corresponds to the black line in Fig. 1a, b.

Existence of the Mpemba effect

The Landau free energy f(x1, x2; Tb = 0.1) given in Eqs. (9), (10), (13), (14)) is plotted in Fig. 1a. By complying with the features explained above, it demonstrates the Mpemba effect: the blue and red dots correspond to \({\overrightarrow{x}}^{{{{{{{{\rm{eq}}}}}}}}}({T}_{{{{{{{{\rm{init}}}}}}}}}^{{{{{{{{\rm{cold}}}}}}}}})\) and \({\overrightarrow{x}}^{{{{{{{{\rm{eq}}}}}}}}}({T}_{{{{{{{{\rm{init}}}}}}}}}^{{{{{{{{\rm{hot}}}}}}}}})\), respectively. In both cases, following the dynamic in Eq. (3), x2 decreases as a function of time, and reaches the stability line (the black line in Fig. 1a) at finite time. Crossing from the stable region to the unstable region, x1 is deflected from the x1 = 0 line. As the cold (blue) initial condition \({\overrightarrow{x}}^{{{{{{{{\rm{eq}}}}}}}}}({T}_{{{{{{{{\rm{init}}}}}}}}}^{{{{{{{{\rm{cold}}}}}}}}})\) passes by the hot (red) initial condition \({\overrightarrow{x}}^{{{{{{{{\rm{eq}}}}}}}}}({T}_{{{{{{{{\rm{init}}}}}}}}}^{{{{{{{{\rm{hot}}}}}}}}})\), and they follow the same dynamic, it takes longer time for the cold initial condition to reach the phase-transition line than the hot initial condition. Thus the Mpemba effect exists.

Finally, let us analyze the range of temperatures for which the Mpemba effect occurs. The phase-transition time is a function of both the bath and initial temperatures, namely tc(Tinit, Tb). If for some value of Tb, the phase-transition time has \({t}_{c}({T}_{{{{{{{{\rm{init}}}}}}}}}^{{{{{{{{\rm{hot}}}}}}}}}) \, < \, {t}_{c}({T}_{{{{{{{{\rm{init}}}}}}}}}^{{{{{{{{\rm{cold}}}}}}}}})\) (which means that the hot system crosses to the ordered phase faster), then we have a Mpemba effect. Recall that in this analysis we require that Tinit > Tc and Tb < Tc.

To understand the dependence of the phase-transition time tc on the initial temperature Tinit and the bath temperature Tb, note that Tinit sets the initial value of \({x}_{2}^{0}\equiv {x}_{2}(t=0)\), and Tb sets the stability line \({x}_{2}^{{{{{{{{\rm{st}}}}}}}}}\) (recall Eq. (8)). As \({x}_{2}^{{{{{{{{\rm{eq}}}}}}}}}({T}_{{{{{{{{\rm{init}}}}}}}}})\) is a decreasing function (for Tinit > Tc), increasing Tinit means that the initial value \({x}_{2}^{0}\) decreases and starts closer to \({x}_{2}^{{{{{{{{\rm{st}}}}}}}}}\). Thus we expect that for high enough Tinit, the initial condition starts in the unstable region, \({x}_{2}^{0} \, < \, {x}_{2}^{{{{{{{{\rm{st}}}}}}}}}\), and so the phase transition happens instantaneously, namely tc = 0.

Next, consider the dependence of tc on the bath temperature Tb. As Tinit increases, the position of the stability line \({x}_{2}^{{{{{{{{\rm{st}}}}}}}}}\) increases as well. To see this, note that the stability line \({x}_{2}^{{{{{{{{\rm{st}}}}}}}}}\) is given by the greater root of ψ(x2, Tb) (Eq. (9)). Increasing Tb increases the roots of ψ(x2, Tb), as can be seen in Fig. 2. Therefore, increasing Tb means that the range of initial temperatures which have non-zero tc gets smaller. These two features are apparent in Fig. 3, where tc is plotted as a function of Tinit and Tb. The Mpemba effect therefore exists for all triplets \({T}_{b} \, < \, {T}_{{{{{{{{\rm{init}}}}}}}}}^{{{{{{{{\rm{cold}}}}}}}}} \, < \, {T}_{{{{{{{{\rm{init}}}}}}}}}^{{{{{{{{\rm{hot}}}}}}}}}\) such that the point \(({T}_{b},{T}_{{{{{{{{\rm{init}}}}}}}}}^{{{{{{{{\rm{cold}}}}}}}}})\) is to the left of the red line in Fig. 3.

Fig. 3: Phase-transition time vs. initial temperature Tinit and final temperature Tb.
figure 3

Note that the initial conditions correspond to the disordered phase so Tinit > Tc, and the bath temperatures correspond to the ordered phase so Tb < Tc. As for any bath temperature Tb ⪅ 0.8, the phase-transition time tc(Tinit, Tb) is a decreasing function of Tinit, the system exhibits the Mpemba effect. The red line separates the temperatures space (Tinit, Tb) to two regions: on the left the Mpemba effect exists, whereas on the right it does not.

Discussion

In this manuscript, we used the gradient of the free energy as the force that drives the macroscopic parameters \(\overrightarrow{x}(t)\) in the thermal relaxation process, and identified the point in time at which the stability of the order parameter changes as the “phase transition time". With this identification we could define a Mpemba effect with respect to a phase transition, and construct a Landau free energy that demonstrates it. We stress that the Mpemba effect defined here is not restricted to the specific dynamics we considered (Eq. (3)). Indeed, as stability of the order parameter is generic in second-order phase transitions, the identification of the time in which the order parameter crosses from a stable region to an unstable region can be applied in other non-equilibrium relaxation models as well. We demonstrate this in Methods section, where we consider the phase-transition time for a model with a microscopic dynamics whose thermodynamic limit is not the gradient of the free energy.

Of specific interest are non-mean-field models, which correspond to more realistic systems with spatial structure. In these models a spatially dependent field is needed for a proper description. Analyzing the dynamic in Fourier components, which are commonly coupled, it might happen that the non-zero components corresponding to spatial fluctuations of the field affect the zero Fourier component, which determines the mean of the order parameter field. If the stability of the zero Fourier component changes due to the dynamics of other Fourier components, a phase transition at a finite time, and consequently a Mpemba effect might exist even in a system with a single macroscopic parameter as the ferromagnetic Ising model39. In other words, the non-zero Fourier components in statistical field theories can play the same role as x2 plays in the simple example discussed in this manuscript. A different approach for addressing large, Markovian systems is through coarse-graining procedures40,41. These offer a complementary description with respect to the effective dynamics generated by the Landau theory. However, these require identifying time-scale separations in the degrees of freedom. Such mechanisms can explain out-of-equilibrium and anomalous relaxations phenomena in weak and boundary couplings42.

The phase-transition time defined in Eq. (5) is not the only possible definition. For example, an alternative definition that can be used is the point in time at which the probability distribution of the order parameter changes from having a single maximum at x1 = 0 to having two distinguishable maxima at non-zero value of the order parameter. This phase-transition time is expected to be correlated, but delayed with respect to the phase-transition time used in this manuscript. The main advantage in such a definition is that it is experimentally and numerically easier to observe in models where direct stability analysis cannot be done. However, in this case the exact phase-transition time depends on the noise characteristics.

In contrast to the Mpemba effect in Markovian systems18,31 or in granular gases23,43, the inverse Mpemba effect—where a cold system heats faster than a hot one—is less expected in the suggested framework. In the regular effect, the two hot systems are initiated at \({x}_{1}^{{{{{{{{\rm{eq}}}}}}}}}=0\) and the phase transition happens at tc where x1(tc) = 0 becomes unstable. In the inverse effect, the two systems are expected to be initiated at some \({x}_{1}^{{{{{{{{\rm{eq}}}}}}}}}\ne 0\). Regardless of the stability in the x1 direction, most models cannot attain 〈x1(t)〉 = 0 at a finite time t, but only approach zero asymptotically at t → . Therefore it is not obvious how to identify the exact phase-transition time in this case. The inverse Mpemba effect might nevertheless exist in this framework, but in models that have a second-order phase transition between a disordered phase at cold temperature and an ordered phase at high temperature. An example for such a model is the mean-field anti-ferromagnet at some small range of magnetic field values38.

The model presented in this manuscript is phenomenological, and it would be of great interest to find a concrete, microscopic model that demonstrates the same effect. However, the temperature dependence in the free energy we constructed is quite involved. It cannot originate from a simple coarse-graining procedure that gives a linear temperature dependence as e.g., in ref. 38, but rather from a more involved procedure, e.g., the Hubbard-Stratonovich transformation44, that often results in a more complicated temperature dependent free energy.

Lastly, we note that our discussion here is limited to a second-order phase transition, whereas in various examples as water2 or clathrate hydrates11 the observed Mpemba effect happens through a first order phase transition. The non-equilibrium dynamic through a first order phase transition, e.g., “nucleation and growth”45,46, is vastly different from the dynamic discussed here, and is a main challenge for future studies.

Methods

In this section we provide an example of a phase transition at a finite time in a mean-field model.

The phase-transition time tc defined in Eq. (5) (see also an alternative definition in Eq. (6)) is quite intuitive, but to the best of our knowledge, it is not commonly used. In this section we explore its nature, and show that it behaves as one expects from a phase-transition time. To this end, we first note that tc defined in Eq. (5) (or in Eq. (6)) is already an average quantity. To understand the validity of the definition, we therefore define the (stochastic) “empirical phase-transition time" for a given realization as the minimal \({\tilde{t}}_{c}\) that solves

$${\partial }_{{x}_{1}}^{2}f\left(({x}_{1}(t),{x}_{2}(t));{T}_{b}\right)=0$$
(15)

The suggested definitions in Eqs. (5), (6)) are physically solid only if the mean time, \(\langle {\tilde{t}}_{c}\rangle\), does not diverge and its variance decreases with the system size. However, these cannot be checked at the level of a Landau theory, where the noise is somewhat synthetically added, and the thermodynamic limit is already taken. Instead, it should be considered at the microscopic level. As we demonstrate in what follows, crossing the phase transition at a finite time can be demonstrated for example in the Glauber dynamics of the mean-field anti-ferromagnetic Ising model, discussed e.g., in ref. 38. This example also serves us in demonstrating that our definition for the phase-transition time works not only for the gradient of the free energy dynamics (Eq. (3)), but also for other possible dynamics that can arise from microscopic models.

Model definition

To demonstrate the well behavior of the phase-transition time and the applicability of our definition in non-free energy gradient decent dynamics, we consider the mean-field model of the Ising anti-ferromagnet under Glauber dynamics. The equilibrium properties of the model are presented in ref. 38, and the Glauber dynamic for this model is discussed in ref. 20.

In mean-field models of spin systems, every spin interacts with all other spins in the system. As we consider the anti-ferromagnet, we divide the system into two sub-lattices of equal size where every spin in one sub-lattice interacts with all other spins in the other sub-lattice, but not with the spins on the same sub-lattice. In the mean-field picture there is no spatial structure, thus the state of the system can be described by the number of up-spins in the first sub-lattice N1, and the number of up-spins in the second sub-lattice N2,. For a system of N spins, each sub-lattice is composed of N/2 spins, and so the normalized magnetization of each sub-lattice is given by

$${y}_{1}=\frac{{N}_{1,\uparrow }-{N}_{1,\downarrow }}{N/2},\,\,{y}_{2}=\frac{{N}_{2,\uparrow }-{N}_{2,\downarrow }}{N/2},$$
(16)

where Ni,, Ni, are the number of up-spins and down-spins in sub-lattice i, respectively. In terms of y1, y2 the mean-field Hamiltonian is given by

$$H=-N\left(J{y}_{1}{y}_{2}+h({y}_{1}+{y}_{2})\right),$$
(17)

where J is the coupling constant and h is the magnetic field. For anti-ferromagnetic interactions, the coupling constant is negative, and we set J = −1 for simplicity. From these magnetizations of the sub-lattices y1, y2, follow the more informative parameters of staggered magnetization s and total magnetization m defined as

$$s=\frac{{y}_{1}-{y}_{2}}{2},\,\,m=\frac{{y}_{1}+{y}_{2}}{2}.$$
(18)

As the order of the system is encapsulated by the staggered magnetization only, using our notation of section Mean-field systems with two macroscopic parameters, the order parameter is x1 = s, and the other macroscopic parameter is x2 = m. Indeed, for h < 1 the staggered magnetization s satisfies Eq. (1), namely

$${s}^{{{{{{{{\rm{eq}}}}}}}}}(T)\left\{\begin{array}{lll}=0,&{{{{{{{\rm{disordered}}}}}}}} &T\,\ge\, {T}_{c}\\ \ne \;0,&{{{{{{{\rm{ordered}}}}}}}},\hfill &T \, < \, {T}_{c}.\end{array}\right.$$
(19)

The critical temperature Tc is a function of the magnetic field h, and it exists for small enough values of h. In what follows we assume that h is small enough for Tc to exist.

Glauber dynamics of the model

The Glauber dynamics for this system, allowing only single spin flips, was derived in ref. 20.

In the thermodynamic limit, the dynamical equations for s, m are given by

$$\dot{s}=\frac{1}{4}\left[\tanh \left(\frac{h-m+s}{{T}_{b}}\right)-\tanh \left(\frac{h-m-s}{{T}_{b}}\right)\right]-\frac{s}{2}$$
(20)
$$\dot{m}=\frac{1}{4}\left[\tanh \left(\frac{h-m-s}{{T}_{b}}\right)-\tanh \left(\frac{h-m+s}{{T}_{b}}\right)\right]-\frac{m}{2},$$
(21)

where Tb is the bath temperature. This dynamic is not the gradient flow of any potential, as can be easily checked. Therefore, it provides a different type of non-equilibrium relaxation dynamic than considered in the main text (Eq. (3)). Nevertheless, an analogous stability criterion to the one in Eq. (5) can be defined in this system too. Indeed, the stability of s at s = 0 is determined by the derivative of \(\dot{s}\) in the s direction: \({\partial }_{s}\dot{s}{| }_{s = 0,m} \, < \, 0\) corresponds to m values which are stable with respect to s, whereas \({\partial }_{s}\dot{s}{| }_{s = 0,m} \, > \, 0\) corresponds to m values which are unstable with respect to s. The explicit condition, using Eq. (20), is given by

$$\left.\frac{\partial \dot{s}}{\partial s}\right| _{s = 0,m}=\frac{1}{2}\left(\frac{1}{{T}_{b}{\cosh }^{2}\left(\frac{h-m}{{T}_{b}}\right)}-1\right)\left\{\begin{array}{ll} < 0, &{{{{{\rm{stable}}}}}}\hfill \\ > 0,&{{{{{\rm{unstable}}}}}}. \end{array}\right.$$
(22)

This function is plotted in Fig. 4 for Tb = 0.2 and h = 0.5, and it shows the two stability regions. To see how this stability condition corresponds to a measurement of the “phase transition time” tc we next consider the equilibrium line in the configuration space of the macroscopic parameters s, m.

Fig. 4: Stability of the order parameter.
figure 4

The stability of the flow on the symmetry line s = 0, \(\frac{\partial \dot{s}}{\partial s}{\left\vert \right.}_{s = 0,m}\) given in Eq. (22) for h = 0.5, Tb = 0.2. The green vertical line separates between the stable and the unstable regions.

The Equilibrium line

The equilibrium line of the model is obtained by finding the fixed points of the dynamics in Eqs. (20), (21)), i.e., by solving for \(\dot{s}=0,\dot{m}=0\) (for an alternative method see ref. 38). The equilibrium line and the dynamic properties of the model are a function of the magnetic field h. For weak magnetic fields, ∣h∣ < ∣J∣, these properties are qualitatively the same, and therefore from now on we set h = 0.5 for all the numerical calculations that are presented.

The equilibrium line, plotted in Fig. 5a, has the same qualitative shape as the example given in section Example of a system with a Mpemba effect. In particular the non-monotonicity of the equilibrium values of the magnetization as a function of temperature, meq(T), which has a maximum at Tc is qualitatively the same.

Fig. 5: Finite time phase transition in the mean-field Ising model.
figure 5

a The equilibrium line of the anti-ferromagnet for h = 0.5. The equilibrium line corresponds to solving \(\dot{s}=0,\dot{m}=0\) given in Eqs. (20), (21)). Temperatures range from T =  to T = 0 that correspond to red and blue, respectively. The arrows indicate the flow of the macroscopic parameters for the bath temperature Tb = 0.2. b Inset of panel a showing the stability of the flow \(\dot{s},\dot{m}\) with respect to the symmetry line s = 0 at bath temperature Tb = 0.5. The red-blue line is the relevant part of the equilibrium line which is shown fully in panel a. The green line denotes the separation of the two stability regions: the left part is the stable region for which \({\partial }_{s}\dot{s}{| }_{s = 0,m} \, < \, 0\), and the right part is the unstable region for which \({\partial }_{s}\dot{s}{| }_{s = 0,m} \, > \, 0\), see Eq. (22) and Fig. 4. The flow, denoted by the black arrows, shows the stability trends. All initial conditions on the left of the green line have finite non-zero “phase transition time” tc. The dashed red and blue lines correspond to stochastic trajectories of the system starting from \({T}_{{{{{{{{\rm{init}}}}}}}}}^{{{{{{{{\rm{hot}}}}}}}}}\) and \({T}_{{{{{{{{\rm{init}}}}}}}}}^{{{{{{{{\rm{cold}}}}}}}}}\), respectively. These two trajectories are an illustration showing that no Mpemba effect exists in this system. Indeed, the colder initial condition crosses the stability line (green) before the hotter initial condition.

Stability of the non-equilibrium state when quenched to a cold temperature

To show that the phase-transition time tc is well defined, we perform Monte–Carlo simulations on finite systems with different sizes, from which we measure numerically the statistics of \({\tilde{t}}_{c}\). We calculate \({\tilde{t}}_{c}\) in two ways corresponding to both definitions given in Eqs. (5), (6)).

The numerical measurements are performed as follows. For each system size N, we initiated each of the 3 × 104 realizations with a random spin configuration. This is equivalent to sampling the system from the equilibrium associated with Tinit = . Each realization is then evolved by a Monte–Carlo algorithm that implements the Glauber dynamics with Tb = 0.2. Note that the model is stochastic by its discrete nature, so no added noise is needed. The initial condition corresponds to (seq(T = ), meq(T = )) = (0, 0), which is a stable point in the s coordinate. By Eq. (22), for h = 0.5, Tb = 0.2, we find that the value of m which separates the stable and unstable regions is given by mst(Tb = 0.2) ≈ 0.211 (see Fig. 4). For each realization, we track the evolution of (s(t), m(t)) and we denote the time in which the system crosses mst for the first time as the “phase transition time” \({\tilde{t}}_{c}\). To compare between different system sizes we count \({\tilde{t}}_{c}\) in units of “Monte-Carlo Sweep time”, namely the number of spins N. This calculation corresponds to the average as given in Eq. (5).

For the alternative definition in Eq. (6), instead of considering the expression in Eq. (22), we consider the expression

$$\frac{\partial \dot{s}(t)}{\partial s}=\frac{1}{4{T}_{b}}\left[\frac{1}{{\cosh }^{2}\left(\frac{h-m(t)+s(t)}{{T}_{b}}\right)} +\frac{1}{{\cosh }^{2}\left(\frac{h-m(t)-s(t)}{{T}_{b}}\right)}\right]-\frac{1}{2}$$
(23)

For each trajectory we record the smallest time t for which the above expression vanishes—this is the time in which the trajectory crosses to the unstable region (see Eq. (22)). We repeat the numerical experiment described above, namely We average over 3 × 104 realizations for each system size to compare with the measurements described in the previous paragraph.

Figure 6 shows the calculated mean and variance of \({\tilde{t}}_{c}\) for both calculations described above. It can be seen that the mean is constant, whereas the variance decreases with the system size. Moreover the two definitions provide very similar results. Thus we conclude that the stochastic variable \({\tilde{t}}_{c}\) (defined either by Eq. (5), or by Eq. (6)) is a measurable quantity which gives a finite non-zero time for the crossing of the phase transition.

Fig. 6: Convergence of the phase-transition time as function of system size.
figure 6

The mean (a) and the variance (b) of the “phase transition time” \({\tilde{t}}_{c}\) as a function of the system size N. The time \({\tilde{t}}_{c}\) is measured in units of Monte–Carlo sweeps, i.e., in units of N. The blue and orange dots correspond to the definitions of \({\tilde{t}}_{c}\) given by Eqs. ((5), (6)), respectively. The mean is approximately constant, and the variance decreases as N increases. Thus we conclude that \({\tilde{t}}_{c}\) is a well behaving quantity in the thermodynamic limit. Moreover the two definitions (Eqs. ((5), (6))) for the phase-transition time agree very well for large system sizes.

No Mpemba effect in the mean-field anti-ferromagnet

In order to contrast the existence of the Mpemba effect in the example given in the main text, we point out that in the mean-field anti-ferromagnet discussed in this section there is no Mpemba effect. Indeed, by observing the equilibrium line in Fig. 5 it is seen that the colder initial condition crosses the stability line before the hotter initial condition, and so there is no Mpemba. For a concrete illustration we plot two stochastic trajectories, one starts at \({T}_{{{{{{{{\rm{init}}}}}}}}}^{{{{{{{{\rm{hot}}}}}}}}}=\infty\) (red), and the other starts at \({T}_{{{{{{{{\rm{init}}}}}}}}}^{{{{{{{{\rm{cold}}}}}}}}}=5\) (blue). Both trajectories flow at the same direction, and the colder one crosses the stability line (green) first, which means that there is no Mpemba in this system.