Bayesian analysis was employed to constrain the equation of state (EoS) of nuclear matter with a baryon density of up to six times the nuclear saturation density, using data from heavy-ion collisions at beam energies \(\sqrt{s_{\textrm{NN}}}\) = 2–10 GeV. The resulting EoS excellently agrees with that constrained by astrophysical observations.

The nuclear EoS describes the relationship between different thermodynamic variables in the bulk nuclear matter. The relationship between the pressure P and energy density \(\epsilon\) determines the square of the speed of sound in the nuclear matter \(c_{\textrm{s}}^2 = {{\text {d}} P / {\text {d}}\epsilon }\). The value of \(c_{\textrm{s}}^2\) is approximately 1/3 in the ideal gas limit of the quark-gluon plasma phase (QGP) (or any system with conformal symmetry) and about 1/6 in the hadron resonance gas (HRG) phase of nuclear matter with zero net baryon density. This corresponds to the state of matter existing in the early universe and produced in heavy-ion collisions at the top RHIC and LHC energies, where nearly equal amounts of matter and antimatter are created. Lattice QCD calculations predict that the transition between the QGP and HRG of nuclear matter is a smooth crossover. The nuclear EoS also depends on the net baryon density, such as that produced in low-energy heavy-ion collisions with strong baryon stop** or dense nuclear matter inside neutron stars. Nuclear matter at a finite baryon density can have a different type of phase transition, possibly first order, during which the speed of sound approaches \(c_{\textrm{s}}^2\approx 0\).

Nuclear EoS is essential for describing the dynamic evolution of dense and hot nuclear matter created in heavy-ion collisions because the primary driving force for fluid expansion is the pressure gradient. It is also a vital input for determining the mass–radius relation of neutron stars, as a soft EoS cannot support immense gravitational forces. Nuclear EoS encodes QCD phase transitions, which can be used to identify neutrons and quark stars. Furthermore, the nuclear EoS reveals the emergent properties of numerous nucleons and provides constraints on the nucleon–nucleon interaction, which is crucial for few-nucleon systems such as atomic nuclei.

In a recent publication in Physical Review Letters [5]. For comparisons between data and theoretical calculations, advanced machine learning methods such as Bayesian analyses [6,7,8,9,10] and deep learning [4, 11,12,13,14,15,16,17] are used. For further details, please refer to the following reviews [18,19,20,21,22,23].

To describe the EoS of dense nuclear matter above two times of the nuclear saturation density \(2 n_0\), the authors of Ref. [1] use a 7th order polynomial function to parameterize the density dependence of baryon potential energy \(V(n_\text{B}(r))\). The seven coefficients in the polynomial function form the parameter space \(\theta = \left[ \theta _1, \theta _2, \ldots , \theta _7 \right]\) to be extracted using Bayesian analysis. The dataset on elliptic flow \(v_2\) and the mean transverse kinetic energy \(\langle m_\text{T} \rangle - m_0\) of protons at the mid-rapidity of Au+Au collisions at \(\sqrt{s}\) = 2–10 GeV, referred to as \(D=\left[ v_2, \langle m_\text{T} \rangle - m_0 \right]\), were used to constrain the EoS. The goal of their Bayesian analysis was to determine the posterior distributions of the parameters in the polynomial function, given the dataset

$$\begin{aligned} P(\theta | D) \propto P(\theta ) P(D |\theta ) \end{aligned}$$

The posterior distribution was not normalized. The Markov chain Monte Carlo (MCMC) method is typically employed to obtain samples from this unnormalized distribution by performing random walks in the parameter space. For instance, the Metropolis–Hastings (MH) algorithm begins at a randomly chosen location \(\theta _{\textrm{step 0}}\) in the parameter space and proposes the next step \(\theta _{\textrm{step 1}} = \theta _{\textrm{step 0}} + \delta \theta\). The algorithm then determines whether to accept this new position based on posterior distribution \(P(\theta | D)\). If the posterior distribution exhibits a higher probability density at the proposed position than at the current position, \(\theta _{\textrm{step 1}}\) is accepted as a new sample. Otherwise, it is accepted with a probability ratio between the new and old positions. If \(\theta _{\textrm{step 1}}\) is rejected, the old position \(\theta _{\textrm{step 0}}\) is duplicated as a new sample. This process was implemented in PyMC and EMCEE. This study uses PyMC4.0 to sample \(\theta\) from the posterior distribution \(P(\theta | D)\). Density estimation provides the distribution of \(\theta\), from which one can identify the mean values of \(\theta\) or parameter combinations that maximize \(P(\theta | D)\), known as the maximum a posteriori (MAP).

