Abstract
This paper introduces a novel method to sparsify $\mathcal{H}^2$ matrices—a complex class of hierarchical matrices used in large-scale scientific computing—into a simple product of orthogonal and sparse matrices ($A \approx USV^\top$). Unlike previous approaches that "inflate" the matrix size to achieve sparsity, this "non-extensive" method keeps the matrix dimensions constant, allowing researchers to solve massive, dense linear systems using standard, highly optimized sparse solver tools.
Introduction
In fields like electromagnetics, fluid dynamics, and geophysics, researchers often deal with "dense" matrices arising from integral equations. These matrices are typically too large to store or invert directly. To manage this, practitioners use Hierarchical ($\mathcal{H}$) matrices, which exploit the fact that many parts of these matrices have "low rank" (they contain redundant information).
The $\mathcal{H}^2$ matrix is an advanced version that uses "nested bases" to be even more memory-efficient. However, while $\mathcal{H}^2$ matrices are excellent for matrix-vector multiplication, they are notoriously difficult to invert or use as preconditioners for iterative solvers. Existing sparsification techniques often transform these hierarchical structures into large sparse matrices, but they usually "extend" the matrix, making it 5 to 10 times larger than the original. This increases computational complexity and can destroy critical mathematical properties like positive definiteness.
Methods
The authors propose a non-extensive sparsification algorithm. The goal is to factor the $\mathcal{H}^2$ matrix $A$ into a product of three matrices: $$A \approx USV^\top$$ Where $S$ is a sparse matrix of the same size as $A$, and $U$ and $V$ are orthogonal matrices (essentially rotations and permutations) that do not change the size of the problem.
The core of the method is a multi-level compression. At each level of the matrix's hierarchy, the algorithm uses Singular Value Decomposition (SVD) to identify the most important basis rows and columns. It then applies orthogonal transformations to concentrate the low-rank information into a small corner of the block, leaving the rest of the block effectively empty. By repeating this from the smallest blocks up to the largest, the algorithm systematically moves the dense information into a sparse backbone ($S$). Because $U$ and $V$ are orthogonal, solving $Ax=b$ becomes as simple as solving the sparse system $Sy = U^\top b$ and then setting $x = Vy$.
Datasets and Evaluation
The authors evaluated their method using several synthetic kernels and physical problems common in numerical analysis:
- Inverse Distance Kernel: $1/|r_i - r_j|$, typical of gravitational or electrostatic interactions.
- Exponential Kernel: $\exp(-||r_i - r_j||^2)$, common in Gaussian processes and statistics.
- Laplace Equation: A Dirichlet boundary value problem solved via a boundary integral formulation.
- IFMM Benchmark: A specific interaction matrix used to compare against the Inverse Fast Multipole Method (IFMM).
Tests were performed in both 2D and 3D settings with matrix sizes ($N$) ranging up to nearly 200,000.
Key Insights
- Non-Extensive Property: By keeping the matrix size $N \times N$, the authors avoid the memory overhead that plagues "extensive" sparsifiers.
- Property Preservation: If the original matrix is symmetric and positive definite (SPD), the resulting sparse matrix $S$ is also SPD. This allows the use of robust solvers like Conjugate Gradient or Cholesky decomposition.
- Leveraging Existing Infrastructure: Once the matrix is in the $USV^\top$ form, it can be plugged into any standard sparse library (like CHOLMOD or ILUt), which have been optimized over decades.
- Linear Scaling: The time to build the factorization and the memory required both grow almost linearly ($O(N)$) with the size of the problem.
Results
The proposed method demonstrated true $O(N)$ storage, with the number of non-zero elements per row in $S$ remaining constant as matrix size increased. In a direct comparison with the popular H2Lib library, the proposed sparsification was significantly faster. For a system with approximately 200,000 variables, H2Lib's factorization took nearly 11,000 seconds, while the proposed sparsification and subsequent sparse factorization took only about 380 seconds combined—a ~28x speedup.
Furthermore, when used as a preconditioner for the GMRES solver, the method showed excellent convergence, outperforming the IFMM solver in total solution time (e.g., 218 seconds vs 301 seconds for a specific ill-conditioned 3D problem).
Limitations and Future Work
While the method shows great asymptotics, the current Python implementation could be further optimized by porting it to C++ or Fortran. Additionally, the algorithm assumes the $\mathcal{H}^2$ representation is already provided and does not address the initial cost of building the hierarchical matrix. Finally, performance as a preconditioner depends on choosing a "drop tolerance" for the sparse factorization, which may require tuning for specific problems.
Summary updated