Rethinking Neural-based Matrix Inversion: Why can't, and Where can

Yuliang Ji, Jian Wu, Yuanzhe Xi

Abstract

Deep neural networks have achieved substantial success across various scientific computing tasks. A pivotal challenge within this domain is the rapid and parallel approximation of matrix inverses, critical for numerous applications. Despite significant progress, there currently exists no universal neural-based method for approximating matrix inversion. This paper presents a theoretical analysis demonstrating the fundamental limitations of neural networks in developing a generalized matrix inversion model. We expand the class of Lipschitz functions to encompass a wider array of neural network models, thereby refining our theoretical approach. Moreover, we delineate specific conditions under which neural networks can effectively approximate matrix inverses. Our theoretical results are supported by experimental results from diverse matrix datasets, exploring the efficacy of neural networks in addressing the matrix inversion challenge.

Introduction

Matrix inversion is a cornerstone of scientific computing, yet its computational cost often creates bottlenecks in modern parallel processing environments. While classical algorithms like LU or QR decomposition are robust, their sequential nature limits their efficiency on modern hardware like GPUs. Neural networks (NNs), being inherently parallel and universal function approximators, seem like a natural solution. However, a general-purpose neural matrix inverter has remained elusive.

This paper provides a mathematical "reality check," proving that a universal, end-to-end neural matrix inverter is impossible due to the unbounded nature of the inversion function near singular matrices. Nevertheless, we demonstrate that NNs can effectively learn "refined linear approximations" within specific, stable regions of matrix space, offering a specialized path forward for scientific computing.

Theoretical Limitations

The core challenge lies in the "unboundedness trap." The matrix inversion function $Inv(A)$ becomes unbounded (approaches infinity) as a matrix $A$ approaches a singular state—where the determinant is zero.

To analyze this, the authors introduce the concept of Polynomial Lipschitz Continuity. This class of functions is broader than standard Lipschitz continuity and accurately describes modern architectures like Transformers. The authors prove that any NN within this class—which remains bounded on bounded sets—cannot globally approximate a function that shoots to infinity. Specifically, they demonstrate that the expected error of any Polynomial Lipschitz NN over the entire space of $n \times n$ matrices is infinite for $k > n^2$.

Local Approximation and Experimental Design

While global approximation is impossible, local approximation is feasible. For a small neighborhood around a fixed, non-singular matrix $A_0$, the inverse can be expressed as a Taylor expansion. The authors show that a simple 2-layer multi-layer perceptron (MLP) can be designed to mimic this linear approximation.

To test this, synthetic datasets were created for $2 \times 2$, $3 \times 3$, and $16 \times 16$ matrices. These datasets were constrained to "safe zones" or feasible regions ($M_\epsilon$) by taking a non-singular "center" matrix (such as a positive definite symmetric matrix) and adding tiny perturbations ($\pm 0.01$).

Key Results

Performance Across Dimensions

In these stable regions, NNs achieved impressive accuracy. For $2 \times 2$ matrices, the average absolute error was as low as $6.39 \times 10^{-6}$. As shown in the table below, these results scale effectively; even at $16 \times 16$, the error remained low (approximately $1.68 \times 10^{-4}$), suggesting that NNs are viable for domain-specific tasks where the input distribution is naturally constrained away from singularities.

Performance of fully connected networks across various matrix dimensions.

Refined Linear Approximations

The experiments reveal that NNs do not simply rediscover classical algorithms. Instead, they learn a highly optimized version of a first-order Taylor expansion. In head-to-head comparisons, a 2-layer MLP consistently outperformed standard linear approximations. This indicates that NNs learn "refined" coefficients that capture more nuance than a simple Taylor expansion.

Comparison of average absolute error between linear approximation and neural network models.

Conclusion and Future Work

This research clarifies the boundaries of neural-based matrix inversion. While the dream of a universal neural inverter is mathematically barred for standard architectures, the success of NNs in stable, local regions provides a practical tool for specialized applications.

Future work will focus on scaling these models to much larger dimensions and exploring whether exotic, non-polynomial architectures can bypass current theoretical limits. Additionally, further analysis is required to estimate mean squared error bounds in extremely high-dimensional spaces.

Summary updated

BibTeX
@inproceedings{ji2025rethinking,
  author = {Yuliang Ji and Jian Wu and Yuanzhe Xi},
  title = {{Rethinking Neural-based Matrix Inversion: Why can't, and Where can}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2025},
  url = {https://openreview.net/forum?id=QTMczpOLMG},
}
Figure