In this study, the key equation that relates the potential \(V(n_\text{B}(r))\) to the equation of state (pressure) is given by [24]

$$\begin{aligned} P\left( n_\text{B}\right) =P_{\textrm{id}}\left( n_\text{B}\right) +\int _{0}^{n_\text{B}} n^{\prime } \frac{\partial U\left( n^{\prime }\right) }{\partial n^{\prime }} {\textrm{d}} n^{\prime } \end{aligned}$$

where \(P_{\textrm{id}}\) is the pressure of the ideal fermionic gas and \(U\left( n_\text{B}\right) =\frac{\partial \left( n_\text{B} \cdot V\left( n_\text{B}\right) \right) }{\partial n_\text{B}}\). Once the pressure is known, the square of the speed of sound \(c_{\textrm{s}}^2\) in dense nuclear matter can be computed using its derivatives.

As shown in Fig. 1, the extracted \(c_{\textrm{s}}^2\) values using 13 and 15 data points from heavy-ion collisions are compared with those obtained from constraints by binary neutron star mergers (gray band) [25] and the chiral mean-field (CMF) model calculations (purple curve) [24]. The \(c_{\textrm{s}}^2\) values extracted using the Bayesian analysis agreed with the binary neutron star merger constraints when 15 data points were used. However, reducing the number of data points to 13 leads to a rapid change in \(c_{\textrm{s}}^2\), indicating that the EoS is sensitive to the observables selected in the Bayesian analysis. Therefore, higher statistical data from experimental measurements are required to constrain nuclear EoS in dense regions better.

The performance of the Bayesian analysis was verified using closure tests. In these tests, a random potential function was incorporated into UrQMD to compute the physical observables, and Bayesian analysis was employed to obtain the posterior distribution of \(\theta\) in the potential function. The ground-truth potential function is centered around the resulting \(V(n_\text{B}(r))\). Closure tests are crucial in Bayesian analysis because many scientific problems do not have well-defined inverse solutions. For example, if two or more potential functions yield the same \(v_2\) and \(\langle m_{\textrm{T}} \rangle - m_0\), then it is impossible to retrieve the used \(V(n_\text{B}(r))\). This does not imply that there is no way to distinguish between different EoS but suggests that additional physical observables may be necessary. In this study, the closure tests indicated that the physical observables selected by the authors were sensitive to changes in the EoS.

Fig. 1
figure 1

The square of the speed of sound \(c_{\textrm{s}}^2\) at the density of \(2n_0 - 6n_0\), where \(n_0\) is the nuclear saturation density, is extracted from comparisons between experimental data and UrQMD simulations of heavy-ion collisions at the beam energies of 2–10 GeV in Ref. [1]. The Bayesian analysis was employed to constrain the EoS, and the results agree with neutron star merger observations. Notably, the results are sensitive to the number of data points used in the constraining process

Constraining the EoS at the high net baryon density is essential for understanding the dynamic evolution of dense nuclear matter during heavy-ion collisions. This knowledge is also crucial for providing key inputs to obtain the mass–radius relationship of neutron stars and interpreting neutron star merger observations. Heavy-ion collisions at various intermediate and low beam energies offer a unique opportunity to study the nuclear EoS under extreme conditions in a laboratory setting [26, 27]. Furthermore, this research can help constrain the fundamental nucleon–nucleon interactions in many-body quantum systems. The incorporation of advanced statistical tools and machine learning methods into data theory comparisons in nuclear physics will accelerate the advancement of this frontier.