Interpretability and Generalization Bounds for Learning Spatial Physics

Alejandro Francisco Queiruga, Theo Gutman-Solo, Shuai Jiang

Scientific Machine Learning (SciML) has shown immense promise in solving complex differential equations (DEs). However, achieving a low training error does not necessarily mean a model has "learned the physics." Often, models that produce visually perfect plots on training data fail catastrophically on slightly different inputs. This paper addresses a critical gap in SciML: the lack of rigorous a priori estimates for accuracy, convergence, and generalization. By applying classical numerical analysis to machine learning, the authors provide a mathematical framework to understand why these models fail and how we can verify if they have truly captured underlying physical laws.

The Role of Function Spaces

A central finding of this research is that a model's ability to generalize is strictly bound by the function space of its training data. To demonstrate this, the authors generated synthetic datasets derived from fundamental equations—such as the 1D and 2D Poisson equations and the 1D Biharmonic equation. Instead of treating training examples merely as generic "data," they categorized inputs by their mathematical properties, creating 25 distinct datasets comprising polynomials of varying degrees, sine/cosine series, and piecewise linear (FEM) functions.

The Subspace Trap

Through rigorous theoretical analysis, the authors prove (Theorem 3.2) that a linear model trained via gradient descent converges only to the projection of the true physical operator onto the subspace of the training data. If the training data does not span the full mathematical space, the model is mathematically incapable of learning the "true" physics and remains blind to anything outside that subspace.

Surprisingly, providing "richer" data can sometimes degrade performance. For instance, in finite-difference parameter fitting, adding higher-order polynomial data actually increases error because the model attempts to absorb numerical truncation errors into its learned parameters. Furthermore, this overfitting to the training subspace is not limited to simple linear models; sophisticated architectures like Fourier Neural Operators (FNO) and DeepONets exhibit similar generalization failures.

Mechanistic Interpretability via Green's Functions

To look inside the "black box," the researchers introduce a novel mechanistic interpretability technique based on Green's functions—the "impulse response" of a physical system. By feeding a "one-hot" vector (representing an impulse at a single point) into a trained model, they can extract and visualize the internal representation the model has built.

The authors warn that the "eye test" can be deceptive: a learned weight matrix might visually resemble the correct Green's function, but attempting to invert it to find the underlying differential operator often reveals critical flaws. Nevertheless, successfully extracting these shapes from MLPs and DeepONets proves that mechanistic interpretability can expose exactly what physical rules a model has internalized.

Cross-Subspace Validation

To empirically demonstrate these bounds, the authors propose a new cross-subspace validation benchmark. They trained models on one family of functions (e.g., low-degree polynomials) and tested them on entirely different ones (e.g., high-frequency sines).

The resulting $25 \times 25$ generalization heatmaps reveal that models generally succeed on simpler versions of their training data (e.g., a model trained on degree-8 polynomials works on degree-2) but fail drastically on out-of-distribution function types. Adding noise to the training data raises the overall error floor but does not alter these fundamental subspace generalization patterns.

Limitations and Future Directions

Currently, the theoretical proofs are restricted to linear PDEs. Extending this level of mathematical rigor to nonlinear systems, such as fluid dynamics, will require significantly more complex machinery. Furthermore, while this work provides a powerful diagnostic tool to measure and explain generalization failures, it does not propose a new architecture to "cure" them.

Ultimately, the authors advocate for a paradigm shift in SciML evaluation: researchers should move away from simple Mean Squared Error (MSE) on a single test set and instead adopt cross-set generalization benchmarks to definitively prove that a model has learned the physics.

Summary updated

BibTeX
@inproceedings{queiruga2026interpretability,
  author = {Alejandro Francisco Queiruga and Theo Gutman-Solo and Shuai Jiang},
  title = {{Interpretability and Generalization Bounds for Learning Spatial Physics}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=u0ZWIJ7x1F},
}
Figure