Peering inside the black box by learning the relevance of many-body functions in neural network potentials

Klara Bonneau, Jonas Lederer, Clark Templeton, David Rosenberger, Lorenzo Giambagli, Klaus-Robert Müller, Cecilia ClementiNature Communications 2025

Abstract

Machine learned potentials based on artificial neural networks are becoming a popular tool to define an effective energy model for complex systems, either incorporating electronic structure effects at the atomistic resolution, or effectively renormalizing part of the atomistic degrees of freedom at a coarse-grained resolution. One main criticism regarding neural network potentials is that their inferred energy is less interpretable than in traditional approaches, which use simpler and more transparent functional forms. Here we address this problem by extending tools recently proposed in the nascent field of explainable artificial intelligence to coarse-grained potentials based on graph neural networks. With these tools, neural network potentials can be practically decomposed into n-body interactions, providing a human understandable interpretation without compromising predictive power. We demonstrate the approach on three different coarse-grained systems including two fluids (methane and water) and the protein NTL9. The obtained interpretations suggest that well-trained neural network potentials learn physical interactions, which are consistent with fundamental principles.

Introduction

In the field of molecular dynamics, researchers often face a trade-off between the transparency of traditional force fields and the accuracy of Neural Network Potentials (NNPs). Traditional models utilize simple mathematical forms that are inherently interpretable but often fail to capture complex many-body effects. Conversely, NNPs offer high flexibility and accuracy but typically operate as "black boxes," making it difficult to discern whether their predictions stem from physical interactions or statistical artifacts. This lack of interpretability hinders scientific trust and the extraction of new insights. This work bridges this gap by applying Explainable AI (XAI) techniques to Graph Neural Networks (GNNs), enabling the decomposition of complex potentials into human-understandable $n$-body interactions.

Methods: GNN-LRP and $n$-body Decomposition

The researchers employed Layer-wise Relevance Propagation (LRP), specifically adapted for GNNs (GNN-LRP), to interpret state-of-the-art architectures like PaiNN and SO3Net. The core of the method involves back-propagating the model's total energy output through its layers to assign "relevance scores" to specific "walks" (sequences of nodes and edges) within the molecular graph.

Decomposition of GNN potentials into n-body interactions using LRP.

By aggregating these walks, the total energy can be decomposed into contributions from 1-body, 2-body, and 3-body interactions. This allows for a direct mapping of the neural network's internal logic to classical physical concepts, providing a way to visualize exactly how the network "sees" the physics of the system.

Results and Discussion

The methodology was validated on bulk methane, bulk water, and the NTL9 protein. In all cases, the coarse-grained (CG) models successfully reproduced structural properties like Radial Distribution Functions (RDFs) derived from all-atom (AA) simulations.

Physical Emergence in Fluids

For methane, a non-polar fluid, the models correctly identified that 2-body interactions dominate, assigning negligible relevance to 3-body terms. In contrast, for water, the models automatically learned the importance of 3-body interactions corresponding to the tetrahedral geometry of hydrogen bonds.

RDF and relevance scores for a coarse-grained water model (CG-PaiNN).

As shown in the water analysis, the relevance scores peak at specific distances, aligning with the structural features captured by the RDF. The 3-body relevance was found to be highest at angles of 50-60°, which matches the configuration of water molecules sitting interstitially in a tetrahedral network.

Protein Stability and Mutations

In the NTL9 protein, LRP "contact maps" identified the hydrophobic core and $\beta$-sheet interactions as primary stabilizing forces, matching experimental biochemical knowledge. Furthermore, the method allowed for "virtual mutations"—such as replacing a hydrophobic residue with a polar one—and visualizing the resulting structural destabilization through changes in relevance scores.

Conclusion

By turning GNN potentials into interpretable $n$-body expansions, this work demonstrates that neural networks can learn fundamental physical principles rather than just memorizing data. While challenges remain regarding the computational cost of decomposing deep networks and the visualization of higher-order interactions, GNN-LRP provides a powerful tool for model validation, debugging, and scientific discovery in molecular simulation.

Summary updated

BibTeX
@inproceedings{bonneau2025peering,
  author = {Klara Bonneau and Jonas Lederer and Clark Templeton and David Rosenberger and Lorenzo Giambagli and Klaus-Robert Müller and Cecilia Clementi},
  title = {{Peering inside the black box by learning the relevance of many-body functions in neural network potentials}},
  booktitle = {Nature Communications},
  year = {2025},
  doi = {10.1038/s41467-025-65863-0},
}
Figure