Table of Contents
Fetching ...

Differentiable Thermodynamic Phase-Equilibria for Machine Learning

Karim K. Ben Hicham, Moreno Ascani, Jan G. Rittig, Alexander Mitsos

Abstract

Accurate prediction of phase equilibria remains a central challenge in chemical engineering. Physics-consistent machine learning methods that incorporate thermodynamic structure into neural networks have recently shown strong performance for activity-coefficient modeling. However, extending such approaches to equilibrium data arising from an extremum principle, such as liquid-liquid equilibria, remains difficult. Here we present DISCOMAX, a differentiable algorithm for phase-equilibrium calculation that guarantees thermodynamic consistency at both training and inference, only subject to a user-specified discretization. The method is rooted in statistical thermodynamics, and works via a discrete enumeration with subsequent masked softmax aggregation of feasible states, and together with a straight-through gradient estimator to enable physics-consistent end-to-end learning of neural $g^{E}$-models. We evaluate the approach on binary liquid-liquid equilibrium data and demonstrate that it outperforms existing surrogate-based methods, while offering a general framework for learning from different kinds of equilibrium data.

Differentiable Thermodynamic Phase-Equilibria for Machine Learning

Abstract

Accurate prediction of phase equilibria remains a central challenge in chemical engineering. Physics-consistent machine learning methods that incorporate thermodynamic structure into neural networks have recently shown strong performance for activity-coefficient modeling. However, extending such approaches to equilibrium data arising from an extremum principle, such as liquid-liquid equilibria, remains difficult. Here we present DISCOMAX, a differentiable algorithm for phase-equilibrium calculation that guarantees thermodynamic consistency at both training and inference, only subject to a user-specified discretization. The method is rooted in statistical thermodynamics, and works via a discrete enumeration with subsequent masked softmax aggregation of feasible states, and together with a straight-through gradient estimator to enable physics-consistent end-to-end learning of neural -models. We evaluate the approach on binary liquid-liquid equilibrium data and demonstrate that it outperforms existing surrogate-based methods, while offering a general framework for learning from different kinds of equilibrium data.
Paper Structure (28 sections, 38 equations, 20 figures, 5 tables, 1 algorithm)

This paper contains 28 sections, 38 equations, 20 figures, 5 tables, 1 algorithm.

Figures (20)

  • Figure 1: Overview of the proposed end-to-end thermodynamically consistent learning framework. Molecular graphs of the two mixture components are encoded using a graph neural network to form a joint mixture embedding $\mathcal{M}$. The neural model parameterizes the Gibbs energy of mixing $\Delta g^{\mathrm{mix}}(x;\mathcal{M})$, which is evaluated on a discretized composition grid subject to the feed composition $z$. Feasible phase-split candidates $(x',x")$ are identified via mass-balance constraints and combined to compute the total Gibbs energy of the mixture. In the forward pass, the equilibrium compositions are obtained via a hard minimization of $\Delta g^{\mathrm{mix}}$. During training, gradients are propagated through a Boltzmann-weighted softmax relaxation using a straight-through estimator, enabling differentiable, thermodynamically consistent learning.
  • Figure 2: Scatter plot of equilibrium composition pairs (left). Histogram of the miscibility gap width (middle). Histogram of the feed composition $z$ (right). Colored by train, validation and test split for the first fold.
  • Figure 3: Violinplot of the MAE of fitting 50 systems with different gap widths one by one (batch size = 1). Each violin represents a different loss configuration. H stands for the auxiliary Hessian loss, and G stands for the auxiliary Gibbs loss.
  • Figure 4: Six systems with increasing miscibility gap and comparison of the DISCOMAX H model (red) and the Surrogate G model (blue). The ground truth data is shown in green, with the respective equilibrium composition targets shown as dotted vertical lines.
  • Figure 5: Test set parity plots for different model variants for a single fold. Full cross-validation results can be found in Table \ref{['tab:cv']}
  • ...and 15 more figures