Datasets:
Tasks:
Tabular Regression
Formats:
parquet
Size:
< 1K
ArXiv:
Tags:
sparse-matrices
linear-systems
preconditioners
numerical-linear-algebra
suitesparse
scientific-computing
License:
File size: 8,761 Bytes
f1d50c0 11ad9dc f1d50c0 3d18570 11ad9dc 3d18570 2894de1 f1d50c0 2894de1 f1d50c0 3d18570 f1d50c0 3d18570 f1d50c0 3d18570 f1d50c0 3d18570 f1d50c0 3d18570 f1d50c0 3d18570 f1d50c0 3d18570 f1d50c0 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 | ---
license: cc-by-4.0
task_categories:
- tabular-regression
tags:
- sparse-matrices
- linear-systems
- preconditioners
- numerical-linear-algebra
- suitesparse
- scientific-computing
- benchmark
size_categories:
- n<1K
configs:
- config_name: manifest
data_files: manifest.parquet
---
# MatrixPFN SuiteSparse Evaluation Set
A curated subset of the [SuiteSparse Matrix Collection](https://sparse.tamu.edu/) for benchmarking learned preconditioners on sparse linear systems, matching the evaluation criteria from the GNP paper ([arXiv 2406.00809v3](https://arxiv.org/abs/2406.00809v3)).
## Dataset Description
- **Source:** [SuiteSparse Matrix Collection](https://sparse.tamu.edu/)
- **License:** CC-BY 4.0
- **Total matrices:** 867
- **Format:** Matrix Market (.mtx)
- **Size on disk:** ~5.7 GB (1.9 GB compressed)
| Property | Value |
|---|---|
| Rows/Cols | 1,000 - 100,000 |
| Nonzeros | 1,314 - 1,990,919 |
| Shape | Square |
| Type | Real, non-SPD |
| Problem domains | 50 categories |
### Domain Distribution (top 10)
| Count | Domain |
|---|---|
| 123 | Circuit simulation |
| 75 | Computational fluid dynamics |
| 69 | Optimization |
| 67 | Optimal control |
| 59 | Economic |
| 49 | Chemical process simulation |
| 47 | Undirected weighted graph |
| 32 | Circuit simulation (frequency-domain) |
| 31 | 2D/3D problem |
| 30 | Eigenvalue/model reduction |
## Dataset Structure
```
.
├── README.md
├── manifest.parquet # Matrix metadata (browsable in HF Dataset Viewer)
├── suitesparse_manifest.json # Full manifest with all 867 matrix metadata
├── suitesparse.tar.gz # All 867 matrices (1.9 GB compressed, ~5.7 GB extracted)
│ └── suitesparse/
│ ├── 2D_27628_bjtcai/
│ │ └── 2D_27628_bjtcai.mtx
│ ├── ACTIVSg2000/
│ │ └── ACTIVSg2000.mtx
│ └── ... # 867 matrix directories
├── benchmark_results/
│ └── benchmark_gnp_paper.jsonl # FGMRES benchmark: 838 matrices × 6 preconditioners
└── ablation_results/
├── ablation_edge_features.json # Study 1: 3 seeds, 500 epochs (original)
├── ablation_edge_features_v2.json # Study 2: 3 seeds, 500 epochs (pre-Dirichlet fix)
└── ablation_edge_features_v3.json # Study 3: 5 seeds, 1000 epochs (definitive)
```
### manifest.parquet
Browsable in the HuggingFace Dataset Viewer. Fields:
| Column | Type | Description |
|---|---|---|
| `id` | int | SuiteSparse matrix ID |
| `group` | str | Collection group (e.g. "HB", "SNAP") |
| `name` | str | Matrix name |
| `rows` | int | Number of rows |
| `cols` | int | Number of columns |
| `nnz` | int | Number of nonzeros |
| `kind` | str | Problem domain |
### benchmark_results/
JSONL file with FGMRES solver results for 838/867 matrices (29 timed out/OOM) using 6 preconditioners.
**FGMRES settings** (matching GNP paper): restart=10, max_iters=100, rtol=1e-8.
Per-entry fields: matrix properties (symmetry, diagonal dominance, scaling factor, zero diagonal count), and per-preconditioner results (construction time/status, convergence, iterations, residual history, Iter-AUC, Time-AUC).
#### Benchmark Results Summary
| Preconditioner | Converged | Construction Failed | Not Converged |
|---|---|---|---|
| **ILU(0)** | **376 (44.9%)** | 309 (36.9%) | 153 (18.3%) |
| AMG (AIR) | 206 (24.6%) | 16 (1.9%) | 616 (73.5%) |
| GMRES-Inner | 107 (12.8%) | 0 (0.0%) | 731 (87.2%) |
| None | 64 (7.6%) | 0 (0.0%) | 774 (92.4%) |
| Block Jacobi | 41 (4.9%) | 577 (68.9%) | 220 (26.3%) |
| Jacobi | 33 (3.9%) | 603 (72.0%) | 202 (24.1%) |
**Iter-AUC win rates** (best preconditioner per matrix):
ILU 41.1% · GMRES-Inner 33.9% · AMG 24.4% · Rest 0.5%
**Key findings:**
- 525/838 (62.6%) matrices solved by at least one preconditioner
- 313/838 (37.4%) matrices unsolved by any classical method
- 72% of matrices have zero diagonal entries (→ Jacobi family construction failure)
- ILU dominates small matrices (<5K), AMG becomes competitive at >10K
- ILU ∪ AMG covers 511/838 (61.0%); 327 matrices (39.0%) have both ILU and AMG failing
**Comparison with GNP paper** (arXiv 2406.00809v3, same 867 matrices):
| Metric | Ours | GNP paper |
|---|---|---|
| ILU construction failures | 309 (36.9%) | 348 (40.1%) |
| AMG construction failures | 16 (1.9%) | 62 (7.2%) |
| ILU iter-AUC win rate | 41.1% | ~40% |
| AMG iter-AUC win rate | 24.4% | ~25% |
| GNP iter-AUC win rate | — | ~25% |
| GNP construction failures | — | 0 (0.0%) |
### ablation_results/
GCN vs MPNN ablation studies comparing `ContextResGCN` (GCN with Gershgorin-normalized adjacency) against `ContextResMPNN` (explicit edge function with sum aggregation).
**FGMRES settings**: restart=30, max_iters=300, rtol=1e-6. Training on diffusion + advection only, evaluated on diffusion, advection, and graph_laplacian (OOD). Grid sizes: 16, 24, 32 (train) + 48 (OOD).
#### Study 3 Results (definitive, 5 seeds × 1000 epochs)
| Domain | Model | Convergence | Avg Iterations |
|---|---|---|---|
| Diffusion | GCN | **800/800 (100%)** | 90.5 |
| Diffusion | MPNN | **800/800 (100%)** | 85.7 |
| Advection | GCN | **800/800 (100%)** | 87.2 |
| Advection | MPNN | **800/800 (100%)** | 83.0 |
| Graph Laplacian (OOD) | GCN | **400/400 (100%)** | 63.1 |
| Graph Laplacian (OOD) | MPNN | **0/400 (0%)** | — |
**Training loss** (nearly identical): GCN 0.091 vs MPNN 0.092.
MPNN is competitive on in-distribution domains but catastrophically fails on OOD graph topology (Barabási-Albert graphs with power-law degree distribution). Root cause: MPNN's explicit edge function overfits to training topology; GCN's Gershgorin-normalized adjacency is degree-invariant by construction. See [ADR-04](https://github.com/Csed-dev/MatrixPFN/blob/main/docs/adr/04-gcn-over-mpnn.md) and [ADR-08](https://github.com/Csed-dev/MatrixPFN/blob/main/docs/adr/08-mpnn-generalization-failure.md).
## Dataset Creation
### Selection Criteria
Matches the GNP paper evaluation set:
- Square matrices only (`rows == cols`)
- Real-valued (not complex)
- Non-SPD (not symmetric positive definite)
- 1,000 to 100,000 rows
- Less than 2,000,000 nonzeros
### Source Data
All matrices originate from the [SuiteSparse Matrix Collection](https://sparse.tamu.edu/), downloaded unmodified in Matrix Market format via [ssgetpy](https://github.com/drdarshan/ssgetpy).
## Usage
### Download and extract all matrices
```python
import subprocess
from pathlib import Path
from huggingface_hub import hf_hub_download
DATA_DIR = Path("data")
DATA_DIR.mkdir(exist_ok=True)
hf_hub_download(
repo_id="Csed-dev/matrixpfn-suitesparse",
repo_type="dataset",
filename="suitesparse.tar.gz",
local_dir=DATA_DIR,
)
subprocess.run(["tar", "xzf", str(DATA_DIR / "suitesparse.tar.gz"), "-C", str(DATA_DIR)], check=True)
(DATA_DIR / "suitesparse.tar.gz").unlink()
```
### Load a single matrix
```python
from scipy.io import mmread
matrix = mmread("data/suitesparse/ACTIVSg2000/ACTIVSg2000.mtx")
print(f"Shape: {matrix.shape}, NNZ: {matrix.nnz}")
```
### Browse the manifest
```python
from datasets import load_dataset
manifest = load_dataset("Csed-dev/matrixpfn-suitesparse", "manifest")
print(manifest["train"].to_pandas().head())
```
## Considerations
- Matrix Market (.mtx) files are not natively streamable via `datasets`. Use `hf_hub_download` or `snapshot_download` for the sparse matrices.
- Some matrices may have near-singular or zero diagonals, causing preconditioner construction failures (documented in benchmark results).
- The benchmark results use spectral-radius scaling (dividing by the infinity norm) before solving.
## Citation
This dataset is a redistribution of matrices from the SuiteSparse Matrix Collection under the CC-BY 4.0 license.
**Required citations:**
```bibtex
@article{Davis2011,
author = {Timothy A. Davis and Yifan Hu},
title = {The University of Florida Sparse Matrix Collection},
journal = {ACM Transactions on Mathematical Software},
volume = {38},
number = {1},
year = {2011},
doi = {10.1145/2049662.2049663}
}
@article{Kolodziej2019,
author = {Scott P. Kolodziej and Mohsen Aznaveh and Matthew Bullock and Jarrett David and Timothy A. Davis and Matthew Henderson and Yifan Hu and Read Sandstrom},
title = {The SuiteSparse Matrix Collection Website Interface},
journal = {Journal of Open Source Software},
volume = {4},
number = {35},
pages = {1244},
year = {2019},
doi = {10.21105/joss.01244}
}
```
Individual matrices may have additional citations. See https://sparse.tamu.edu/ for per-matrix metadata.
## License
CC-BY 4.0 (inherited from SuiteSparse Matrix Collection)
|