Introduction

The architecture of magmatic systems within the crust and their corresponding thermal state serves as the bedrock for building a comprehensive understanding of magmatism, which is perhaps the most critical factor in understanding planetary evolution. Temperature (T) and pressure (P) are two pivotal parameters that determine phase equilibrium assemblages1,2, the solubility of volatiles in magma3,4, magma density, and rheology5,6, thereby influencing the state and evolution of magma, the formation, and growth of magma reservoirs, volcanic eruption styles, and the formation of mineral deposits7,8,9,10,11,12. Consequently, accurately constraining PT has long been a focal issue in Earth science research13.

Magma physiochemical meters (MPMs) based on mineral phase equilibria, including thermometers (T), barometers (P), hygrometers (H2O), and oxybarometers (fO2), have offered unparalleled information on the physiochemical parameters of magmatic reservoirs14,15, which are hard to replace by other techniques. All MPMs, in essence, can be considered algorithms involving mapping functions that relate compositional inputs to specific physiochemical parameters. This mapping relies on the underlying assumption that minerals crystallize in equilibrium at phase boundaries, with all components adhering to thermodynamic equilibrium condition:

$$\Delta {G}_{{{\rm{m}}}}^{T,P}=-A=0$$
(1)

where \(\Delta {G}_{{{\rm{m}}}}^{T,P}\) is the molar Gibbs Free Energy change at PT and A is the chemical affinity. In general, the \(\Delta {G}_{{{\rm{m}}}}^{T,P}\) can be expressed as:

$$\Delta {G}_{{{\rm{m}}}}^{T,P}={\Delta H}^{{P}_{{{\rm{r}}}},{T}_{{{\rm{r}}}}}-T\Delta {S}^{{P}_{{{\rm{r}}}},{T}_{{{\rm{r}}}}}+{\int }_{\!\!\!\!{T}_{{{\rm{r}}}}}^{T}\Delta {C}_{p}{{\rm{d}}}T-T{\int }_{\!\!\!\!{T}_{{{\rm{r}}}}}^{T}\frac{{\Delta C}_{p}}{T}{{\rm{d}}}T+{\int }_{\!\!\!\!{P}_{{{\rm{r}}}}}^{P}\Delta V{{\rm{d}}}P+{RT}{{\mathrm{ln}}}K$$
(2)

where \({\Delta H}^{{P}_{{{\rm{r}}}},{T}_{{{\rm{r}}}}}\) and \(\Delta {S}^{{P}_{{{\rm{r}}}},{T}_{{{\rm{r}}}}}\) represent the change of standard enthalpy of formation and entropy at the reference pressure (Pr) and temperature (Tr), \(\Delta {C}_{p}\) is the molar isobaric heat capacity and, \(\Delta V\) the molar volume between products and reactants. K denotes the equilibrium constant. \(\Delta {C}_{p}\), \(\Delta V\) and activity coefficients within K are nonlinear functions of P–T–X. Most MPMs simplify these dependencies by treating \(\Delta {C}_{p}\) and \(\Delta V\) as constants and considering only the contributions of key component interactions to activity coefficients, thereby enabling the isolation of target parameters (P, T, fO2) for calibration. Hence, all MPMs are essentially variations of the thermodynamic equilibrium equations between mineral-melt or mineral-mineral, sharing one consistent theoretical framework13,16. Over the last decades, considerable numbers of phase-equilibrium-based thermobarometers have been proposed, based on mineral-liquid17,18,19, mineral-mineral20,21,22,23, mineral-only24,25,26 and liquid-only27,28, and have become widely adopted within the magma and volcanology research communities. More recently, the use of machine learning in geosciences has also led to novel approaches for thermobarometers, enabling the use of much larger experimental datasets than traditional models to train high-precision, broadly applicable models29,30,31. Although machine learning algorithms may extract more detailed information from data compared to traditional calibration methods32,33, independent testing of these models on experimental datasets not used for calibration shows that while both traditional and machine learning models provide reasonable results for temperature, they consistently fail to yield pressure estimates with uncertainties <200 MPa34,35,36. The poor performance of barometers has been explained by several factors, including 1) volume changes in the silicate liquid partially absorbing pressure variations13, 2) enthalpy changes (\(\Delta S=-\partial \Delta G/\partial T\)) being more prominent than molar volume changes (\(\Delta V=\partial \Delta G/\partial P\))37 or other thermodynamic limitations of phase-equilibrium-based equilibrium barometers35 and 3) the insufficient precision of experimental data used for calibration, and a shortage of experiments to fully cover P–T–X space. Among these, the substantial differences in \(\Delta S\) and \(\Delta V\) of mineral-forming reactions undoubtedly play a dominant role, and unlike point 3), are fundamental limitations that cannot be overcome. Generally, reactions with large \(\Delta S\) are T-sensitive and suitable as thermometers, whereas those with large \(\Delta V\) are P-sensitive and appropriate as barometers13. Here, the jadeite equilibrium between clinopyroxene (Cpx) and liquid (Liq) is used as an illustrative example, which is commonly used for barometer calibration due to its large molar volume change19:

\({{{\rm{NaAlSi}}}}_{2}{{{\rm{O}}}}_{6}({{\rm{Cpx}}})= {0.5{{\rm{Na}}}}_{2}{{{\rm{SiO}}}}_{3}({{\rm{Liq}}})+{0.5{{\rm{Al}}}}_{2}{{{\rm{O}}}}_{3}({{\rm{Liq}}})+ \qquad \qquad \qquad \qquad \qquad {1.5{{\rm{SiO}}}}_{2}({{\rm{Liq}}})\)

Our representation of liquid species is consistent with the thermodynamic components employed in the MELTS model. We employed Rhyolite-MELTS 1.2.038,39, implemented within the framework of the Enabling Knowledge Integration Project (https://gitlab.com/ENKI-portal/ThermoEngine), to calculate the entropy (ΔS) and volume (ΔV) changes associated with this reaction, using the composition and P–T conditions of experiment FM15740, yielding 139.7 J ∙ [mol·°C]−1 and 26.7 J ∙ [mol·MPa]−1 respectively. That is, for a given uncertainty in the \(\Delta {G}_{{{\rm{m}}}}^{T,P}\), uncertainty (in MPa) when this reaction is used as a barometer is approximately 5.2 times of the uncertainty (in °C) when used as a thermometer. If a calibrated Cpx-liquid thermometer has an root mean square error (RMSE) of 40 °C, the corresponding barometer might exhibit an RMSE of around 200 MPa. For reactions with a larger ΔS, this disparity would be even greater. Additionally, in natural magmatic systems, the complex evolution history means it is difficult to determine the relationship between phases that may have grown in equilibrium, or possibly in completely different environments7,40,41. Moreover, within a single hand sample of volcanic rock, crystals of a single mineral phase may be phenocrysts, antecrysts, and/or xenocrysts, according to the environment in which they formed. Individual crystals may also exhibit zoning and/or complex textures, indicating that different portions of a crystal may have grown in distinct environments14. This complexity in the mineral genesis, coupled with changes in water content and matrix glass chemistry due to degassing and microlite formation during magma ascent collectively contributes to a further deterioration in the reliability of mineral±liquid thermobarometers. Owing to these limitations, single-phase thermobarometers have been widely established and applied25,26,27,28,29,30,31,32,33. Pressure miscalibration also impacts temperature and vice versa since both parameters together dictate chemical equilibrium, and neither parameter is known in most natural systems. Overall, the temperature and pressure information extracted from the mineral and/or glass (melt) compositions of igneous rocks contains several sources of inaccuracy.

We believe that the challenges encountered by phase-equilibrium thermobarometers highlight the incomplete nature of our understanding of their thermodynamic intrinsic nature. Thus, here we provide a thermodynamic perspective that can unambiguously address the following crucial questions and pave the way for the next generation of thermobarometers: 1) How do uncertainties in composition and model parameters contribute to the overall uncertainty in P–T estimates, and which variables are the most influential for thermobarometry? 2) Given known in situ analytical uncertainties in experimental datasets and assuming no additional sources of error, what is the theoretical upper limit of calibration precision? How much additional uncertainty is theoretically introduced when using single-phase thermobarometric models compared to those based on two-phase equilibria? 3) As thermobarometry often requires the simultaneous inference of both P and T from compositional data, to what extent are P and T estimates inherently correlated, regardless of whether a thermobarometric model is primarily P-dependent or T-dependent? If one parameter becomes unconstrained, is the other still robust?

