Table of Contents
Fetching ...

ReFill: Reinforcement Learning for Fill-In Minimization

Elfarouk Harb, Ho Shan Lam

TL;DR

ReFill, a reinforcement learning framework enhanced by Graph Neural Networks to learn adaptive ordering strategies for fill-in minimization, is introduced, outperforming traditional heuristics by dynamically adapting to the structure of input matrices.

Abstract

Efficiently solving sparse linear systems $Ax=b$, where $A$ is a large, sparse, symmetric positive semi-definite matrix, is a core challenge in scientific computing, machine learning, and optimization. A major bottleneck in Gaussian elimination for these systems is fill-in, the creation of non-zero entries that increase memory and computational cost. Minimizing fill-in is NP-hard, and existing heuristics like Minimum Degree and Nested Dissection offer limited adaptability across diverse problem instances. We introduce \textit{ReFill}, a reinforcement learning framework enhanced by Graph Neural Networks (GNNs) to learn adaptive ordering strategies for fill-in minimization. ReFill trains a GNN-based heuristic to predict efficient elimination orders, outperforming traditional heuristics by dynamically adapting to the structure of input matrices. Experiments demonstrate that ReFill outperforms strong heuristics in reducing fill-in, highlighting the untapped potential of learning-based methods for this well-studied classical problem.

ReFill: Reinforcement Learning for Fill-In Minimization

TL;DR

ReFill, a reinforcement learning framework enhanced by Graph Neural Networks to learn adaptive ordering strategies for fill-in minimization, is introduced, outperforming traditional heuristics by dynamically adapting to the structure of input matrices.

Abstract

Efficiently solving sparse linear systems , where is a large, sparse, symmetric positive semi-definite matrix, is a core challenge in scientific computing, machine learning, and optimization. A major bottleneck in Gaussian elimination for these systems is fill-in, the creation of non-zero entries that increase memory and computational cost. Minimizing fill-in is NP-hard, and existing heuristics like Minimum Degree and Nested Dissection offer limited adaptability across diverse problem instances. We introduce \textit{ReFill}, a reinforcement learning framework enhanced by Graph Neural Networks (GNNs) to learn adaptive ordering strategies for fill-in minimization. ReFill trains a GNN-based heuristic to predict efficient elimination orders, outperforming traditional heuristics by dynamically adapting to the structure of input matrices. Experiments demonstrate that ReFill outperforms strong heuristics in reducing fill-in, highlighting the untapped potential of learning-based methods for this well-studied classical problem.

Paper Structure

This paper contains 39 sections, 1 theorem, 8 equations, 21 figures, 2 tables.

Key Result

Theorem 1.1

Given an ordering $\pi$ and assuming no "lucky cancellations"Lucky cancellations happens for some matrices ${\bf A}$ where some non-zero elements incidentally get cancelled to zeros when eliminating a variable. In practice, this is unlikely to happen, so one often ignores their effect., an edge $ij

Figures (21)

  • Figure 1: (a) A symmetric positive-definite matrix $\mathbf{A}$ and its factorization after Gaussian elimination with a fixed variable elimination order. This ordering introduces three fill-in entries at positions $A_{2,4}$, $A_{2,5}$, and $A_{4,5}$, which were initially zero but became non-zero during elimination. (b) The same matrix after applying a permutation $\pi = (5,1,2,3,4)$ via permutation matrix $\mathbf{P}_{\pi}$, which reorders the rows and columns of $\mathbf{A}$ by moving the first row to the last row, and the first column to the last position resulting in matrix $\mathbf{A}'$. This reordering leads to a matrix where Gaussian elimination introduces no fill-in, resulting in lower memory usage and faster computation.
  • Figure 2: (a) The matrix $\mathbf{A}$ from \ref{['fig:elimination_order_1']} and its corresponding graph representation $G(\mathbf{A})$. Vertices are eliminated in the order $1,2,3,4,5$. Eliminating vertex 1 forces its neighbors $(2,4,5)$ to form a clique, introducing three fill-in edges $(2,4), (2,5), (4,5)$ (shown in red) before vertex 1 is removed. These fill-in edges directly correspond to the non-zero entries added during Gaussian elimination in \ref{['fig:elimination_order_1']}. (b) The permuted matrix $\mathbf{A}'$ and its associated graph $G(\mathbf{A}')$, obtained by reordering the rows and columns of $\mathbf{A}$ by moving the first row to be the last row, and the first column to be the last column (i.e. according to the permutation $\pi=(51234)$). Although the graph is structurally identical to $G(\mathbf{A})$, the new vertex ordering eliminates all variables without introducing any fill-in edges, showing how proper ordering prevents unnecessary fill-in.
  • Figure 3: ReFill reinforcement learning environment. (a) An example observation $s$ is updated by deleting vertex 1, introducing 3 fill-in edges ($-3$ reward). (b) Schematic of the RL loop using a GNN and masked PPO.
  • Figure 4: Average fill-in (lower is better) on $8\times 8$ grid, comparing masking vs. no masking during training.
  • Figure 5: Average fill-in (lower is better) on $8\times 8$ grid, comparing masking vs. no masking during training.
  • ...and 16 more figures

Theorems & Definitions (1)

  • Theorem 1.1: rosetarjan