PINNfluence: Influence Functions for Physics-Informed Neural Networks

Jonas R. Naujoks, Aleksander Krasowski, Moritz Weckbecker, Thomas Wiegand, Sebastian Lapuschkin, Wojciech Samek, René P. Klausen · DOI

Abstract

Physics-Informed Neural Networks (PINNs) have emerged as a powerful paradigm for solving partial differential equations (PDEs) by embedding physical laws into the loss function. However, their "black box" nature makes debugging and verification challenging. We present PINNfluence, a framework that leverages influence functions to quantify the impact of individual training points on model predictions. By introducing novel heuristic indicators—the Directional Indicator (DI) and Region Indicator (RI)—we demonstrate how PINNfluence can verify if a model has correctly captured underlying physical principles, such as downstream information flow in fluid dynamics.

Introduction

In recent years, PINNs have revolutionized how we solve PDEs in fields like fluid dynamics and electromagnetics. By embedding physical laws directly into the neural network's loss function, they can solve problems with less data than traditional deep learning. However, PINNs suffer from a major "interpretability gap." When a PINN fails or produces a physically unrealistic result, it is difficult to determine the root cause. Is the error coming from the boundary conditions, poorly weighted PDE residuals, or misleading collocation points? PINNfluence addresses this by tracing performance back to specific training data.

Methods

The authors adapt Influence Functions (IFs) specifically for the PINN architecture. Influence functions estimate how a model's parameters would change if a specific training point were removed, without requiring retraining. This is achieved by computing the inverse Hessian of the model's parameters.

To translate these influences into physically meaningful insights, two heuristic indicators are proposed:

  1. Directional Indicator (DI): Measures if predictions are primarily influenced by "upstream" training points, aligning with physical intuition in fluid flow.
  2. Region Indicator (RI): Measures the influence of specific physical features, such as obstacles, on the rest of the domain.

Experimental Setup

The framework was evaluated using a 2D Navier-Stokes flow around a cylinder. Three model variants were compared:

  • $\phi_{good}$: Correct physics and sufficient data.
  • $\phi_{broken}$: Missing the advection term.
  • $\phi_{bad}$: Correct physics but trained on sparse data. Ground truth values were generated using the FEniCS finite element method simulator.

Key Results

PINNfluence successfully distinguishes between models that appear similar but differ in physical accuracy.

Visual Debugging

Influence heatmaps reveal distinct patterns for each model type. In the "good" model, influence is concentrated around the cylinder and inflow/outflow regions, whereas the "broken" model shows a significantly diminished impact from the cylinder, exposing its failure to account for the obstacle's physical presence.

Influence heatmaps for good (a), broken (b), and bad (c) model configurations.

Quantitative Alignment

The "good" model consistently outperformed others on the proposed indicators. As shown in the table below, it achieved the highest scores for both the Directional Indicator (~0.80) and Region Indicator (~0.21–0.28), confirming that its internal dependencies align with fluid dynamics.

Quantitative comparison of DI and RI scores across different model variants and field variables.

Conclusion

PINNfluence provides a practical tool for "peeking inside" the PINN black box. By identifying "over-influential" points and verifying physical consistency through DI and RI, researchers can better debug and trust their models. Future work includes scaling to larger architectures and applying the framework to time-dependent problems to further explore causality in physical systems.

Summary updated

BibTeX
@misc{naujoks2024pinnfluence,
  author = {Jonas R. Naujoks and Aleksander Krasowski and Moritz Weckbecker and Thomas Wiegand and Sebastian Lapuschkin and Wojciech Samek and René P. Klausen},
  title = {{PINNfluence: Influence Functions for Physics-Informed Neural Networks}},
  year = {2024},
  eprint = {2409.08958},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2409.08958},
}
Figure