Skip to main content
QUICK REVIEW

[Paper Review] Using differentiable programming to obtain an energy and density-optimized exchange-correlation functional

Sebastian Dick, Mariví Fernández-Serra|arXiv (Cornell University)|Jun 8, 2021
Machine Learning in Materials ScienceMaterials Science44 references4 citations
TL;DR

This paper introduces xc-diff, a differentiable programming-based method to optimize a neural network-based meta-GGA exchange-correlation functional by jointly minimizing energy and density errors. By enforcing exact physical constraints and leveraging automatic differentiation through JAX, the model achieves state-of-the-art accuracy for non-empirical functionals, outperforming established methods like SCAN and B3LYP on both energy and density predictions while introducing a novel energy-density error metric for functional ranking.

ABSTRACT

Using an end-to-end differentiable implementation of the Kohn-Sham self-consistent field equations, we obtain an accurate neural network-based exchange and correlation (XC) functional of the electronic density. The functional is optimized using information on both energy and density while exact constraints are enforced through an appropriate neural network architecture. We evaluate our model against different families of XC approximations and show that, for non-empirical functionals, there is a strong linear correlation between energy and density errors. We use this correlation to define a novel XC functional quality metric that includes both energy and density errors, leading to a new, improved way to rank different approximations. Judged by this metric, our machine-learned functional significantly outperforms those within the same rung of approximations.

Motivation & Objective

  • To develop a highly accurate, non-empirical exchange-correlation functional that simultaneously optimizes for both total energy and electron density accuracy.
  • To overcome the challenge of non-linear density response in Kohn-Sham DFT by enabling gradient-based optimization through end-to-end differentiable programming.
  • To enforce exact physical constraints—such as the local Lieb-Oxford bound—within a neural network architecture to improve transferability and physical consistency.
  • To introduce a new compound metric, $\mathcal{E}\mathcal{D}_{|n|}$, that combines energy and density errors for improved functional ranking.
  • To demonstrate that data-driven optimization with physical constraints can surpass traditional non-empirical functionals like SCAN, even within the meta-GGA framework.

Proposed method

  • An end-to-end differentiable implementation of the Kohn-Sham self-consistent field equations is built using JAX to enable automatic differentiation through the full DFT solution process.
  • A neural network-based meta-GGA functional is trained using a loss function that combines WTMAD-2 for energy errors and $\varepsilon_{|n|}$ for density errors, both computed against high-accuracy coupled-cluster references.
  • Physical constraints, including the local Lieb-Oxford bound, are embedded directly into the neural network architecture to ensure physical consistency and improve generalization.
  • A novel compound metric $\mathcal{E}\mathcal{D}_{|n|}$ is derived from a linear correlation between energy and density errors observed in non-empirical functionals, with the slope $\gamma = 1084.87\ \text{kcal mol}^{-1}$ obtained from regression on reference data.
  • The training set is primarily composed of linear systems to reduce computational cost, with generalization to more complex molecules validated through testing.
  • The method leverages the gradient information from the electron density response to functional parameters, effectively increasing data efficiency and enabling precise optimization.

Experimental results

Research questions

  • RQ1Can a differentiable programming approach enable joint optimization of energy and density errors in a DFT exchange-correlation functional?
  • RQ2Does enforcing exact physical constraints, such as the Lieb-Oxford bound, improve the transferability and accuracy of machine-learned functionals?
  • RQ3Is there a consistent linear relationship between energy and density errors across non-empirical functionals, and can it be used to define a more robust functional ranking metric?
  • RQ4Can a data-driven, non-empirical functional outperform established meta-GGA functionals like SCAN and PBE0 in both energy and density prediction?
  • RQ5To what extent does the use of automatic differentiation through JAX enhance training efficiency and accuracy in functional optimization?

Key findings

  • The xc-diff functional achieves the lowest density error among all tested meta-GGA functionals on the G2/97 dataset, outperforming SCAN and matching the performance of PBE0.
  • xc-diff reduces the total WTMAD-2 energy error by 9% compared to PBE0, while also showing superior density accuracy, placing it above B3LYP in the new $\mathcal{E}\mathcal{D}_{|n|}$ metric.
  • A strong linear correlation ($R^2 = 0.87$) is observed between WTMAD-2 energy errors and density errors for non-empirical functionals, validating the use of a compound metric.
  • The functional's density error is lower than expected from the linear trend, indicating it surpasses the performance frontier of non-empirical meta-GGAs.
  • The inclusion of the local Lieb-Oxford bound in the neural network architecture significantly improves model transferability and physical consistency.
  • The method demonstrates that differentiable programming enables effective optimization of complex, non-linear DFT functionals by leveraging gradients from both energy and density responses.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.