Schwarz–Schur Involution: Lightspeed Differentiable Sparse Linear Solvers

Yu Wang, Mazdak Abulnaga, Yaël Balbastre, Bruce FischlICML 2025

TL;DR: This paper introduces a differentiable direct sparse linear solver that is up to 1,000x faster than standard libraries like SciPy and 170x faster than NVIDIA’s cuDSS. By reimagining sparse matrix factorization as a series of parallel, batched dense tensor operations, the authors make high-precision "exact" solvers fast enough to be used as standard modules inside deep learning architectures.

The Challenge of Sparse Linear Systems

Many fields—from computer vision to physical simulation—rely on solving large systems of linear equations ($Ax = b$). Often, these systems are "sparse," meaning most entries in the matrix $A$ are zero (e.g., pixels only interact with their immediate neighbors).

Currently, researchers face a frustrating choice:

  1. Iterative (Indirect) Solvers: These are fast but "fussy." They require careful tuning, can fail to converge on difficult problems, and are notoriously difficult to differentiate for use in machine learning.
  2. Direct Solvers: These provide exact solutions and are robust, but they have traditionally been considered too slow and computationally expensive to sit inside a neural network's inner loop.

The authors bridge this gap, creating a direct solver that is "lightspeed" and fully differentiable, allowing it to be plugged directly into AI pipelines for tasks like solving Partial Differential Equations (PDEs) or performing image deconvolution.

The Method: Schwarz–Schur Involution

The core innovation is a technique the authors call Schwarz–Schur Involution. Instead of treating the sparse matrix as one giant, messy object, they exploit the regular grid structure of images and volumes.

Recursive grid merging process
  • The Schwarz Step (Condensation): The image is divided into small patches (e.g., 4x4). The solver "condenses" each patch by mathematically eliminating the interior pixels and keeping only the boundary pixels. This turns a sparse problem into a "wire-frame" of boundary interactions.
  • The Schur Step (Recursive Merging): The algorithm recursively merges pairs of adjacent patches. At each step, it uses the Schur complement formula to solve for the shared boundary and produce a new, larger merged block.
  • GPU Acceleration: Crucially, these steps are formulated as operations on dense tensors. While sparse operations are often "memory-bound" and slow on GPUs, dense matrix operations (BLAS kernels) are what GPUs were born to do. By batching thousands of small dense inversions together, the method achieves massive parallel throughput.

Applications and Datasets

Because this is a fundamental numerical solver rather than a traditional "learning" paper, it is evaluated on various mathematical and image-processing benchmarks rather than a single training dataset.

Various applications including image processing and PDE solving
  • Laplacian & Helmholtz Systems: Standard benchmarks for PDE solving.
  • Darcy Flow: A common benchmark for "Neural Operators," resampled from the standard 421x421 grid to 257x257.
  • Image Matting & Deconvolution: Real-world computer vision tasks using standard test images.
  • Random Sparse Matrices: To test the solver's robustness against non-structured data.

Key Insights and Results

  • Dense is the new Sparse: The most surprising insight is that it is actually faster to perform more floating-point operations on dense tensors than fewer operations on sparse data structures, simply because modern GPUs are so much more efficient at dense math.
  • DtN as a Data Structure: The algorithm explicitly maintains "Dirichlet-to-Neumann" (DtN) maps—operators that relate boundary values to boundary fluxes. This classical concept from physics becomes the perfect compact data structure for a parallel solver.
  • Zero-Shot PDE Solving: The solver is so fast that it can outperform specialized "learned" PDE solvers (like Neural Operators) on their own tasks without requiring any training at all. It provides the "ground truth" solution at "inference" speeds.
  • Raw Speed & Precision: On a 513x513 image, the solver takes just 10.9 ms. For a massive 2561x2561 system, it takes 220 ms. It is consistently 60x to 1000x faster than SciPy’s spsolve and 40x to 170x faster than NVIDIA’s highly optimized cuDSS library. Unlike iterative solvers, it provides solutions down to machine epsilon (relative errors of $10^{-16}$ in float-64).
  • Differentiability: The authors demonstrate that their solver can be used to implement Newton’s Method for minimal surface problems, achieving a 400x speedup over SciPy-based backends.

Limitations and Future Work

  • Memory Hunger: The primary trade-off for this speed is memory. Because the algorithm stores many intermediate dense matrices, it is much more memory-intensive than iterative solvers. For very large images (e.g., 4097x4097), it can run out of memory (OOM) on standard GPUs.
  • Grid Dependency: The current implementation is highly optimized for 2D and 3D regular grids (like images and volumes). While the math generalizes to arbitrary graphs or meshes, the "lightspeed" performance currently relies on the regularity of the grid.
  • Future Directions: The authors suggest that future work could involve "downsampling" the DtN operators to create an approximate version of the solver that uses even less memory while maintaining high speed.

Summary updated

BibTeX
@inproceedings{wang2025schwarzschur,
  author = {Yu Wang and Mazdak Abulnaga and Yaël Balbastre and Bruce Fischl},
  title = {{Schwarz–Schur Involution: Lightspeed Differentiable Sparse Linear Solvers}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=RKbanvzycr},
}
Figure