Results and discussion

Integrated approach to P-T uncertainty and sensitivity analysis

We establish a statistically robust framework for evaluating thermobarometers that explicitly quantifies and propagates uncertainties. We develop a simplified thermodynamical model ensuring consistency with fundamental physical principles rather than relying solely on empirical correlations. We exemplify this framework using the jadeite (NaAlSi2O6) equilibrium in the clinopyroxene-liquid system. This equilibrium is expressed thermodynamically as the change in molar Gibbs free energy (\({\Delta G}_{{{\rm{m}}}}\)) or chemical affinity (A):

$${\Delta G}_{{{\rm{m}}}}=-A={\mu }_{{{\rm{Jd}}}}^{{{\rm{Liq}}}}-{\mu }_{{{\rm{Jd}}}}^{{{\rm{Cpx}}}}$$
(3)

Where \({\mu }_{{{\rm{Jd}}}}^{{{\rm{Cpx}}}}\) is the chemical potential of the jadeite component in the clinopyroxene, and \({\mu }_{{Jd}}^{{Liq}}\) is the chemical potential of the jadeite component in the liquid:

$${\mu }_{{{\rm{Jd}}}}^{{{\rm{Liq}}}}=0.5{\mu }_{{{{\rm{Na}}}}_{2}{{{\rm{SiO}}}}_{3}}^{{{\rm{Liq}}}}+0.5{\mu }_{{{{\rm{Al}}}}_{2}{{{\rm{O}}}}_{3}}^{{{\rm{Liq}}}}+1.5{\mu }_{{{{\rm{SiO}}}}_{2}}^{{{\rm{Liq}}}}$$
(4)

For any thermodynamic component i in a phase p, its general molar Gibbs free energy (i.e., chemical potential) can be expressed as:

$${G}_{{{\rm{m}}}}^{i}\left(P,T\right) ={\mu }_{i}\left(P,T\right)={\Delta }_{f}{H}^{{P}_{{{\rm{r}}}},{T}_{{{\rm{r}}}}}-T{S}^{{P}_{{{\rm{r}}}},{T}_{{{\rm{r}}}}} +{\int }_{\!\!\!\!{T}_{{{\rm{r}}}}}^{T}{C}_{p}{{\rm{d}}}T-T{\int }_{\!\!\!\!{T}_{{{\rm{r}}}}}^{T}\frac{{C}_{p}}{T}{{\rm{d}}}T \\ +{\int }_{\!\!\!\!{P}_{{{\rm{r}}}}}^{P}\left\{{V}^{{P}_{{{\rm{r}}}},{T}_{{{\rm{r}}}}}-T{\left(\frac{\partial V}{\partial T}\right)}_{P}\right\}{{\rm{d}}}P-T{\int }_{\!\!\!\!{P}_{{{\rm{r}}}}}^{P}{\left(\frac{\partial V}{\partial T}\right)}_{P}{{\rm{d}}}P+{RT}{{\mathrm{ln}}}{\gamma }_{i}{X}_{i}$$
(5)

\({\Delta }_{f}{H}^{{P}_{{{\rm{r}}}},{T}_{{{\rm{r}}}}}\), \({S}^{{P}_{{{\rm{r}}}},{T}_{{{\rm{r}}}}}\), \({V}^{{P}_{{{\rm{r}}}},{T}_{{{\rm{r}}}}}\) represent the standard enthalpy of formation, entropy, and molar volume of component i at the reference pressure (Pr, 0.1 MPa) and temperature (Tr, 298.15 K). \({C}_{p}\) is the isobaric heat capacity, and \({\gamma }_{i}\) is the activity coefficient of component i in the melt or solid solution. The expressions for \({C}_{p}\), \({V}^{P,T}\) and \({{\mathrm{ln}}}{\gamma }_{i}\) of clinopyroxene are detailed in the Methods section. Melt chemical potentials are calculated using Rhyolite-MELTS 1.2.03,38,39.

Thermodynamic parameters of the clinopyroxene solid solution model, including the \({\Delta }_{f}{H}^{{P}_{{{\rm{r}}}},{T}_{{{\rm{r}}}}}\), \({S}^{{P}_{{{\rm{r}}}},{T}_{{{\rm{r}}}}}\), \({V}^{{P}_{{{\rm{r}}}},{T}_{{{\rm{r}}}}}\) and macroscopic interaction energies (Wi,j), were determined through Bayesian inversion using a Markov Chain Monte Carlo (MCMC) algorithm. This calibration provided full posterior probability distributions for all model parameters, along with their covariance matrix, serving as essential inputs for robust statistical uncertainty propagation analysis. Convergence of the MCMC sampling after the initial “burn-in” phase was assessed through visual inspection of trace plots, confirming that the chains effectively converged to the target posterior distribution (Fig. 1).

Fig. 1: MCMC trace plot of the log-likelihood as a function of sampling iterations.
figure 1

The plot demonstrates convergence to a stable posterior distribution following an initial 1000-iteration burn-in phase, with the shaded region indicating the sampled iterations used for parameter estimation. The maxium log likelihood is shown in blue dased line.

To thoroughly evaluate the impact of model parameter uncertainties and analytical uncertainties within clinopyroxene and liquid compositions on the calculated PT conditions, our framework employs a multi-pronged strategy (see Methods for details): (1) individual parameter uncertainty propagation to understand the isolated impact of each parameter, (2) joint uncertainty propagation that simultaneously samples all model parameters and compositions from their full distributions to quantify the total PT uncertainty, and (3) uncertainty contribution decomposition via Sobol analysis42,43, which treats clinopyroxene-liquid compositions and model parameters as two macro-parameters to quantify their relative contributions to the overall PT uncertainty.

