# Optimizing Sparse Linear Algebra Through Automatic Format Selection and Machine Learning

arXiv: https://arxiv.org/abs/2303.05098 · HTML: https://mlsanity.com/paper/2303.05098/

## Key facts

- Cited by 1 papers in the map (data through 14 Oct 2026).
- Builds on 3 of its 26 references that are in the map.
- First posted on arXiv 9 Mar 2023.

## Builds on (most cited first, 3 of 3)

- [A unified sparse matrix data format for efficient general sparse matrix-vector multiply on modern processors with wide SIMD units](https://mlsanity.com/paper/1307.6209/) (2013)
- [CSR5: An Efficient Storage Format for Cross-Platform Sparse Matrix-Vector Multiplication](https://mlsanity.com/paper/1503.05032/) (2015)
- [Exploiting dynamic sparse matrices for performance portable linear algebra operations](https://mlsanity.com/paper/2209.06478/) (2022)

## Built on by (most cited first, 1 of 1)

- [ReLATE: Accelerating Tensor Decomposition via Safe and Efficient Learning of Sparse Encodings](https://mlsanity.com/paper/2509.00280/) (2025)

## Abstract (arXiv)

Sparse matrices are an integral part of scientific simulations. As hardware evolves new sparse matrix storage formats are proposed aiming to exploit optimizations specific to the new hardware. In the era of heterogeneous computing, users often are required to use multiple formats for their applications to remain optimal across the different available hardware, resulting in larger development times and maintenance overhead. A potential solution to this problem is the use of a lightweight auto-tuner driven by Machine Learning (ML) that would select for the user an optimal format from a pool of available formats that will match the characteristics of the sparsity pattern, target hardware and operation to execute. In this paper, we introduce Morpheus-Oracle, a library that provides a lightweight ML auto-tuner capable of accurately predicting the optimal format across multiple backends, targeting the major HPC architectures aiming to eliminate any format selection input by the end-user. From more than 2000 real-life matrices, we achieve an average classification accuracy and balanced accuracy of 92.63% and 80.22% respectively across the available systems. The adoption of the auto-tuner results in average speedup of 1.1x on CPUs and 1.5x to 8x on NVIDIA and AMD GPUs, with maximum speedups reaching up to 7x and 1000x respectively.
