Physics-Constrained Bayesian Inference of Density Functionals in Machine-Learning-Augmented Classical Density Functional Theory
Please login to view abstract download link
Machine-learning-augmented classical density functional theory (cDFT) has shown that data-driven corrections to physically motivated free-energy functionals can substantially improve predictive accuracy for interfacial thermodynamics while preserving the variational structure of the theory. In particular, a recent neural-network-augmented cDFT framework~\cite{corr_cdft} showed that compact, physics-informed corrections to the excess Helmholtz free energy can be calibrated against molecular dynamics data by adjoint-based optimization, enabling accurate prediction of density profiles, fluid properties, and contact angles outside the training range. Such corrections are, however, delivered as point estimates. We extend this framework to Bayesian uncertainty quantification (UQ), building on earlier physics-constrained Bayesian inference in cDFT. With the network weights frozen, inference runs over a reduced, interpretable parameterisation of the learned corrections. The likelihood arises naturally from the statistical-mechanical relation between free energy and the probability of observing a density field: expanding around the equilibrium one-body density gives a Gaussian likelihood whose covariance structure follows from the fluctuation law of the fluid. A key enabling component is the adjoint methodology applied to the underlying framework. Every likelihood evaluation requires solving the nonlocal Euler--Lagrange equations for the sampled functional, and the adjoint supplies gradients of the equilibrium density with respect to the correction parameters at the cost of a single linear solve. This makes gradient-based inference practical: we compare a Gauss--Newton Laplace approximation, variational inference with normalizing flows, and Laplace-preconditioned Langevin Monte Carlo. The Euler--Lagrange equations are enforced as hard constraints, so every posterior sample is an admissible thermodynamic state. For a Lennard-Jones fluid at a planar wall, posteriors conditioned on five molecular dynamics density profiles are propagated, without additional data, to bulk liquid--vapour coexistence and to the surface tension. The analysis also separates parametric uncertainty from model-class error, identifying the near-wall residual as a limitation of the mean-field functional rather than of the data. This provides a route to uncertainty-aware cDFT surrogates combining statistical mechanics, adjoint methods, machine learning, and UQ.