Our results reveal distinct contributions to temperature and pressure uncertainties. We consider analytical uncertainties of 10% for Na₂O, TiO₂, K₂O, Cr2O3 and MnO, and 5% for SiO2–Al2O3–FeO–MgO–CaO for both Cpx and Liq analyses, based on reported precisions and expected offsets between laboratories35,44. The analytical uncertainty for H₂O in the liquid is also considered, using precision values reported in experiments or, if not available, set at 10%. For temperature calculations, these defined analytical uncertainties in clinopyroxene and liquid compositions contribute the majority of the uncertainty. The first order Sobol indices (S1, 0.65) indicate that 65% of the total uncertainty comes from error in Cpx and Liq compositions, rising to 85% (ST = 0.85) once interactions with other input parameters is considered. In contrast, the contribution from uncertainty in the model parameters (\({\Delta }_{f}{H}^{{P}_{{{\rm{r}}}},{T}_{{{\rm{r}}}}}\), \({S}^{{P}_{{{\rm{r}}}},{T}_{{{\rm{r}}}}}\), \({V}^{{P}_{{{\rm{r}}}},{T}_{{{\rm{r}}}}}\) and W) to the overall temperature uncertainty is secondary, with S1 and ST values of 0.22 and 0.23 respectively (Fig. 2b). Conversely, pressure calculation uncertainties are almost exclusively attributed to model parameters (S1: 0.79, ST: 0.81), with analytical uncertainties in compositions contributing only a minor fraction (Fig. 2a; S1: 0.04, ST: 0.04). Specifically, uncertainties stemming from W and \({\Delta }_{f}{H}^{{P}_{{{\rm{r}}}},{T}_{{{\rm{r}}}}}\) are major sources of model uncertainty in both temperature and pressure calculations. In contrast, the impacts of uncertainties in \({S}^{{P}_{{{\rm{r}}}},{T}_{{{\rm{r}}}}}\) and \({V}^{{P}_{{{\rm{r}}}},{T}_{{{\rm{r}}}}}\) are found to be minimal and negligible, respectively.

Fig. 2: Uncertainty propagation and decomposition results for the calibrated model using jadeite-equilibrium.
figure 2

a Violin plots illustrate the distribution of calculated pressure results arising from individual and joint parameter uncertainty propagation. ∆H, ΔS, ΔV represent outcomes from individual uncertainty propagation of \({\triangle }_{f}{H}^{{P}_{r},{T}_{r}}\), \({S}^{{P}_{r},{T}_{r}}\), \({V}^{{P}_{r},{T}_{r}}\) repectively. ΔW, ΔX demonstrate uncertainty propagation when specific groups of parameters are treated as single macro-parameters: ΔW for all macroscopic interaction energies within the clinopyroxene thermodynamic model, and ΔX for the clinopyroxene and liquid compositions. The Total category corresponds to the result of joint parameter uncertainty propagation across all parameters and compositions. b uncertainty propagation results for temperature calculations. In each violin plot, the white circle represents the mean of the distribution, and the upper and lower dashed lines indicate the quartiles. S1 and ST denote first-order Sobol indices and total-effect Sobol indices, respectively. Precisions of each oxide are set as follows: 10% for Na2O, TiO2, K2O, MnO, Cr2O3 and 5% for the others. The experiment selected is FM15748.

The striking divergence in uncertainty attribution can be understood by examining the thermodynamic expressions for chemical potential. Temperature influences the Gibbs free energy primarily through the \({RT}{\mathrm{ln}}{\gamma }_{i}{X}_{i}\) and \(T{S}^{{P}_{{{\rm{r}}}},{T}_{{{\rm{r}}}}}\) terms. Minor analytical deviations in mineral and liquid compositions directly affect the \({X}_{i}\) and \({\mathrm{ln}}{\gamma }_{i}{X}_{i}\), thereby influencing the determined temperature. Conversely, pressure influences the Gibbs free energy change of the reaction predominantly through the \({\int }_{{P}_{r}}^{P}\Delta V{{\rm{d}}}P\) term. Because \(\Delta V\) is small, even small uncertainties in the calculated Gibbs energy arising from model uncertainties result in large changes in inferred P. For a given temperature, variations in \({\Delta }_{f}{H}^{{P}_{{{\rm{r}}}},{T}_{{{\rm{r}}}}}\) and Wi,j can cause noticeable variations in \({\Delta G}_{{{\rm{m}}}}\) which in turn lead to variations in the determined P. Overall, \({\Delta }_{f}{H}^{{P}_{{{\rm{r}}}},{T}_{{{\rm{r}}}}}\) and Wi,j account for the largest share of model-related uncertainty through their influence on the calculated \({\Delta G}_{{{\rm{m}}}}\), while analytical errors in compositional data also substantially increase the total uncertainty in T estimates in practical applications.

Theoretical precision limit defined by analytical uncertainty

We established a thermobarometric algorithm using a Bayesian approach based on Rhyolite-MELTS (v1.2.03,38,39, see “Methods”) and conducted inversion tests on a test dataset. The overarching conclusion from our inversion tests was the elusive nature of P estimates (Supplementary Note 1). Irrespective of phase information utilized, the predictive capability for P is consistently inferior to that of T and H2O. Here, H₂O refers to the water content dissolved in the liquid. Given that PT–H2O–fO2 and composition (X) are all essential parameters for defining the state of a system, if a parameter exerts a substantial impact on the free energy of a system, its role in regulating equilibrium and phase transitions is expected to be pronounced. From a thermodynamic perspective, all thermobarometers aim to find the P-T solution corresponding to A (P, T, X) = 0. Under this framework, the influence of compositional uncertainty, and changes in pressure and temperature on the calculated affinity (in joule) can be assessed and directly compared to each other45,46,47. This provides a compelling conceptual framework; the pressure or temperature change required to produce a change in the total chemical affinity equivalent to that caused by compositional uncertainty defines the achievable limit of thermobarometric performance.

