arXiv:2610.35362cs.DSOct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.35362

Computation-Friendly Compression of Matrices: Speeding up Linear and Boolean Algebra

Gonzalo Navarro

GONZALO NAVARRO, Universidad de Chile, Chile

Large sparse matrices—adjacency matrices of web and social graphs, feature matrices of machine-learning pipelines, the relations of graph databases—are routinely compressed to save space. Classical compressors, however, force the matrix to be decompressed before it can be used, so the space savings often yield a computational overhead. A recent line of work studies computation-friendly compression: formats that are not only small, but let us carry out matrix-vector products, and in some cases matrix-matrix products, sums and closures, directly on the compressed representation in time proportional to that compressed size. This survey organizes that literature around the kind of redundancy each format exploits: spatial clustering of the nonzeros ( k2k^{2}-trees and their variants), similarity between rows (Boldi–Vigna-style referencing and set-difference compression), repeated substrings (grammar compression), and dense bipartite substructures (bicliques). For each family we describe the representation, the algorithms, the theoretical guarantees and the empirical performance. Further, we show that the last three families are instances of a single general scheme, which we call a sparse straight-line factorization of the matrix, whose forward and backward substitutions evaluate right and left products in time proportional to the size of the representation, and that the product of two such factorizations is again one, which gives matrix-matrix products with a compressed output. An appendix reviews formats that must be decompressed (at least partially) before operating, for completeness. We close with a cross-family comparison and a list of open problems.

CCS Concepts: • Theory of computation → Data compression; Data structures design and analysis; Graph algorithms analysis; • Mathematics of computing → Computations on matrices; • Computing methodologies → Linear algebra algorithms.

Additional Key Words and Phrases: matrix compression, sparse matrices, computation-friendly compression, matrix-vector multiplication, Boolean matrix multiplication, grammar compression, k2k^{2}-trees, web graphs

ACM Reference Format:

Gonzalo Navarro. 2026. Computation-Friendly Compression of Matrices: Speeding up Linear and Boolean Algebra. 1, 1 (October 2026), 50 pages. https://doi.org/10.1145/nnnnnnn.nnnnnnn

1 Introduction

Matrices are the workhorse of scientific computing, data analysis and machine learning, and the matrices that matter in practice are often huge and sparse. The adjacency matrix of a web crawl has billions of rows but only a few dozen nonzeros per row [27, 114]; the labeled graph behind a knowledge base such as Wikidata decomposes into thousands of Boolean matrices, one per predicate [15]; the design matrices of machine-learning pipelines have millions of rows with few distinct values per column [59, 65]. Such matrices are routinely compressed, either to fit in

Author's Contact Information: Gonzalo Navarro, Universidad de Chile, Department of Computer Science, Santiago, Chile, gnavarro@uchile.cl.

Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from permissions@acm.org.

© 2026 Copyright held by the owner/author(s). Publication rights licensed to ACM.

ACM XXXX-XXXX/2026/10-ART

https://doi.org/10.1145/nnnnnnn.nnnnnnn

Gonzalo Navarro

main memory, to reduce the bandwidth between memory and processor, or to cut storage and transmission costs.

The price is that compression and computation have traditionally been at odds. A general-purpose compressor (gzip, xz, zstd, ...) or an entropy-coded format saves space on disk, but a matrix-vector product on it requires decompressing the matrix, at least piece by piece (say, row by row), so the decompression time is added to the time of the standard operation instead of reducing it; and if the matrix is expanded as a whole, the peak memory is also that of the uncompressed matrix. The notion of computation-friendly compression is more ambitious: a representation that is as small as possible and on which the operation of interest can be run directly, with time (and working space) proportional to the compressed size rather than to the size of the matrix it stands for. If this can be done, compression becomes an algorithmic accelerator, not just a storage device.

Is this feasible? For the sparsest possible redundancy, yes, and this is what every sparse-matrix format does: the product with a vector can be computed in time proportional to the number of nonzeros nnz(A)nnz(A), instead of the total n⋅mn \cdot m cells. The question is whether more powerful forms of compression, which go beyond sparsity and exploit the structure of the nonzeros, can also be made to speed up computation. There are good reasons for pessimism. Abboud et al. [2] show that, under standard complexity assumptions, some of the most effective compression schemes (grammar compressors, here including the Lempel–Ziv family [101]) cannot support even inner products in time proportional to their compressed size in the worst case, and Chakraborty et al. [44] prove cell-probe lower bounds for Boolean matrix-vector multiplication on any data structure that uses little space. The positive results surveyed here therefore are not worst-case theorems about arbitrary matrices: they are guarantees stated in terms of the size of a particular compressed representation, which is small only on applications where matrices have the structure the representation exploits.

Scope. This survey covers lossless matrix representations that (i) can be significantly smaller than the plain sparse representation on matrices with suitable structure, and (ii) support matrix-vector multiplication, or other algebraic operations such as matrix-matrix sums, products or transitive closure, on the compressed form. We are primarily interested in matrix-vector and matrix-matrix products, with sums and other pointwise operations as secondary operations (because they are easier and/or less frequently used). We organize the literature into four families according to the type of redundancy they exploit:

(1) k2k^{2}-tree based representations (Section 3), which exploit the spatial clustering of the nonzeros and, by recursively partitioning the matrix, support a complete Boolean algebra [12, 15, 32, 63];

(2) Referencing / set-difference formats (Section 4), where a row is described in terms of another, similar row (the idea behind the WebGraph framework of Boldi and Vigna [27] and, more generally, behind the compression of “sets of sets” by symmetric differences [29, 69]);

(3) Grammar-compressed matrices (Section 5), where repeated sequences of (value, column) pairs across rows are replaced by nonterminals of a context-free grammar [65];

(4) Biclique decompositions (Section 6), where complete bipartite subgraphs of the adjacency matrix are extracted and shared [67, 82], a representation that also supports Boolean matrix-matrix multiplication directly on the compressed matrices [10].

We present first the k2k^{2}-trees, which offer good space on clustered matrices and the most general algebra, but also the least gains in time performance. We then present the other three families, which achieve considerable speedups and still yield relevant compression ratios. Experimental numbers reported in Sections 3 to 6 come from the original papers, obtained on different machines, datasets and implementations; they are not comparable across families, and we use them only to illustrate trends. For completeness, Appendix A briefly reviews the formats that must be decoded, at least in part, before they are operated upon.

A unifying view. Beyond describing each format, we stress in Section 7 one observation: referencing, grammar and biclique formats are all instances of a single scheme, a sparse straight-line factorization of the matrix, A=P(I−Q)−1T+T′A = P(I - Q)^{-1}T + T' with four sparse matrices. A right product is then a forward substitution and a left product the transposed backward substitution, each costing time proportional to the number of nonzeros in the factors. This single fact explains why all these formats multiply in time proportional to their size, why left and right products cost the same, why the saving in arithmetic operations equals the compression ratio relative to the plain sparse format (and the observed speedups stay below it), and what really distinguishes the families: the shape and depth of the sharing structure Q and, above all, the (heuristic, expensive) way in which the factorization is found. We use this view throughout the survey, specializing it in each of Sections 4 to 6, and we revisit it when comparing the families (Section 8) and in the open problems (Section 9). The same view shows that the product of two factorized matrices is again a factorization, computed from the compressed pieces (Section 7.3), which generalizes the compositional output of the biclique algorithms; the size of that output cannot be bounded in general, so recompression may be needed. The view is ours and is not stated in the original papers; we also mark other contributions of our own throughout.