Total chemical affinity variations from different parameters (PT–H₂O–fO₂) were investigated using the solid and liquid compositions from an experiment FM15748, run at T = 1050 °C and P = 600 MPa with a liquid composition of 49.4 wt% SiO2 and 6.1 wt% MgO in equilibrium with plagioclase (Pl, An94), and clinopyroxene (Cpx, Mg# = 81.1). The variability in affinity caused by analytical uncertainties in composition data was calculated under fixed experimental PT–H₂O–fO₂ conditions for comparison (Fig. 3, green bar). T and H₂O exhibit a strong control over the affinity, with an average variation of 71 J ∙ °C-1 (Fig. 3a) and 1.8 kJ ∙ [wt.%]−1 for plagioclase (Supplementary Fig. S5a), and 64.3 J ∙ °C-1 (Fig. 3b) and 1.4 kJ ∙ [wt.%]−1 for clinopyroxene (Supplementary Fig. S5c). Considering that the range of temperature and H2O values typically span >300 °C and 0–10 wt.%, respectively, for magmatic systems13,32, we believe the impact of T and H₂O variations can surpass 20 kJ and 14 kJ, respectively. In comparison, the effect of P is markedly diminished, especially on plagioclase (Fig. 3a, c). Considering a variation of 1 GPa (i.e. a ~ 30 km thick crust), the affinity changes by less than 1 kJ. This is comparable to the variation seen for only 10 °C temperature change. The impact of P on clinopyroxene is notably stronger; 1 GPa of variation leads to an affinity change of approximately 10.26 kJ (Fig. 3b), corresponding to an average change of 10.26 J∙MPa-1. Even though clinopyroxene shows a marked molar volume response to pressure variations19,37,49, pressure still exerts a secondary influence on phase equilibria compared with temperature (Fig. 3b, d). Very similar results were observed in completely different systems, with a more chemically evolved liquid from experiment AB6250 containing 66.59 wt.% SiO2 and 1.98 wt.% MgO (Supplementary Fig. S6). This points to the general fact that chemical equilibrium in magmatic systems is primarily controlled by temperature and H2O. This effectively explains why calibrating barometers is often fraught with difficulty, as pressure, in comparison to temperature and H2O, plays a secondary role in controlling Gibbs energy of reaction and, consequently, chemical equilibrium within magmatic systems, making its influence on chemical composition more susceptible to being obscured by analytical uncertainty, defined as the uncertainty in experimental data. For example, plagioclase has its pressure information completely overridden by analytical uncertainty (Fig. 3a), making it perilous to use as a barometer.

Fig. 3: Chemical affinity of plagioclase and clinopyroxene formation reaction variations respond to PT changes.
figure 3

a, b Chemical affinity responds to PT for plagioclase and clinopyroxene formation. The green shaded area represents the ±2σ range of affinity variations obtained by 2000 random synthetic solid and liquid composition sampling drawn from Gaussian distribution with synthetic analytical precisions (1σ/mean; wt.%) under the experimental condition. The water content of the liquid used in the calculations is the reported value of the experiment. Precisions of each oxide are set as follows: 10% for Na2O, TiO2, K2O, MnO, Cr2O3 and 5% for the others. Lines in different colors signify affinity contour lines for different temperatures. c, d 3D representation of the chemical affinity as a function of pressure and temperature. The experiment selected is FM15748.

For each experiment in the test dataset, we conduct simulations calculating the range of total chemical affinity variations (±2σ) induced by the synthetic analytical uncertainty. This value, when divided by the change in affinity per °C and per MPa, defines the theoretical precision limit of the thermobarometer under the specified data uncertainty. Calculated precision limits of the Cpx-liquid thermobarometer range from 22 to 41 °C and 120 to 240 MPa, respectively (Fig. 4), with an average of 28 °C and 165 MPa. Many calibration studies for specific systems report SEE within this range17,19,26, while SEE or RMSE values from global datasets are typically larger29,31. An interesting result is that the precision limits of the Cpx-based thermobarometer are dependent on liquid composition; theoretical precision limits are positively correlated with the Al₂O₃/CaO ratio in the liquid, particularly for barometers (Fig. 4). Thus, for the same assumed % error in oxides, some systems could consistently yield better calibrations than others. This suggests that for global models with broad compositional coverage, standard metrics such as SEE or RMSE do not rigorously reflect the uncertainty for model outputs. Instead, uncertainty propagation must be performed using the posterior means and covariance matrices of model parameters, as demonstrated above. We also observe that \(1/\Delta {\bar{V}}_{{Jd}}\) and \(1/\Delta \bar{S}\) calculated using the PT obtained via inversion of Rhyolite-MELTS, are positively correlated with the precision limits of thermobarometers (Fig. 4). Here, \(\Delta {\bar{V}}_{{Jd}}\) represents the molar volume change of the jadeite-forming reaction, and \(\Delta \bar{S}\) denotes the average molar entropy change of the clinopyroxene-liquid reaction, defined as \(\Delta \bar{S}=\partial {A}_{{tot}}/\partial T\), where Atot is the total chemical affinity (see “Methods” section). This correlation arises from their relationships with PT within the thermodynamic expression. Smaller values of \(\Delta {\bar{V}}_{{Jd}}\) and \(\Delta \bar{S}\) require greater variations in P and T to offset changes in the chemical potential from compositional uncertainty, thereby preserving A = 0. Consequently, when evaluating the results of thermobarometric calculations, \(1/\Delta {\bar{V}}_{{Jd}}\) and \(1/\Delta \bar{S}\) can serve as reliability indicators. Larger values of these ratios indicate greater uncertainty in PT estimates. Additionally, although the chemical equilibrium of plagioclase is primarily controlled by temperature, its performance as a thermometer is not superior to that of clinopyroxene. It tends to exhibit higher uncertainties, as its total chemical affinity variation is higher for identical compositional uncertainty (Fig. 3). It is noteworthy that our adopted analytical uncertainties—10% for Na₂O, TiO₂, K₂O, Cr2O3 and MnO, and 5% for others—represent a highly conservative assumption. This stems from the pervasive phase variability observed in experimental products, expressed through sector zoning, compositional zoning, and disequilibrium crystallization51, which reflect inherent chemical heterogeneity within individual mineral phases. These factors, combined with systematic interlaboratory biases in electron microprobe analyses35,44, indicate that the actual analytical uncertainties in datasets currently utilized for thermobarometer calibration are likely to substantially exceed our assumed values. Our simulations demonstrate that precision limits of Cpx-Liq models will exceeds 300 MPa and 60 °C when assigning 20% uncertainty to low-concentration elements (Na₂O, K₂O, TiO₂, MnO, Cr2O3) and 10% to other elements. Thus, regardless of the algorithms or theoretical models employed, without rigorous data filtering and correction for systematic interlaboratory biases in analytical data, the SEE or RMSE for Cpx-Liq thermobarometer will remain at levels comparable to 120–300 MPa and 20–60 °C. To achieve a SEE/RMSE for the thermobarometer that matches the uncertainty of the experimental apparatus, with the piston-cylinder apparatus commonly exhibiting a lower bound of ±50 MPa and thermocouple a precision of ±10 °C, analytical precision should be at 2%. With this level of precision, the theoretical limits for the Cpx-based thermobarometer are about 8–16 °C and 45–90 MPa, respectively, according to our simulations.

Fig. 4: Relationship between theoretical precision limits caused by analytical uncertainty and liquid Al2O3/CaO for clinopyroxene-liquid thermobarometer on the test dataset.
figure 4

The pressure (a) and temperature (b) precision limits are the values corresponding to the ±2σ range of affinity variations, which were calculated from 2000 random synthetic clinopyroxene and liquid composition samples drawn from a Gaussian distribution with synthetic analytical precisions (1σ/mean; wt.%) under experimental conditions. Precisions of each oxide are the same as described in Fig. 2. Solid lines indicate fitted regressions, and 1σ confidence intervals are represented by shaded regions.

Precision limits of insufficiently constrained thermobarometric models

All MPMs are built upon a fundamental assumption: sufficient constraints are required to uniquely pinpoint an optimal solution. To constrain both T and P, a minimum of two effective constraints are necessary, which translates into at least two thermodynamic equilibrium equations (\({\mu }_{i}^{\alpha }={\mu }_{i}^{\beta }\)). Partial absence of information would lead to incomplete constraints, exposing the model to the risk of non-uniqueness. Intersections on a PT diagram where mineral phase boundaries with different slopes meet27,28 or where equilibrium boundaries between two or more thermodynamic components in a mineral solid solution intersect18,19, can offer complete constraints. It should be noted that the reliability does not seem to improve with more constraints. Inverting Pl-Cpx-liquid is not more accurate than Pl-liquid and Cpx-liquid models (Supplementary Note 1).

The uncertainty associated with non-uniqueness is defined by the span of equivalent solutions. Previous work has suggested that temperature and plagioclase compositions can be extracted using only liquid compositions32,52 and single-phase compositions of clinopyroxene can also effectively constrain PT and liquid compositions30. At equilibrium, the chemical affinity of each thermodynamic component in the mineral must be zero. Hence, the number of thermodynamic components in a mineral is equal to the number of equations required to describe its equilibrium. For models based on the plagioclase phase boundary, five unknowns exist, three endmember components (anorthite, albite, orthoclase) and PT. The effective constraints are four in total: three equations and the normalization condition that the sum of three endmember components equals 1. For Cpx-only models, there are 11 unknowns, including nine oxide concentrations in the liquid (we exclude MnO and K2O because they do not constitute primary components of the pyroxene) and PT. The effective constraints consist of nine equations for the nine thermodynamic components (i.e., enstatite, ferrosilite, diopside, hedenbergite, jadeite, Ca-Tschermak, CaCr-Tschermak, CaTi-Tschermak, CaFe-Tschermak/acmite). To minimize the total deviation during calibration, unknown parameters with the least impact on equilibrium should be set to appropriate fixed values, ensuring the number of effective constraints equals the number of remaining unknowns. This principle also applies to other mineral solid solutions, where the number of thermodynamic components in the solid solution equals to the number of constraints it can provide. The uncertainty imposed on the calibrated model is characterized by the range of solution multiplicity caused by the fluctuations in the unknowns constrained to fixed values.

The effect of each component/oxide in solid and liquid phases on equilibrium was investigated by using total chemical affinity as a metric, with comparisons made to PT (Fig. 5). A 5 wt.% or less variation in CaO, Al₂O₃, MgO, and Na₂O in the liquid can produce a comparable variation in total chemical affinity to a 10 °C temperature change. When only the liquid composition (including H₂O) is known, estimating the equilibrium PT conditions for plagioclase requires implicitly solving for its anorthite (An), albite (Ab), and orthoclase (Or) components. Given that there are five unknown variables (An, Ab, Or, P, T) but only four effective constraints, a unique solution cannot be obtained directly. Therefore, to achieve a unique solution, one of these five variables must be fixed or assumed, which then allows for the determination of the other four. The variable chosen to be assumed should be the one with the least influence on the overall equilibrium, thereby minimizing the total error. If An is chosen as the variable to be fixed, an error of 10 units in the assumed An content will induce a temperature error of approximately 10 °C, or a pressure error exceeding 600 MPa (Fig. 5b). When performing parameter calibration, minimizing the sum of squared residuals over the entire calibration dataset will necessarily position the assumed An value near the center of the An range of the calibration dataset. For instance, if the An range is 10–90 and the assumed An is 50 (assuming P is correctly calculated), this can lead to an uncertainty of up to ±40 °C for the calibrated thermometer. In comparison, if P is held constant at 500 MPa and the plagioclase composition is perfectly calculated, fluctuations within the 0–1 GPa range induce uncertainty in calculated temperature of just ±15 °C (Fig. 5a). Hence, for plagioclase-saturated liquid-only thermometers, it is necessary to fix P at a constant value to ensure that the number of thermodynamic constraints equals the number of unknown parameters, thereby minimizing the uncertainty in the derived T. Considering a pressure range of 0–1 GPa and assuming no additional sources of uncertainty, the maximum uncertainty for plagioclase-saturated liquid-only thermometers is limited to ±15 °C. Furthermore, because variations in An and T both strongly affect P, plagioclase-saturated liquid-only barometers are inherently unstable. This makes them particularly unsuitable for use as barometers, especially within relatively small pressure ranges (0–1 GPa). For the clinopyroxene-liquid equilibrium, our results indicate that the liquid oxides that most strongly control total affinity are TiO2, Al2O3, Na2O, and CaO. Variation in each of these 4 oxides causes a change in calculated temperature of up to ±20 °C and ±200 MPa. In contrast, SiO2, Cr2O3, and FeO exert the weakest influence, with the concentration of the latter showing minimal variation in magma systems, causing changes no greater than ±10 °C and ±50 MPa, respectively (Fig. 5c). However, we acknowledge that this sensitivity testing relies on the accuracy of the MELTS model to affinity changes caused by minor components; MELTS does not have a Cr end member in its Cpx, which may explain the lack of sensitivity to Cr despite experimental work showing the opposite53. Considering SiO₂ and FeO within a specific interval of the system (e.g., basic or intermediate, with a range of about 10 wt.%), and specifying both SiO2 and FeO in the liquid, the composition of clinopyroxene can uniquely constrain PT and the other seven liquid oxide compositions theoretically. In this case, assuming that the liquid SiO2 and FeO composition is accurately specified, the solution multiplicity range for PT is approximately ±10 °C and ±50 MPa, which represents the theoretical precision limit of Cpx-only thermobarometers. Any attempts to expand the applicability of such insufficiently constrained thermobarometers will increase solution multiplicity and add uncertainty to the model, rendering them inappropriate for calibration using global datasets.

Fig. 5: Chemical affinity changes as a function of oxide content increase in the liquid phase and varying component additions in the solid phase.
figure 5

a Chemical affinity changes for plagioclase formation as a function of oxide content increase in liquid. The pink and pale blue shaded regions denote the ranges of affinity variations due to ±300 MPa pressure and ±10 °C temperature changes, respectively. b Chemical affinity changes as a function of An component. c, d The same for clinopyroxene. The pink and pale blue shaded regions represent the ranges of affinity variations due to ±20 °C of temperature and ±200 MPa of pressure changes, respectively. The experiment selected is FM15748.

In both liquid-only and mineral-only models, when solving for PT, the unknown compositional variables can also be determined, such as An in plagioclase or the Al2O3, Na2O, and CaO concentrations in the liquid. The accuracy of the compositional variables is strongly linked to PT. If compositional variables are accurately calculated, PT should also be accurate. Otherwise, both will deviate from true values. This indicates, from a thermodynamic perspective, that liquid-only and mineral-only thermobarometers can be equivalent to liquid-mineral ones. Conversely, relying solely on plagioclase composition to constrain the liquid and PT is not reliable, as four key variables in the liquid strongly affect the equilibrium, and any sacrifice in their precision results in substantial uncertainty (Fig. 5a). Given the negligible influence of the diopside, enstatite, and Ca-Tschermak components on affinity (Fig. 5d), predicting clinopyroxene equilibrium PT from the liquid composition remains viable, reducing the number of unknowns to align with the number of constraints. However, most liquid compositions in magmatic processes are transient, and the magmatic evolution is primarily preserved in the zoning of compositional complex minerals such as clinopyroxene rather than as diversity in erupted liquid compositions. Therefore, mineral-only models are more widely applicable than liquid-only or liquid-mineral models.

Deviations arising from composition to PT inference

The end member equilibrium curve is defined by the PT solutions where the chemical affinity of a specific thermodynamic end member in a solid solution equals zero on the PT diagram. All thermobarometers can be considered equivalent to finding intersections between a phase boundary (e.g. Cpx-in) and an endmember equilibrium curve on the PT diagram (Fig. 6). In this manner, the inference from composition to PT is entirely controlled by these two curves, with any change or inaccuracy causing a shift in the intersection. We choose an experimental Pl-Cpx-liquid assemblage, considering the endmember equilibrium curves and phase boundaries calculated from their compositions as “correct” solutions. Variations in the mineral and liquid components/oxides are used to simulate the deviations induced by model uncertainty. Phase boundaries are approximated by curves where total chemical affinities equal zero on the PT diagram since these curves remain almost fixed when mineral composition undergoes minimal changes (Fig. 6a, c).

Fig. 6: PT diagrams showing how PT estimates change with phase boundaries and endmember equilibrium curve variations.
figure 6

a Change in Ab equilibrium curves and their intersection points due to the addition of 3 wt.% Ab to plagioclase, with liquid composition fixed. b Results obtained by increasing MgO by 3 wt.% in liquid, with the plagioclase composition remaining fixed. c, d Variations of intersection points due to the addition of 1 wt.% Jd to clinopyroxene as well as 3 wt.% CaO increase in liquid, respectively. Red stars represent the intersection points corresponding to the experimental composition, while blue and green stars represent the intersection points after the composition is modified. Solid lines represent PT solution curves where the total chemical affinity equals 0, approximating phase boundaries. Dashed lines represent the equilibrium curves of corresponding end members. The experiment selected is AB6250.

Thermobarometric models can be classified into two categories; liquid-dependent which relies on liquid compositional terms and liquid-independent which does not use liquid composition. Since liquid composition is considered, we assume that the phase boundary (Pl-in or Cpx-in) implied by the liquid-dependent models is reliable, then variations in the PT solution align with the phase boundary. The Pl-in phase boundary has a relatively steep slope (≈18.6 MPa ∙ °C-1). Changing the composition of the plagioclase by 3 wt.% Ab causes a large shift in the Ab equilibrium curve and a minimal shift in the Pl-in phase boundary (red vs. blue curves, Fig.6a). The calculated pressure shifts by 130 MPa, while temperature by only 7 °C (Fig. 6a). For the Cpx-liquid barometer, the moderate slope of the Cpx-in phase boundary (≈6.5 MPa ∙ °C−1) means both pressure and temperature calculations are influenced; a shift in the Jd equilibrium curve by 1 wt.% yields a pressure error of 280 MPa, and a temperature error of 43 °C (Fig. 6c). For liquid-independent models or mineral-liquid models that yields incorrect phase boundaries, the intersections will shift along the direction between the phase boundary and the equilibrium curve of the most pressure-sensitive component (Fig. 6b, d). The calculated temperature for plagioclase demonstrates a variation of 19 °C when the liquid MgO is increased by 3 wt.%, while the pressure shifts by only 70 MPa (Fig. 6b). For Cpx, both pressure and temperature undergo a notable shift after adding 3 wt.% CaO to the liquid, with more pronounced temperature fluctuations compared to adding 1 wt% Jd (Fig. 6d vs. 6c). Clearly, errors in phase boundary calculations will substantially influence temperature results. Furthermore, as the entirety of phase boundary information is encapsulated within the liquid composition, liquid-independent thermobarometers, such as Cpx-only models, are consequently highly susceptible to errors when constraining temperature. Mineral composition, however, mainly affects the pressure results, as phase boundaries generally have steep slopes in magma systems. This explains the observation made using the machine learning method, where temperature information is predominantly stored in the liquid phase, while pressure information is primarily contained in the mineral phase29.

If the focus is on accurately determining temperature, a plagioclase-based thermometer is quite reliable, with only minimal influence from the pressure. However, if the objective is to accurately calculate both temperature and pressure, pressure-sensitive minerals like clinopyroxene are more reliable. Thermobarometers based on P-sensitive minerals are mutually dependent on the PT accuracy, making it unlikely for the temperature calculation to be unreliable while the pressure remains accurate, or vice versa. As a result, with the typical SEE/RMSE range of modern thermobarometric models (200–500 MPa and 20–50 °C)35,36, it is difficult to derive both reliable temperature and pressure from natural samples where both parameters are uncertain.

Conclusions

Our results highlight a critical issue inherent to all current mineral-based thermobarometers: the uncertainties in model outputs are not adequately evaluated, and the generally large uncertainties, coupled with the inherent interdependence of PT calculations, render the results unreliable for many applications in the crustal range. We propose the following principles to guide the development of next-generation mineral-based thermobarometers: 1) Develop thermodynamically robust models rather than empirical ones. This approach ensures reliable extrapolation and allows the use of metrics such as \(1/\Delta {\bar{V}}_{{{\rm{Jd}}}}\), \(1/\Delta \bar{S}\) to assess the reliability of calculated results. 2) Employ rigorous statistical methods to incorporate all sources of uncertainty into the standard deviations and covariance matrices of model parameters, which should be used in practice for error propagation to obtain robust uncertainty estimates. 3) Construct a high-quality experimental dataset to serve as the foundation for model calibration and validation. 4) The parameters \({\Delta }_{f}{H}^{{P}_{{{\rm{r}}}},{T}_{{{\rm{r}}}}}\) and Wi,j for mineral solid solutions are of critical importance. More precise measurements of \({\Delta }_{f}{H}^{{P}_{{{\rm{r}}}},{T}_{{{\rm{r}}}}}\) should be incorporated into models to derive more accurate Wi,j thereby improving overall model precision. For solid solutions such as clinopyroxene and plagioclase, calibration should encompass the equilibria of all thermodynamic components, producing parameters and covariance matrices applicable to both mineral-liquid and single-phase thermobarometers. 5) Ensure high analytical data quality when analyzing natural samples to minimize uncertainties stemming from compositional data. For clinopyroxene-based thermobarometers, if either the calculated pressure or temperature is deemed unreliable, both PT estimates should be considered unreliable.

Methods

Chemical affinity calculations using rhyolite-MELTS

Chemical affinity is a measure of the extent of approaching equilibrium, where a value of zero denotes complete equilibrium. Deviations from zero indicate an increasing degree of disequilibrium. The chemical affinity of a specific endmember in a mineral-liquid pair with a given composition may be written as46:

$$-A={\sum }_{i=1}^{P}{\nu }_{i,l}{\mu }_{i}^{{{\rm{liq}}}}-{\mu }_{l}^{{{\rm{sol}}}}$$
(6)

where \({\nu }_{i,l}\) are stoichiometric reaction coefficients, \({\mu }_{i}^{j}\) refers to the chemical potential of the ith component in the jth phase, and P is the number of components in liquid. At equilibrium, the left-hand expression for each endmember equals zero. The total chemical affinity is defined as the sum of the chemical affinities of each endmember at a specific pressure and temperature, weighted by their respective mole fractions:

$${A}_{{{\rm{tot}}}}={\sum }_{l=1}^{n}{X}_{l}{A}_{l}$$
(7)

where \({X}_{l}\) is the mole fraction of the lth endmember, and n is the number of endmembers in the mineral solid solution. It represents the overall equilibrium state of the mineral solid solution, reaching a value of zero at equilibrium. The MELTS model includes internally consistent thermodynamic properties of silicate melt and minerals suitable for a wide compositional range38,39, enabling us to calculate chemical affinity under specific PTX conditions47. Thus, we utilize Rhyolite-MELTS version 1.2.03,38,39 built within the framework of the Enabling Knowledge Integration Project (https://gitlab.com/ENKI-portal/ThermoEngine) to implement thermodynamic calculations.

Thermodynamic model for clinopyroxene

Accurate thermobarometry necessitates a robust thermodynamic description of mineral-melt equilibria across relevant PTX ranges. The general expression for the molar Gibbs free energy (i.e., chemical potential) of any thermodynamic component i in a phase p is presented in the main text. Isobaric heat capacity \({C}_{p}\) is typically represented by a polynomial function of temperature, if lambda transition is ignored54:

$${C}_{p}={k}_{0}+{k}_{1}{T}^{-0.5}+{k}_{2}{T}^{-2}+{k}_{3}{T}^{-3}$$
(8)

The constants k0 to k3 are empirical parameters. \({V}^{P,T}\) is the molar volume at P and T conditions. Its pressure and temperature dependence are approximated by55:

$$\frac{{V}^{P,T}}{{V}^{{P}_{{{\rm{r}}}},{T}_{{{\rm{r}}}}}}=1+{\nu }_{1}\left(P-{P}_{{{\rm{r}}}}\right)+{\nu }_{2}{(P-{P}_{{{\rm{r}}}})}^{2}+{\nu }_{3}\left(T-{T}_{{{\rm{r}}}}\right)+{\nu }_{4}{(T-{T}_{{{\rm{r}}}})}^{2}$$
(9)

The constants ν1 to ν4 describe the volumetric response. \({\mathrm{ln}}{\gamma }_{i}{X}_{i}\) accounts for the non-ideal mixing behavior, where R is the ideal gas constant, \({X}_{i}\) is the mole fraction of i, and \({\gamma }_{i}\) is the activity coefficient of component i. For the clinopyroxene solid solution, we employ a symmetric formalism to describe activity coefficients56:

$${RT}{{\mathrm{ln}}}{\gamma }_{l}=-{\sum }_{i}^{n-1}{\sum }_{j > i}^{n}({p}_{i}^{{\prime} }-{p}_{i})({p}_{j}^{{\prime} }-{p}_{j}){W}_{i,j}$$
(10)

In which \({p}_{i}^{{\prime} }=1\) when i = l and \({p}_{i}^{{\prime} }=0\) when i ≠ l, \({p}_{i}\) is the molar fraction of component i in the solid solution. \({W}_{i,j}\) is the macroscopic interaction energy between component i and j. In this study, \({W}_{i,j}\) are treated as constant parameters. While more complex models allow \({W}_{i,j}\) to be P and T-dependent57, this simplification is adopted given the constraints of our dataset and the primary focus on the uncertainty quantification framework. The prior and posterior distributions for each parameter, along with their covariance matrix of the posterior distribution, are presented in Supplementary Table S3.

Bayesian inversion theoretical framework

Bayesian inversion has been employed to estimate the magma physiochemical parameters and corresponding uncertainties. This approach represents parameters using a particular probability distribution and infers the joint posterior probability distribution of the parameters of interest through prior information and observational data. Bayesian theory can be outlined as follows58:

$${{\rm{P}}}\left(\varTheta ,|,D,H\right)=\frac{{{\rm{P}}}({D|}\varTheta ,H)\cdot {{\rm{P}}}(\varTheta ,H)}{{{\rm{P}}}({D|H})}$$
(11)

where D refers to the observational data, Θ is the parameter vector, and H represents the model assumptions. Specifically, D includes the measured mineral compositions and the equilibrium liquid compositions. Θ encompasses the parameters to be inferred to determine the equilibrium state of the system, including T, P, H2O, fO2, and liquid composition (X). H comprises the thermodynamic models for minerals and melts that have been selected, along with a basic assumption that the system is in equilibrium between minerals and melts. \({{\rm{P}}}\left(\varTheta ,H\right)\equiv \pi (\varTheta )\) denotes the prior distributions for Θ, representing the information about the parameters obtained through other means or empirical assumptions before the posterior distribution is derived. \({{\rm{P}}}\left(\varTheta ,|,D,H\right)\) is the posterior distribution, representing the conditional probability of the parameters Θ given the observational data D and model assumptions H. \({{\rm{P}}}\left(D,|,\varTheta ,H\right)\equiv L(\varTheta )\) is the likelihood function, which measures the degree to which the model results match the observed data given the parameters Θ and assumptions H. A higher likelihood function value indicates a better match between the model predictions and the observed data. Theoretically, all parameters can be inverted provided that the likelihood function offers enough constraints and contains valid information regarding the parameter. Here, we define the likelihood function L as:

$${{\mathrm{ln}}}L=-\frac{{{\varnothing }}}{N}$$
(12)

Φ differs across inversion modes: for single-parameter inversion, it is the square of the total chemical affinity, whereas for dual inversions, it is the sum of the squares of the chemical affinities of the two endmembers (anorthite and albite for plagioclase, diopside and jadeite for clinopyroxene). Corrections of 100 °C and 30 °C were conducted respectively for plagioclase and clinopyroxene, to eliminate the systematic deviations present in the test, given our observation of systematic biases in the MELTS model when inverting P-T.

\({{\rm{P}}}\left(D,|,H\right)=\int L(\varTheta )\cdot \pi (\varTheta )d\varTheta \equiv Z\) represents the normalization constant, also known as Bayesian evidence, used for comparing different model assumptions. This integral is often analytically and computationally intractable in high-dimensional and nonlinear cases59. Nonetheless, this study does not focus on the differences in predictive performance between various thermodynamic models. Our interest lies in the posterior distribution of the parameters, and since there is only one model assumption, the exact value of Z is not required. In such cases, Bayesian inversion can be efficiently approximated using sampling-based algorithms.

Bayesian inversion for calibration of model parameters

Here, we define the likelihood function \(L(\varTheta )\) based on the calculated chemical affinity for each experimental product:

$$L={\prod }_{k=1}^{N}\frac{1}{\sqrt{2\pi }\sigma }\exp \left(-\frac{{A}_{k}^{2}}{{2\sigma }^{2}}\right)$$
(13)

where Ak is the chemical affinity calculated for the k-th experiment given the parameter vector \(\varTheta \). N is the total number of experiments used for calibration. σ is set to 4000 to ensure sampling efficiency. The prior and posterior distributions of each parameter are shown in Supplementary Tables S1 and S2.

Implement Bayesian inversion via Gibbs sampling

We employed the Gibbs sampling algorithm to approximate the posterior distribution of inversion. This method provides a powerful general approach to exploring complicated high-dimensional shapes of distributions where analytic techniques are infeasible. Gibbs sampling is an iterative procedure used to generate a sequence of samples from the joint posterior distribution of a set of parameters. It decomposes the joint distribution into conditional distributions, allowing each parameter to be sampled sequentially while conditioning on other parameters60. The steps for Gibbs sampling are as follows:

Initialization

Randomly generate the initial state of parameters from their prior distributions:

$${\varTheta }^{0}=({\theta }_{1}^{0},{\theta }_{2}^{0},\cdots ,{\theta }_{n}^{0})$$

Iterative Sampling

For iteration t = 1, 2, …, n, make random drawings from the full conditional distributions successively as follows:

$${\theta }_{1}^{t} \sim p\left({\theta }_{1},|,{\theta }_{2}^{t-1},{\theta }_{3}^{t-1},\cdots ,{\theta }_{n}^{t-1}\right)$$
$${\theta }_{2}^{t} \sim p\left({\theta }_{2},|,{\theta }_{1}^{t},{\theta }_{3}^{t-1},\cdots ,{\theta }_{n}^{t-1}\right)$$
$$\vdots $$
$${\theta }_{n}^{t} \sim p\left({\theta }_{n},|,{\theta }_{-n}^{t}\right)$$

By this manner, the state transition from \({\varTheta }^{t-1}\) to \({\varTheta }^{t}\) is completed. Running this cycle for sufficiently long can generate a Markov chain that converges to the target distribution.

Within the conditional distribution for each step, direct sampling is always impractical if it is analytically intractable. Consequently, the Metropolis-Hastings (M-H) algorithm is frequently embedded within the Gibbs sampling framework to implement the sampling process. For each Metropolis step, the algorithm proceeds as follows:

Parameter proposal

Proposing a new state for the current dimension through a random walk originating from the present state, while holding the parameter values of other dimensions constant.

Calculating acceptance probability

Evaluating the corresponding likelihood of the current and proposed parameter states. To determine whether the proposed state could be accepted into the Markov chain, the M-H algorithm constructs the transition probability by calculating an “acceptance ratio”, α, which is defined as the ratio of the posterior probabilities of proposed and current states:

$$\alpha =\frac{L\left({\theta }_{i}^{t},{\theta }_{-i}\right)\pi ({\theta }_{i}^{t}|{\theta }_{-i})}{L({\theta }_{i}^{t-1},{\theta }_{-i})\pi ({\theta }_{i}^{t-1}|{\theta }_{-i})}$$
(14)

Accepting or rejecting the proposed state

If α > 1, the proposal is accepted and added to the Markov chain. If α < 1, the new state is accepted with a probability of α. This is achieved by drawing a random number r from a uniform distribution between 0 and 1, and accepting the new state if r < α. However, if r > α, the proposed state should be rejected, and the current state should be appended to the chain again.

Repeating the above steps

Take turns sampling each dimension of parameters in the above manner until all dimensions have been traversed. To ensure the Markov chain converges to the posterior distribution, we ran the Gibbs sampler for 10000 iterations, discarding an initial burn-in period of 1000 iterations to eliminate the influence of the starting values. Upon completion of the sampling process, the inverted expected parameter estimates are derived from the median of the posterior distribution.

Experimental dataset for clinopyroxene model calibration and test

The experimental dataset we compiled encompasses a wide range of conditions, spanning temperatures from 800–1300 °C, pressures from 0–1300 MPa and liquid compositions from basalt to rhyolite48,50,61,62,63,64 (Supplementary Fig. S1). These experiments were conducted after the development of Rhyolite-MELTS and form a subset of the ArcPL35. The quality of this compiled experimental data is ensured by the following criteria: 1) All compiled experimental studies reported products consistent with near-thermodynamic equilibrium. This was assessed through various methods, including textural evidence, mass balance calculations, mineral-melt partitioning coefficients (e.g., Fe-Mg, Ca-Na), and reversal experiments. 2) These experiments collectively cover a broad spectrum of water contents, ranging from water-poor (<0.1 wt% H2O) to highly water-rich (up to 9 wt% H2O). Water content in melt glasses was either measured or quantitatively determined in all compiled studies, employing techniques such as Fourier transform infrared spectroscopy (FTIR), secondary ion mass spectrometry (SIMS), or the “by-difference” method. 3) All compiled studies reported comprehensive electron probe microanalysis (EPMA) instrument settings, including beam current and counting times for major elements. 4) Clinopyroxene structural formulae, normalized to 6 oxygen atoms, consistently yielded total cation sums within the narrow range of 3.9–4.1, confirming their high analytical quality.

Uncertainty propagation and decomposition strategy

To provide a comprehensive understanding of how uncertainties in model parameters and compositions propagate to the final PT estimates, we employ a three-step uncertainty analysis:

1) Individual Parameter Sensitivity Analysis. This step quantifies the isolated impact of variations in each parameter. We perform Gaussian sampling for clinopyroxene and liquid compositions, as well as for each model parameter (treating clinopyroxene and liquid compositions as one macro-variable and all W as another macro-variable) based on their mean values and standard deviations obtained from their posterior distributions. For each sampled value, T or P is calculated by given the experimental P or T via inverse modeling, and the resulting distribution of PT estimates indicates the sensitivity to that specific input.

2) Joint Uncertainty Propagation. This more comprehensive approach accounts for the correlations among parameters. We simultaneously draw samples for clinopyroxene composition, liquid composition, and all model parameters from their respective distributions. Crucially, the model parameters are sampled from a multivariate Gaussian distribution that incorporates the full covariance matrix obtained from the Bayesian inversion. This ensures that the interdependencies identified during the calibration are accurately reflected in the propagated uncertainties, yielding a more realistic total uncertainty in calculated PT conditions.

3) Uncertainty contribution decomposition. To quantify the relative importance of different uncertainty sources, we apply Sobol analysis, a variance-based global sensitivity analysis method43. Let \(Y=f\left({X}_{1},{X}_{2},\ldots ,{X}_{M}\right)\) be the model output (P or T), where \({X}_{i}\) are the independent input factors. In this study, we group our parameters into M = 2 macro-variables: \({X}_{1}\) (clinopyroxene and liquid compositions) and \({X}_{2}\) (model parameters, including \({\Delta }_{f}{H}^{{P}_{r},{T}_{r}}\), \({S}^{{p}_{r},{T}_{r}}\), \({V}^{{P}_{r},{T}_{r}}\) and macroscopic interaction energies). The total variance of the output V(Y) can be decomposed as:

$$V\left(Y\right)={\sum }_{i=1}^{M}{V}_{i}+{\sum }_{i < j}^{M}{V}_{i,j}+{\sum }_{i < j < l}^{M}{V}_{i,j,l}+\ldots +{V}_{1,2,\ldots ,M}$$
(15)

where \({V}_{i}=V(E({Y|}{X}_{i}))\) represents the variance contributed by the factor \({X}_{i}\) alone, \({V}_{i,j}=V\left(E\left(Y,|,{X}_{i},{X}_{j}\right)\right)-{V}_{i}-{V}_{j}\) represents the variance due to the interaction between \({X}_{i}\) and \({X}_{j}\), and so on. The first-order Sobol index (S1) for an input factor \({X}_{i}\) quantifies its individual contribution to the output variance43,47:

$${S}_{1}=\frac{V(E({Y|}{X}_{i}))}{V\left(Y\right)}$$
(16)

The total-order Sobol index (ST) for an input factor \({X}_{i}\) quantifies its total contribution to the output variance, including both its first-order effect and all its interactions with other factors:

$${S}_{T}=1-\frac{V(E({Y|}{X}_{ \sim i}))}{V\left(Y\right)}$$
(17)

Where \({X}_{ \sim i}\) denotes all input factors except \({X}_{i}\). Sobol indices are calculated using Monte Carlo simulations. Specifically, the Saltelli method is employed for this purpose. The Saltelli method is a widely adopted and computationally efficient sampling strategy for global sensitivity analysis, designed to accurately estimate both first-order and total-order Sobol indices from a single set of model evaluations42,65. The strategy is described as follows.

For D input factors (here D = M = 2 macro-variables) and a chosen base sample size N, sampling scheme involves constructing specific input matrices: i) Matrix A. An N × D matrix where each column corresponds to a factor \({X}_{i}\) and each row is an independent sample drawn from the input factor’s distribution. ii) Matrix B. Another N×D matrix similar to A but composed of independent samples from the same distributions. iii) Matrices ABi, D additional N × D matrices. For each i from 1 to D, the matrix \({A}_{B}^{i}\) is constructed by taking all columns from Matrix A, except for the i-th column, which is taken from Matrix B. This specific construction allows for efficient estimation of partial variances. The model is then evaluated for each row of matrices A, B, and all \({A}_{B}^{i}\). The total variance V(Y) can be estimated as:

$$V\left({Y}_{A}\right)\approx \frac{1}{N}{\sum }_{j=1}^{N}{Y}_{A,j}^{2}-{\left(\frac{1}{N}{\sum }_{j=1}^{N}{Y}_{A,j}\right)}^{2}$$
(18)

\({Y}_{A,j}=f({A}_{j})\) denotes the output of j-th row of matrix A. The first-order Sobol index S1 for \({X}_{i}\) is estimated as:

$${S}_{1}\approx \frac{\frac{1}{N}{\sum }_{j=1}^{N}{Y}_{A,j}\cdot {Y}_{{A}_{B,j}^{(i)}}-{\left(\frac{1}{N}{\sum }_{j=1}^{N}{Y}_{A,j}\right)}^{2}}{V\left({Y}_{A}\right)}$$
(19)

The total-order Sobol index ST for \({X}_{i}\) is estimated as:

$${S}_{T}\approx 1-\frac{\frac{1}{N}{\sum }_{j=1}^{N}{Y}_{B,j}\cdot {Y}_{{A}_{B,j}^{(i)}}-{\left(\frac{1}{N}{\sum }_{j=1}^{N}{Y}_{B,j}\right)}^{2}}{V\left({Y}_{B}\right)}$$
(20)

Where \({Y}_{{A}_{B,j}^{(i)}}=f({A}_{B,j}^{(i)})\) denotes the output of j-th row of matrix \({A}_{B}^{i}\). For this study, 10000 model evaluations were performed for sample size N. Clinopyroxene and liquid oxide compositions were sampled from independent Gaussian distributions, with means equal to reported values and standard deviations set at 10% for low-concentration oxides (Na₂O, K₂O, TiO₂, MnO) and 5% for others. Model parameters were drawn from a multivariate Gaussian distribution, defined by the mean and covariance matrix of their posterior distributions.