Manuscript Offprint
arXiv:2610.35362Computation-Friendly Compression of Matrices: Speeding up Linear and Boolean Algebra
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 ( -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, -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 , instead of the total 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) -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 -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, 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.
2.1 Notation and operations
Let be an matrix over a semiring . We mostly consider two cases: real matrices on the semiring , and Boolean matrices on . Boolean matrices model the adjacency matrices of directed graphs iff is an edge) and, more generally, of binary relations. We write for the number of nonzero entries, for the -th row, and for the row viewed as a vector. When is Boolean it is often convenient to regard each row as the set of columns in which it has a 1, so that becomes a set of sets (e.g., the adjacency lists of the graph).
The operations that we study, in decreasing order of interest, are:
Right product:
Left product:
, the product by a row vector, i.e., the product by .
Matrix-matrix product:
, with .
Pointwise operations:
sum , and (for Boolean matrices) intersection, difference, symmetric difference.
Transposition and closure:
and the transitive closure of Boolean matrices.
In this survey we focus mostly on the right and left products. They are the basic step of the power method, of conjugate gradient and other iterative solvers, of the training and inference of linear models, and of the propagation steps of graph neural networks (GNNs). A typical running example is PageRank [97, 118]: given the row-normalized adjacency matrix of a graph, a teleport probability and a start distribution , one iterates
Gonzalo Navarro
so that the cost of the computation is dominated by repeated products of one fixed matrix by changing vectors [49, 67]. Because the same matrix is multiplied many times, it pays off to spend a (possibly large) one-time effort to compress it.
Matrix–matrix products and transitive closure are the core of Boolean matrix algebra, and arise in context-free and regular path queries over labeled graphs [9, 15, 105], in triangle counting, and in join-project queries in databases [8].
2.2 Plain sparse formats
All the formats below are measured against the plain sparse formats [125]. Coordinate (COO) stores the triples of the nonzeros. Compressed sparse row (CSR) sorts the nonzeros by row and stores three arrays: the nonzero values, their column indices, and, for each row, the position where its nonzeros start; CSC does the same by column. For real matrices with few distinct values, CSR-IV [93] and its variant CSRV [65] replace the values by indices into a table of distinct values. With w-bit words, CSR takes about ( ) + bits, and both products with a vector take time. Boolean CSR drops the values, and takes essentially bits. Those figures are the baseline: the compressed size of a representation C will be compared with , and the speedup potential of a computation-friendly format will be the ratio , measured in the appropriate unit.
Product of sparse matrices (Schoor's algorithm). For the product of two sparse Boolean matrices, the classical algorithm of Schoor [128] works best if is sorted by columns (CSC) and by rows (CSR). It intersects the set of nonempty columns of with the set of nonempty rows of . For each in the intersection, every and every contribute to : the index generates the Cartesian product of the rows of column of and the columns of row of , which is a biclique of . Different values of may generate the same cell, and the duplicates must be removed (for example, with a heap if the aim is to produce the output in CSR or CSC order). The cost is dominated by the number of elementary products, where and are the numbers of nonzeros of column of and of row of . This is on average if the 1s are uniformly distributed [128].
2.3 What is computation-friendly compression?
Definition 1 (Computation-friendly compression). A representation of a matrix is computation-friendly for an operation if can be computed from , in time and working space plus the size of the output.
It follows from Definition 1 that OP cannot be computed by first materializing A (unless C never obtains asymptotic compression). The definition is deliberately loose about the unit in which is measured. For -tree compression, the space is measured in bits and the times are proportional to their amount. For the other three representation families considered in the survey the size is measured in symbols (integers, signatures), and the time is linear in the number of those symbols. Those symbols can be further compressed with variable-length codes; the cost of decoding those is a constant per symbol in the cases we discuss, but it matters in practice (Section 5).
An important aspect of these compression formats is what operations op they can support efficiently, which can range from just matrix-vector multiplications to a complete matrix algebra. To enable a matrix algebra, compositionality is desirable: can the output be directly expressed in the same compressed format, or does one need to recompress it? We also consider the basic problem of efficiently accessing random cells .
Table 1. Summary of the four families of computation-friendly formats and the operations supported on compressed form. “Mat-vec” denotes products by a dense vector. Complexities are those proved in the cited papers (see the corresponding sections for notation); all are with the corresponding notion of .
| Family | Redundancy exploited | ex-Matrices | Operations | Time of mat-vec |
|---|---|---|---|---|
| -tree variants (Section 3) | Clustering of the 1s in the plane | Binary | Full Boolean algebra: | |
| Referencing (Section 4) | Rows similar to other rows | Binary; extendable to real | Mat-vec (right; left by duality); access, etc. | |
| Grammars (Section 5) | Repeated (value, column) subsequences | Real, few distinct values or sparse | Mat-vec (right and left) | |
| Bicliques (Section 6) | Complete bipartite subgraphs | Binary | Mat-vec (right and left); Compositional mat-mat |
We note that the term compressed matrix multiplication is used by Pagh [119] for an unrelated notion: approximating a product by a randomized sketch of the output. It is lossy and approximate, and not covered here.
2.4 Lower bounds and what they imply
Two families of lower bounds apply to our problem. First, Abboud et al. [2] show that, for vectors compressed by applying a grammar compressor (a class where they include the Lempel–Ziv family) to the plain sequence of their values, even the inner product cannot be computed in time linear in the compressed size, in the worst case and under standard fine-grained complexity assumptions; in contrast, for simpler schemes such as run-length encoding it can. Second, Chakraborty et al. [44] prove that any data structure that stores a Boolean matrix in bits, for , requires time for matrix–vector multiplication, a trade-off that no compression can circumvent in the worst case. Related hardness arises in the online matrix–vector (OMV) setting [81, 98]. Finally, the fastest algorithms for general matrix multiplication [5, 52, 132] are asymptotic and need rings, whereas the Boolean case is only a semiring; the practical alternatives are combinatorial algorithms [11], algorithms for sparse inputs [8, 77, 128, 145], and the output-sensitive ones.
The surveyed papers escape these results for two complementary reasons. The first is that their guarantees are instance-dependent: the bounds are in terms of the size of a particular representation (number of nonzeros of a residual matrix, size of a grammar, number of nodes of a tree), which is small only on compressible inputs. For example, a sparse matrix represented in COO, CSR, or a similar format in space is easily multiplied by a dense vector in time. The second, which we believe is crucial for grammars, is that the representations store positions explicitly: in the sequence of (value, column) pairs of Section 5 a repeated substring always refers to the same columns, so that both align with the same part of the vector . This is what the schemes covered by the impossibility results lack. We come back to this in Section 5.
2.5 Computational model
Unless stated otherwise we use the word RAM model with -bit words, as is customary in compact data structures [109]. Several of the structures below rely on succinct trees and bitvectors with rank and select support [86, 109]; we recall only what we need, where we need it.
Gonzalo Navarro

1001 0010 0111 0111 1000 0010 0010 0100 0001
Fig. 1. An Boolean matrix and its -tree for , with three levels. The root signature 1101 says that the top-left, top-right and bottom-right quadrants contain 1s and the bottom-left one (shaded) does not. Each nonempty quadrant has, at the next level, a signature of its own quadrants, and so on until the submatrices, whose signatures mark the cells that are 1 (listed below each of them). Empty quadrants (dashed) are not stored, nor are the cells. The bitvector is the concatenation of the signatures, level by level.
2.6 A taxonomy of computation-friendly formats
We classify the formats according to the kind of redundancy they extract from the matrix. Table 1 summarizes the families covered in Sections 3 to 6. After presenting them, we show in Section 7 that the last three are instances of a single scheme.
3 -Trees and their Algebra
The -tree family exploits the spatial clustering of the nonzeros in the matrix by means of a recursive partitioning into quadrants. It supports a rich Boolean algebra of matrices (sums, intersections, products, closure) whose results are again -trees. The work surveyed in this section was motivated by graph databases, where the algebra is used to solve regular path queries (RPQs), but it is of independent interest as a compressed-matrix toolbox.
3.1 The -tree
The -tree of Brisaboa et al. [31, 32] represents a Boolean matrix of side (padded to a power of ) as a cardinal tree: the root stands for the whole matrix, which is divided into equal quadrants, each of which is either empty (a leaf) or is recursively represented. It is a compact representation of the MX-quadtree [66, 126]. We use throughout, so each node has four possible children, in the order top-left, top-right, bottom-left, bottom-right. The tree is stored level by level, writing for each internal node a 4-bit signature that marks which quadrants are nonempty (Figure 1); the resulting bitvector is the cardinal version of the LOUDS representation of trees [86], and navigation uses , the number of 1s in : the -th nonempty child of the node whose signature is the -th one is the signature number . A constant-time rank needs additional bits [109]. If , in the worst case bits are used, and the space is significantly smaller when the 1s are clustered [55]: if the points can be packed into square clusters of sides , holding points each, then the -tree uses bits. Variants of the -tree are well suited to represent Web graphs [32], RDF stores [6], raster images [54], and -dimensional relations [16], among several others.
Algorithm 1 Right product on a -tree with , assuming has been rounded to the next power of 2. Invoke with ; MULT(root, , 1, 1); assume when .
1: procedure MULT( ) 2: if then 3: 4: else 5: for each quadrant with bit 1 in the signature of do 6: MULT(child( ), , , ) 7: end for 8: end if 9: end procedure
Supporting access. The -tree navigation allows computing any by descending along levels from the root, in time per level, until finding an empty submatrix or the explicit cell value. At each signature, algebraic calculation with determines the child to follow, and a constant-time rank operation computes the position of the signature of that child.
The format can be extended to associate semiring values (e.g., reals) to the nonempty cells. Those values can be stored in an array in the left-to-right order of the leaves. Once accessing a cell at some leaf position , its corresponding real value is at , where is the last position in corresponding to signatures not in the last level. Several of the algorithms in this section can be extended to work on semiring values by using this technique, with some caveats: for example, in the case of a ring like , a zero cell can result from adding nonzero cells, which cannot occur, say, the Boolean semiring.
3.2 Products by a vector
Multiplying A by a dense vector x is simple and natural with the -tree representation. Though it does not appear in the papers on the -tree algebra, the implementation distributed with Arroyuelo et al. [15] (https://github.com/adriangbrandon/rpq-matrix) includes it; see Algorithm 1. The tree is traversed from the root. A single operation on a node returns its signature (the bitmap of its four quadrants) and the nodes of its nonempty children are obtained with a child operation (built on rank, as explained); the recursion continues only on those. The recursion keeps track of the corresponding portions of x and y to operate; note that is the side of the child quadrants. In the last level, the node is a cell with a 1, and it adds one entry of x to one entry of y. The matrix is padded to a power of two, but the vectors are not: the padding has no 1s, so it is never reached. The code obtains the left product, , by computing . The transpose of A is easily simulated by (virtually) exchanging the 2nd and 3rd bit of every node signature as it is traversed.
Every visited node across the computation has a 1 in the bitmap of its parent, and a matrix with has such nodes, so the product time, including that of initializing y, is , with words of working space for the recursion. The traversal accesses the bitvector L left-to-right, which is cache-friendly. Still, this time complexity is worse than the that is easily be obtained with a plain COO, CSR or CSC sparse representation; compared to those formats, the -tree saves space, but not computation time. The formats of the next sections are able to speed this up.
Breaking the barrier (our derivation). A -tree variant designed for matrices with large blocks of 1s [54] marks with bits the quadrants that are full of 1s. To multiply in time
Gonzalo Navarro
proportional to the number of nodes of that -tree (which can be much less than ) one should do for all when arriving at a full quadrant . The sum is easily computed in constant time by precomputing prefix sums on : and for all , thus . Writing all the values can be done efficiently by creating a perfect binary tree on top of , where nodes at depth cover consecutive ranges of cells of . The nodes have counters initialized at zero, and a full quadrant increments the counter of the node that covers by . At the end, we traverse that binary tree from the root to each cell of , accumulating the counters in the path from the root and writing the sum to each cell arrived at.
3.3 A Boolean matrix algebra on -trees
Arroyuelo et al. [14, 15] design and implement an algebra of Boolean matrices on -trees. The operations are applied to matrices, and is returned in the same -tree format, so the algebra is compositional. We call , , and .
Transposition. Since is obtained by exchanging the roles of the second and third quadrants at every node, the -tree is not modified: a transposed flag is associated with the matrix, toggled in time, and honored by every operation in any submatrix of A, as illustrated with left products.
Sum. If neither matrix is transposed, is computed by a sequential pass over both bitvectors, level by level, with a queue of tasks of two kinds: a merge task outputs the bitwise OR of the next two signatures and enqueues, for each child, a merge task (both have it), or a copy task for the matrix that has it, or nothing; a copy task copies one signature and enqueues the copy tasks of its children. No rank operations are necessary; the time is proportional to the sizes of the two trees, , and consecutive copy tasks are merged so that they are executed word-wise, not bit-wise.
Other pointwise operations. Intersection (∩, Boolean AND), difference (−) and symmetric difference (⊕) lack the property that the root signature of the result is a function of the signatures of the operands. They are then computed recursively over the quadrants,
writing each result directly into the level-wise output buffers, and copying whole subtrees word by word when one operand is empty. The authors prove adaptive bounds in terms of the alternation between the two sets of positions of the 1s [18]: for example, the intersection takes time, with .
Product. The multiplication follows the classic divide-and-conquer recursion on quadrants,
Empty quadrants (a 0 in the signature) prune the recursion, and the sum of a product with an empty matrix is just a reference to the product. The cost is shown to be on average, for uniformly distributed 1s (for , this is ).
Table 2. Simplified average-case times of the Boolean algebra on matrices with uniformly distributed 1s; is the size of the closure (from Table 1 of [15]).
| Operation | Baseline (CSR/CSC) | -tree |
|---|---|---|
| Transposition | ||
| Sum and relatives | ||
| Multiplication | ||
| Transitive closure |
Transitive closure. The standard approach, until the matrix stops changing, needs up to multiplications. The authors give an algorithm inspired by Warshall's [141] and by the ZCQ representation of Penn [121] that uses only multiplications' worth of work. Splitting into quadrants, a first stage computes , the matrix of paths whose intermediate nodes lie in the first half of the indices: one starts computing recursively, and then
(computing after the other quadrants). The second stage allows the paths to cross the second half: one first computes recursively, and then
(computing after the other quadrants). The number of recursive calls equals that of a multiplication, which makes the average time with , a log factor better than iterated squaring.
Parallelism. Multi-threaded versions of the recursive algorithms give near-perfect speedup in the PRAM model, though in practice thread-creation overhead outweighs it on very sparse matrices.
An uncompressed baseline. The same paper implements a baseline for sparse Boolean matrices (CSR plus CSC views) with Schoor's algorithm [128] (Section 2.2) for the product, taking average time, and a closure based on strongly connected components [123, 134]. This baseline is used again in Section 6. Table 2 compares the average times of both formats.
3.4 Reported results for the algebra
Arroyuelo et al. [15] show that -trees use 4.33 bytes per cell on very sparse matrices from Wikidata graph databases. They also test various algebra operations on 80 synthetic matrices with densities from to , against the uncompressed baseline and against GNU Octave (an optimized software for sparse matrices, as a sanity check). Table 3 summarizes the space and time ratios they report against the baseline, which in turn is only slightly slower than Octave. The picture is that of a space–time trade-off: the -tree is four times smaller and offers a complete compositional algebra, but a plain sparse representation with Schoor's algorithm is faster, as can be expected from the complexities of Table 2. This is in line with the results shown in Figure 12.
3.5 Kache-trees: cache-friendly -trees
The level-wise layout of the -tree makes any subtree, and in particular a subtree that must be copied to the output, scattered across levels. Fariña et al. [63] propose a depth-first deployment, the
Gonzalo Navarro
Table 3. Time ratios reported by Arroyuelo et al. [15] on synthetic Boolean matrices.
| Operation | Compared to -trees, the baseline is... |
|---|---|
| Space | larger |
| Sum | faster |
| Intersection | faster |
| Multiplication | faster (the parallel -tree reaches speedup on dense products) |
| Transitive closure | faster (except at density , where the -tree beats the baseline; parallelism gives about speedup) |

Fig. 2. Kache-trees against -trees on real Web graphs, as speedups (-tree time divided by kache-tree time, so values above 1 mean that kache-trees are faster; data from Fariña et al. [63]). The -tree is smaller by a factor of 0.85 in all cases. The product did not finish in two cases for lack of memory.
kache-tree, so that every subtree is contiguous. The classical DFUDS representation of a cardinal tree [21, 109] uses bits per node, with a redundant sequence of parentheses apart from the signatures. They observe instead that the DFUDS description of a node is a function of its signature and of its depth, so the parentheses sequence need not be stored: the signatures of the internal nodes in depth-first order, extended with one bit that marks the nodes in the last internal level, are enough, for bits per internal node. The sum becomes a single sequential pass, in which subtrees present in only one operand are copied as one contiguous chunk; the product is the same recursion. On synthetic matrices of side up to 16 000 and density to the kache-tree uses 12–18% more space, is up to 60% faster for sums (more so on sparser matrices, because more whole submatrices can be copied) and products of dense matrices; Figure 2 shows results on real graphs. The gain is attributed to cache misses: perf counts 31%–42% more misses in the -tree for sums, and up to 225% more for products.
A second depth-first deployment [41, 42], designed for other purposes, is discussed in Section 3.7.
3.6 Qdags and prejoining
A different use of -trees performs relational joins on graph databases. Arroyuelo et al. [16] store, for each distinct label in the graph, a matrix of the subgraph of the edges with label , and represent those matrices with -trees. To perform the join, they introduce qdags, which simulate the extension of each participating -tree to a virtual d-ary relation (i.e., a -tree), where is the number of attributes in the join. The join then boils down to a -tree intersection (as seen above, where now each node has quadrants) of all the involved qdags. This technique is shown to be worst-case-optimal (wco) [17, 115, 137] while using very small space (that of the -trees): 4.75 bytes per edge in a Wikidata subgraph, whereas classical wco indexes use over 100. Their drawback is, as expected, a penalty factor in the intersection time.
Arroyuelo et al. [12] introduce prejoining: pick a subset of attributes, project every involved matrix onto those, join the projections (a lower-dimensional, hence much faster, join) and add the result as one more -tree in the main join. They prove that prejoining preserves worst-case optimality, and explore various prejoining strategies: one-shot (prejoin once, on all the joined attributes), leapfrog (a sequence of prejoins on increasingly larger attribute sets, loosely simulating Leapfrog Triejoin [137]), kernel (reduce every table by semijoin with the one-shot prejoin) and weak kernel (the same, attribute by attribute, using precomputed projections). Storing the two projections of each relation as 1-dimensional qdags increases the space by about 30% (from 4.75 to 6.17 bytes per edge), and the speedups over the original algorithm reach three orders of magnitude on some query shapes, making them, on real Wikidata queries, faster on average than the other indexes of similar size.
The key idea that makes prejoining relevant for this survey is that a matrix multiplication, , can be expressed with relational joins ( ) and projections ( ),
In particular, a one-shot prejoin computes , which is the intersection of the nonempty columns of with the nonempty rows of , and then every generates the Cartesian product of the column of and the row of . This is exactly Schoor's algorithm [128] (Section 2.2), which had only been implemented on uncompressed matrices [15], and was well known for its efficiency on sparse matrices; the new technique runs it directly on -trees.
Figure 3 shows the average time of the product of 2 to 4 matrices (P2–P4) on the Wikidata Graph Pattern Benchmark subgraph (81M edges), compared with the recursive algorithm of Section 3.3, and for a single product on the full graph (959M edges). Speedups are about 2–6× for single products, 9–13× for chains of three, up to 7× for chains of four, and 2.5–7× on the full graph; leapfrog is best on chains, weak kernel on the large graph. To remain compositional, the product must also project the result on each of the two attributes.
3.7 Variants that exploit repetitions
Two other approaches keep the underlying -tree structure but exploit repeated submatrices, thereby providing a link to the upcoming sections (most closely, to the grammars of Section 5).
Two-dimensional block trees (2D-BTs). Brisaboa et al. [30] extend the block trees of one-dimensional sequences to matrices. As in a -tree, the matrix is recursively split into submatrices, but a block that is equal to an earlier occurrence of the same submatrix (possibly overlapping up to four adjacent blocks, so not necessarily aligned with the tree) is not subdivided: it becomes a leaf with a pointer to its first occurrence, as in Lempel–Ziv compression [101]. This captures repetition,
Gonzalo Navarro

Fig. 3. Average time (seconds, log scale) of chains of 2–4 matrix products (P2, P3, P4) using prejoin strategies on qdags, against the recursive -tree algorithm, on the Wikidata Graph Pattern Benchmark subgraph; and a single product on the full Wikidata graph (P2 large). Data from Table 5 of Arroyuelo et al. [12].
whereas a plain -tree captures only sparseness and clustering. On Web graphs, the 2D-BT uses 60%-80% of the space of the -tree, with cell access between 30% faster and three times slower; construction is the main drawback (on eu-2005, 7,200 seconds against 67 for the -tree). The paper supports access to cells and to regions, but does not address other operations. While it seems feasible to adapt Algorithm 1 to this format, it is not clear that one can retain time due to the possibility of traversing paths that yield no points. Recursive algorithms for matrix–matrix products and point-wise operations can also be adapted, but again with unclear upper bounds.
Depth-first -trees. Carmona and Manzini [41, 42] observe that the usual level-wise layout of the -tree makes it hard to detect and share identical subtrees, and propose instead depth-first layouts: a plain one, one enriched with skip values for large subtrees, and one based on balanced parentheses in which identical subtrees are shared using pointers. On Web graphs, removing the identical subtrees improves compression (for example, to 73% on their graph ID-2004). Further, some depth-first variants multiply Boolean matrices faster than the standard -tree using the recursive algorithm of Arroyuelo et al. [15], although not on all graphs (and the variant with the best compression, the one sharing submatrices, is the slowest). Their experiments concern matrix–matrix products, not products by a vector, which are mentioned only as a motivation for the sequential scans that the depth-first layout allows.
3.8 Discussion
The -tree line shows that a compressed sparse matrix can support a general algebra without decompression, with each operation costing roughly its uncompressed counterpart times a log n factor (Table 2), and the trade-off between space and speed is explicit: less space for several times more time, or up to 60% gain from a better memory layout for 18% more space. It also shows the importance of the algorithm: the move from recursive multiplication to Schoor-like prejoining yields larger gains than most layout improvements. While some variants manage to exploit structure beyond sparsity and clustering, they do not do so in a computation-friendly form: they are still slower than a plain sparse format like CSR/CSC.
4 Referencing and Set-Difference Formats
4.1 Origins
The idea of expressing a row in terms of a similar one dates back at least to Bookstein and Klein [29], who proposed compressing a collection of correlated bit-vectors by representing each as a set and storing, for a “reference” set, only the symmetric difference. Consider the complete graph whose nodes are the sets, with edges weighted by the size of the symmetric difference of their endpoints. A spanning forest of rooted trees that minimizes the cardinalities of the roots (stored explicitly) plus the weights of the edges gives the best way of expressing the collection this way. The idea was reinvented several times for tables and graphs [3, 22, 34]. Björklund and Lingas [23] seem to have been the first to observe that the weight of such a forest also bounds the time to multiply matrices: if the product of a row u of A by a column v of B is known, then the product of another row by v is obtained by multiplying only the entries in the symmetric difference of u and with the corresponding entries of v and using that to adjust the result.
On Web graphs, rows with adjacent URLs tend to be similar, and Boldi and Vigna's WebGraph framework [27, 28] exploits this copy property: each adjacency list is encoded with respect to a reference among the previous W lists (the window), by marking which entries of the reference not to copy and listing the extra entries. The result is further compressed with universal integer codes. Limiting the candidate references to a window keeps the cost of extracting a list cache-efficient and the construction fast, and a good vertex ordering (lexicographic order of URLs, or label propagation orderings [25, 26]) makes the lists in the window similar. This family of ideas has also been optimized and extended by others [75, 76]. Francisco et al. [67, 68] observed that this representation also accelerates the product by a vector, which is the starting point of this section (an earlier similar result [116] limited the technique to detecting full suffixes shared among rows, instead of any subset of the rows).
Supporting access. While accessing an arbitrary cell is not particularly easy or practical in this format, Gagie et al. [69, 70] show how this could be done in time with sophisticated data structures that use essentially the space to represent all the symmetric differences, or time if using a constant number of times that space. They also support more complex operations.
4.2 Matrix-vector products on a referencing format
Let over a ring , with rows , and let be a referencing vector: and is the row used to encode , with and when no reference is used. Define the residual matrix whose -th row is (we can use the technique on the Boolean semiring by extending the symbols to ; the residual values will stay inside this set). Note that is the number of entries added plus the number of entries removed when moving from the reference to the row.
Proposition 2 ([67]). Let w be the vector with . Then .
PROOF. , where , and .
Gonzalo Navarro
Algorithm 2 Right product y = Ax from a referencing representation (A', r) [67].
1: 2: for do 3: 4: end for 5: return y
Because , the entry is already known when is computed, which yields Algorithm 2. The number of operations is proportional to the number of nonzeros of , that is, to the size of the compressed representation (plus for the additions of the references).
Left products (our derivation). The paper handles the left products that PageRank needs by storing the transposed matrix with its own reference vector (Equation (1) uses left products, whereas the representation is row-oriented). The referencing structure also supports the left product directly, by duality (an instance of the general principle presented later, in Section 7). Unrolling the references gives , where contains until the root. Therefore, contributes to all the rows in subtree( ), the subtree of in the reference forest. This allows, if we precompute , to compute . The values are precomputed in one pass over , setting first and then adding to when processing ; this is possible because . The cost is again .
Vertical slicing. The quality of the method depends on how good the references are. For wide matrices it is hard to find a previous row that matches in all columns, but easier to find one that matches in a narrow band of columns. Francisco et al. therefore split A vertically into submatrices of columns each, compress each with its own referencing vector, and compute where is the corresponding slice of . Setting gives the original method.
4.3 Differential compressed binary trees
Nelson et al. [112, 113] (see also the dissertation [111]) use the same idea of encoding each row as a difference with a previous row in a window, but encode the rows differently, with trees instead of integer codes. Each row of the Boolean matrix is a compressed binary tree (CBT): a binary tree of depth over the column range, in which every node stands for a range of columns and is stored with a single bit, which is 1 if the range contains at least a nonzero (and, at the last level, if the cell is a nonzero) and 0 otherwise. Empty ranges are thus pruned, and the path to each nonzero descends to the last level. The binary tree is deployed in preorder, so it uses at most bits, where , and allows obtaining the 1s in the row with a full traversal. The dissertation also improves the encoding of branches that are full of 1s.
In the differential variant, row is stored as the CBT of its differences with a row in the window (so the 1s mark the cells where the rows differ), plus one bit in each leaf that tells whether the change inserts or deletes the cell, exactly as the residual with entries +1 and -1 of this section. A product then reuses in the form , and its time is proportional to the size of the compressed differences, as in Algorithm 2; the encoding of is what changes.
4.4 Matrix-matrix products
Francisco et al. [67] only sketch matrix–matrix products. If A has rows and reference vector , and has rows and reference vector , then for ,
so that, when C is computed in an order in which , and are already known, only the dot product of two residual vectors remains. Those vectors are sparse, and choosing to iterate over the support of the sparser one (or intersecting the supports adaptively [18]) may give an additional speedup. This was left for future work, and, to our knowledge, Equation (2) has not been evaluated. Note that it still computes all entries of C, so it is useful only when the output is dense; for sparse outputs the techniques of Section 3 are more natural.
Alves et al. [7] independently define the Compressed Binary Matrix (CBM) format, which is the referencing format of this section applied to the product of a binary adjacency matrix by a dense matrix of embeddings , the core operation of training and inference of GNNs. Beyond an obvious column-wise computation of , the product is done in two stages: an off-the-shelf sparse matrix multiplication computes , and then the rows of the result are updated in topological order along the reference forest of , . We derive a more general version of this idea later, in Section 7.3.
Nelson [111] considers Boolean matrix–matrix products when both are represented with references, concretely, the rows of A and the columns of B are CBTs. An entry is the Boolean inner product of the row i of A and the column j of B, computed by traversing their two trees in preorder at the same time: the branches that are 0 in either tree are skipped in both, and the computation stops with a 1 as soon as two leaves with a 1 coincide. Looping over the columns of B and then over the rows of A builds C column by column, directly as CBTs, so C is already in the format required by the right operand of the next product: products can then be composed in that direction, and the output has to be transposed to be used as the left operand. Nelson describes this product for the plain encoding and does not report experiments on it for static matrices.
4.5 Experimental results
Figure 4 (left) summarizes the evaluation of Francisco et al. [67] on Web and social graphs from the LAW collection [24, 25, 27], using ten PageRank iterations. The residual matrix was extracted from the WebGraph representation, recompressed as a WebGraph, and the computation was performed on it (a positive and a negative graph for the +1 and -1 entries).
The results follow the compressibility of the graph. On page graphs, has 17%–26% of the nonzeros of A and the speedups are between and ; on host graphs it has about 30% and the speedup is about ; social networks, which are known to be less compressible in this sense [46], show no gain. The speedup is systematically below : profiling showed that the nonzeros of are more scattered in memory than those of A, so the plain product benefits from contiguous accesses. Vertical slicing gave only a small further reduction of nnz (a few percent for 32 to 128 slices), whereas the total size of the compressed submatrices grew considerably with . The practical bottleneck is the preprocessing: recompressing the graphs took hours for the largest instances.
The right of Figure 4 shows the results of Nelson [111] on five Web graphs of up to edges, compared with the implementation of Francisco et al. [67]. The CBT versions are slightly smaller (2%–9%), the number of nonzeros of the residual is slightly smaller too, and the time with differences is between 17% and 26% lower; the speedup over the product without differences (that is, from reusing results) goes from to , against to with WebGraph. The
Gonzalo Navarro

Fig. 4. Speedup of a product by a vector with the residual matrix over the product with A, as a function of the reduction in nonzeros ( , ). Points on the dashed line would achieve a speedup equal to the reduction. Left: PageRank, window (except for gsh-2015), data from Francisco et al. [67]. Right: data from Nelson [111], with the WebGraph (BV) scheme (hollow marks) and compressed binary trees (filled marks) on the same graphs. The two panels come from different codes and machines, so only the comparison within a panel is meaningful, not across panels.
author attributes the gain to a faster decoding and to a better compression of the differences, which allows more reuse. Once again, the speedup follows the reduction in nonzeros.
4.6 Finding the best references
The quality of a referencing format depends entirely on how the references are chosen. Let us interpret rows as sets , so the matrix is seen as a set of sets over a universe (so ), and let be an additional empty set (whose use as a reference means that the row is stored explicitly). Consider the complete graph on where the edge between and has weight , the size of their symmetric difference. A referencing vector is exactly a spanning tree of this graph, rooted at (each node points to its parent, ), the number of nonzeros of the residual matrix is the weight of the tree, and the time of the product of Algorithm 2 is . (The condition used in Algorithm 2 is only a convenient way of stating that rows are processed in an order in which the reference precedes the row, for instance a breadth-first order of the tree, which can always be obtained by renumbering the rows.) The best referencing vector is therefore a minimum spanning tree (MST) of this graph (the tree is the set of references ; we return to this view in Section 7). See Figure 5 for an example.
This reduction goes back to Bookstein and Klein [29], was used by Björklund and Lingas [23] to speed up Boolean matrix products, and has been rediscovered several times [3, 22, 34]; it is also the basis of the Compressed Binary Matrix format that Alves et al. [7] use to accelerate GNNs. Gagie et al. [69] refine it by also allowing a second root [1..m] (the universe), so that a row can be built by deleting elements from [1..m] instead of inserting elements into , which benefits dense rows; the

Fig. 5. Symmetric-difference graph of the rows of the running example, with the extra node . Edge weights are ; only some edges are drawn. The solid blue edges form an MST rooted at , of weight ; rows 4–6 are at distance 4 from and from each other, so a reference among them (for example ) gives the same nnz( ) but adds a pointer, and the edge 1–3 (dashed) of weight 2 is not used because 3 is at distance 1 from 2. Adding the 2 reference pointers and gives the size of Table 4.
weight of the MST of the resulting graph is called the symdiff compressibility . They also study the simpler insertion compressibility , where each set is described by the elements it adds to its largest subset in the collection (the dual of the containment entropy of Alanko et al. [4]). The products then cost .
The cost of finding it. The MST is expensive to obtain. Just computing the weights of the edges takes time, where [69], and Prim's algorithm on the complete graph more; this is also close to the cost given by Alves et al. [7]. Such a cost is infeasible for Web graphs, where is in the hundreds of millions or billions. Practical alternatives give up optimality or exploit special structure:
-
Windows. The WebGraph framework [27] restricts the candidates of row i to the previous W rows, which reduces construction time to , and picks the best one greedily (this is a heuristic: the result is a forest, not an MST, of the restricted graph). It relies on an ordering that puts similar rows close to each other (URL order, label propagation [25]).
-
Approximate MSTs. Björklund and Lingas [23] already used approximations of the MST, since the exact one is too costly. Likewise, to avoid computing all the pairwise distances one could look for similar rows with sketching and locality-sensitive hashing [33, 79] or approximate Hamming distances [95]; MinHash is already the first step of biclique extraction (Section 6).
-
An exact MST without all the weights. Gagie et al. [69] observe that in compressible matrices the edges of the MST are light. They build a suffix tree of the concatenation of the sorted sets, which gives in constant time the longest common prefix of any two sets (and thus allows enumerating the elements of one by one), and run a variant of Prim's algorithm that discovers weights incrementally, from smallest to largest. The time is , where is the largest weight in the MST. This improves on the quadratic bounds whenever is small, that is, exactly when the matrix is compressible.
Gonzalo Navarro
Even so, the preprocessing is the practical bottleneck: the recompression of the largest graphs by Francisco et al. [67] took hours (this can be more manageable on smaller graphs: Alves et al. [7] reports 16 seconds on a 32-million-edge graph).
Referencing for GNNs. The technique of Alves et al. [7] to compute with dense B differs from the plain MST scheme in that a threshold discards the references that save fewer than operations, since traversing the tree has a cost; the graph becomes directed (a minimum cost arborescence replaces the MST) and the root gets a larger out-degree, which exposes more parallelism, at the price of losing useful references if is too large. They report speedups close to over the sparse matrix multiplication of Intel MKL, almost for the inference of a two-layer GCN on the best graphs (co-paper graphs of average degree 57–75), and no gain on graphs of average degree below 6 (Cora, PubMed).
Beyond spanning trees. The MST uses only the given rows as nodes. Gagie et al. [70] explore the possibility of adding additional graph nodes that are good references. For example, adding an extra row to our running example allows rows 4, 5 and 6 to refer to it at cost 2, thereby reducing to 14 instead of 18. Finding the minimum-weight MST with added rows then becomes an undirected Steiner tree problem (the auxiliary sets are exactly the auxiliary nodes of the factorization of Section 7). The Steiner problem is NP-hard and APX-hard in general graphs [47], but -approximation algorithms exist [40]. Still, the MST on the original nodes is already a 2-approximation in any metric, so auxiliary nodes could reduce to a half at best. Similar ideas could be applied for the grammar and biclique techniques of the next sections.
Other extensions explored [70] include operations like taking the union or intersections of other rows. The optimization problem now becomes the multitarget circuit complexity, which is hard to approximate below any relevant ratio [84].
4.7 Discussion
Referencing formats are simple, effective on data with strong row-to-row similarity (web graphs, co-authoring/co-citation graphs), and support the right and left products with extremely simple algorithms. Their weaknesses are (i) reliance on a good row ordering or an expensive MST for construction, (ii) the fact that the realized speedup is bounded by memory locality rather than by the number of operations, and (iii) the dependence on whole-row similarities, which makes them blind to repeated pairs of values in two columns that are separated by columns whose contents vary. The grammar approach of the next section addresses the last point.
5 Grammar-Compressed Matrices
Referencing formats exploit similarity between entire rows. Many matrices, in particular those arising in machine learning, instead contain partial repetitions: the same combination of values appears in the same columns in many rows, even if the rows differ elsewhere. This was observed in the Compressed Linear Algebra (CLA) system of Elgohary et al. [59, 60], which groups correlated columns and compresses each group with lightweight schemes (offset lists, run-length encoding, dictionary coding) that support matrix–vector products directly. Ferragina et al. [65] propose a more general mechanism: compress the matrix, once linearized, with a grammar compressor, and show that products can still be computed in time linear in the size of the grammar.
Fig. 6. A small matrix with its CSRV sequence S (first rows) and some of the rules RePair would create (adapted from [65]). The pair stands for the value in column 1; the same value in column 3 is the different symbol .
5.1 The CSRV representation
Their starting point is a variant of CSR that suits matrices with few distinct values. Let be the table of distinct nonzero values of over a semiring . The Compressed Sparse Row/Value (CSRV) representation is a sequence obtained by scanning the matrix row by row: for every nonzero append the pair with , and at the end of each row append a separator \. The length of is then . The key property is that the pair stores the column together with the value index, so that two entries are the same symbol only if they have the same value in the same column. The right product is done by a single scan for each pair in row ) and the left product with another . For example, rows and share the prefix (with the value indices of ), which a grammar can factor out (nonterminal in Figure 6, see next).
5.2 Grammar compression
A grammar-compressed representation of a string is a context-free grammar that generates only . For simplicity, we assume a straight-line program (SLP) [104]: a set of rules , where and are terminals or earlier nonterminals, and the expansion of the last rule is . The size of the grammar is the number of rules (each with two symbols on the right-hand side). Finding the smallest grammar is NP-hard [45, 131], but practical compressors such as RePair [99] obtain good grammars heuristically. Grammars can compress very repetitive inputs, within a logarithmic factor of the best Lempel–Ziv-based compressors [87, 110, 124]. RePair repeatedly finds the most frequent pair of adjacent symbols , replaces all its occurrences by a new nonterminal , and stops when no pair appears twice. Note that its output is not exactly an SLP: it is a set of rules plus a final sequence of terminals and nonterminals, whose expansion is (one can regard as a last rule of arbitrary length). The size of the representation is then .
To compress CSRV, the sequence is fed to the grammar compressor, which is forbidden from using the separator (C, R, V)\langle \ell, j \rangleC = C_1C_2\cdotsC_n|C| \geq n$. See Figure 6 again for an example.
Supporting access. Because the symbols of any partition the nonzero columns into contiguous ranges, we can binary search to find its only symbol that could contain the cell at column , and then navigate towards the right terminal by the rules, to determine that or zero. If the grammar is balanced (i.e., of height , as in many grammar constructions), this enables accessing in time. Note that this does not work if we reorder columns to improve compression (Section 5.5). See also Tabei et al. [133], which predates Ferragina et al. [65] in the use of grammar-compressed matrices but still decompress whole rows or columns in order to operate the matrices.
Gonzalo Navarro
Algorithm 3 Right and left products on a grammar-compressed matrix [65]. val() is for a terminal and for a nonterminal ; is the number of rules .
1: procedure RIGHTPRODUCT() 2: for each nonterminal , do 3: 4: end for 5: for each row do 6: 7: end for 8: end procedure 9: procedure LEFTPRODUCT() 10: ; 11: for each row and each symbol do 12: add if , or if 13: end for 14: for each nonterminal , do 15: for do 16: add if , or if 17: end for 18: end for 19: end procedure
5.3 Products on the grammar
Let and, for a nonterminal with expansion , . Then for a rule , and equals the sum of over . Hence the values of all the rules are obtained in one pass, in creation order (each nonterminal depends only on earlier ones), and then each row sums the values of its symbols:
Theorem 3 (Right product [65]). Given , the product can be computed in time using words of auxiliary space.
The left product is the transposed computation. Define rows( ) as the rows whose compressed representation uses , and . Initializing an array so that holds the sum of over the rows such that contains , and scanning the rules backwards from down to , a rule transfers to each of its symbols: to if the symbol is a nonterminal (with ), or to if it is a terminal . When a rule is reached, all the rules that mention it have already been processed (they have larger indices), so .
Theorem 4 (Left product [65]). Given , the product can be computed in time using words of auxiliary space.
Algorithm 3 gives both procedures, which are an instance of the forward and backward substitution of the general scheme of Section 7.
5.4 Implementation and variants
The prototype [65] builds the CSRV sequence (as 32-bit integers: 0 for with ) and runs a modified RePair that does not pair separators. Three encodings of the grammar trade time for space: re_32 (plain 32-bit integers, the fastest), re_iv (packed arrays with bits per entry, max being the largest integer to encode) and re_ans (packed rules, and C compressed with the asymmetric numeral systems entropy coder of Moffat and Petri [108]). The more compact encodings reduce peak memory but not the number of operations, so they are slower. For multithreading the matrix is split into b blocks of rows that are compressed and multiplied independently; the left products are summed at the end, and the value table V is shared.
5.5 Column reordering
RePair factors out pairs of adjacent symbols that repeat; adjacency is crucial for it to run in linear time (we will see in Section 6 the complications that arise when allowing non-adjacent symbols). Therefore, placing correlated columns next to each other helps. Since the order in which the pairs are written inside each row segment is free, any permutation of the columns can be applied without altering the multiplication algorithms and without storing the permutation, because each pair carries its original column information. Finding the best order is NP-hard for table compression in general [35], and heuristics are standard in that area [43, 88, 139]. Ferragina et al. define a column-column similarity , where is the number of repeated pairs of nonzeros in columns and (this models how well RePair would compress the two columns if placed together), computed by hashing or sorting in or time, and optionally pruned to the top values per column. They then use it in four reordering algorithms:
• LKH: a travelling-salesman formulation solved with the Lin–Kernighan–Helsgaun heuristic [80];
• PathCover: a Kruskal-like algorithm that picks edges by decreasing weight if they extend disjoint paths;
• PathCover+: a variant that recomputes the similarity of the nodes to a path after each extension (never the best in their experiments);
• MWM: a maximum-weight matching on a bipartite graph that induces a predecessor/successor relation.
5.6 Experimental results
The experiments use eight matrices from machine-learning repositories, stored as 8-byte doubles, and compare with gzip, xz and CLA; the benchmark alternates right and left products ( , ), 500 times, which mimics conjugate-gradient iterations. The numbers below are taken from Tables 1 and 5 of Ferragina et al. [65]. Figure 7 shows space and time for matrix-vector products on some matrices. Figure 8 relates, for each matrix, how much re_iv compresses it to how much faster or slower the product is than on the dense matrix.
The main findings are: (i) the size is usually smaller than that of gzip and often not far from that of xz, which cannot be multiplied without decompression; (ii) with 16 threads the peak memory is for most matrices between 6% and 50% of the dense size, and for five of the eight inputs below 20%; (iii) compared with CLA, re_ans is smaller on all the matrices on which CLA could run, except Higgs (re_iv is marginally larger than CLA on Covtype and Mnist2m), the peak memory of the grammar-based representations is between and smaller, and they are at least twice as fast (CLA's running time includes its compression, and CLA runs inside a Java system, which
Gonzalo Navarro


Fig. 7. Left: compressed size (percentage of the dense matrix, log scale) of gzip, xz, CSRV and the grammar-based formats re_iv and re_ans, with no column reordering (Table 1 of Ferragina et al. [65]). Right: seconds per iteration (log scale) of the matrix-vector benchmark for re_iv (16 threads, with column reordering), CLA (80 threads, time including compression) and the dense matrix (Table 5 of the same paper).
makes the comparison of absolute times delicate; CLA failed on Susy); (iv) as Figure 8 shows, on the most compressible matrices (Airline78, Covtype, Census, with size ratios from 10 to 50) the compressed multiplication is even faster than the one on the dense matrix, by factors between 3 and 12; on the least compressible ones (Susy, Higgs, Optical, with ratios below 3) the product is slower than the dense one, and for Mnist2m and ImageNet the two are about equal. Compression itself is slower than CLA on some matrices; yet it is a one-time cost.
The compression performance is mainly driven by the time to run RePair, which is linear in nnz(A). For example, building the variant re_iv on matrices with 285–400 million edges with 16 threads takes 1.0 to 2.5 minutes. While there is no available data for direct comparisons, this seems to be considerably faster than the compression times reported in Section 4.
With respect to column reordering, LKH is orders of magnitude slower than the others and is not competitive. The best of PathCover and MWM, applied per block of rows, gave size reductions with respect to no reordering of up to 16% (on Covtype) and 10% (on Airline78), and reductions of the peak memory during the product between 5% and 15% on half of the matrices. Reordering sometimes hurts: on Mnist2m it left memory unchanged and increased time by 5%. For Airline78 the memory reduction translates into a 25% reduction of the average running time; on Susy reordering slightly increases the peak memory, with no significant change in time.
5.7 Discussion and related work
Grammar compression has also been used for graphs [50, 106] and for bipartite sparse binary matrices [144]. The distinctive features of Ferragina et al. [65] are the explicit handling of the values

Fig. 8. Size ratio (dense size over re_iv size) against speedup of the matrix-vector product over the uncompressed matrix, for the eight matrices of Ferragina et al. [65] (re_iv with column reordering and 16 threads; Table 5 of that paper). The dashed line is speedup = size ratio; the bars show the uncertainty caused by rounding the times to 0.01 s. Points below the horizontal line at 1 are slower than the dense product.
(so that real matrices are covered), products in time linear in the size of the grammar, and the column reordering step. The approach is a natural candidate for becoming a new compressor within a CLA-like framework. The paper lists, as open directions, row permutations and co-clustering, semiring-annotated data (joins computed by replacing + by OR and × by AND), columnar databases, and graphs; see also [135] for lossless compressed formats in the context of greener matrix operations. Limitations are the space for compression (RePair needs words of memory), the dependence of the left product on a backward scan of the rules, which restricts the choice of encoders for R (few compressors support right-to-left access), and the disappointing single-threaded running time for large matrices, so blocks of rows and parallelism are needed.
6 Biclique Decompositions
6.1 Idea and representation
A biclique of a directed graph is a pair of node sets such that every node of S has an edge to every node of T; in the adjacency matrix it is an all-ones submatrix, up to permutation of rows and columns. A biclique with and describes st edges with node identifiers, so large bicliques give large savings. Feder and Motwani [64] studied this kind of clique partition as a way to compress graphs and, in the same paper, to speed up graph algorithms by running them on the compressed graph. Buehrer and Chellapilla [36] mined such dense patterns in Web graphs with pattern-mining techniques and replaced each one by a virtual node w with edges , which is the form later used by Karande et al. [89] to speed up algorithms on compressed Web graphs (although, as noted in [67], that approach requires correcting the results of the computation). Hernández and Navarro [82] designed a scalable extraction method for Web and social graphs, which is the one used by the works surveyed here.
Gonzalo Navarro
Definition 5 (Biclique-based representation). Let be a directed graph, with adjacency matrix . A biclique-based representation is a pair , where is a set of bicliques of and is the residual graph, the edges that are in no biclique. We write and for the matrices of the edges covered by and of , so that (Boolean sum).
Edges may belong to several bicliques (duplicates are allowed, because they can lead to a better representation). The space is words, with each set stored contiguously (the residual graph sorted by rows) and a bitmap to mark where each set starts; in practice the identifiers are further compressed with differential encoding and universal codes [28].
Finding a set of bicliques that minimize space is NP-hard, hence extraction is heuristic. The extraction algorithm of Hernández and Navarro [82] works in four steps: (1) it computes a small MinHash signature [33] of each adjacency list, to estimate similarity cheaply; (2) it clusters lists with similar signatures; (3) inside each cluster, it sorts the elements of each list by their frequency in the cluster, so that frequent elements come first; and (4) it builds a prefix tree of the sorted lists, from which the bicliques are extracted. This is repeated for several iterations with parameters such as the minimum degree of the nodes that are processed (minAdjNodes) and the minimum number of edges of the extracted bicliques. The format is competitive in space for both Web graphs and social graphs, which is its main advantage over referencing formats (Section 4), where social networks are hard to compress. The extraction heuristics make capturing non-contiguous sets of columns (and rows) feasible, even if still slower than the linear-time RePair grammar construction of Section 5. For example, Araya et al. [10] report 15 minutes to extract the bicliques of a graph with 640 million edges. We return to this point later.
Theoretical background. The size of a biclique decomposition is the total number of vertices of the bicliques. Krapivin et al. [96] show that every -vertex graph has a biclique partition (every edge in exactly one biclique) of total size about , that this is tight, and that for edge density the optimal size is about , where is the binary entropy; they give deterministic constructions in time, and in sparse graphs with edges. They note that this yields -time algorithms for independent set and cut queries. Since the product by a vector costs time proportional to that size (Section 6.2), this implies that any Boolean matrix can also be multiplied by a vector in operations after the decomposition (a consequence we draw). These are worst-case bounds; the algorithms below are heuristics that exploit the structure of real graphs, and they also allow a residual set of edges not covered by any biclique.
Supporting access. While Hernández and Navarro [82] showed how to extract all the nonzero cells of a matrix row or column in optimal time, they cannot efficiently compute an individual cell (without extracting the whole row or the whole column ). This is because the edge can appear in any biclique (or in the residual matrix). While they use a format that allows jumping to the next biclique where or , the search takes time in the worst case.
A space comparison across families. Araya et al. [10] provide a (rough) comparison of compressed space across the families we have studied, for binary matrices. Figure 9 shows the results in graphic form, for seven graphs of 2.3M to 640M edges (from LAW, SNAP and the Network Repository). The comparison includes standard -trees (Section 3), WebGraph as a representative of reference compression (Section 4), and RePair32, an implementation of the compression of Ferragina et al. [65] for binary matrices, as a representative of grammar compression (Section 5). It also shows the CSR/CSC baseline of Arroyuelo et al. [15].

Fig. 9. Bits per edge of the CSR/CSC baseline, the biclique-based representation (adaptive extraction), the -tree, RePair32 and WebGraph, on the input matrices (log scale; data from Araya et al. [10]).
Algorithm 4 Right product y = Ax from a biclique decomposition plus residual [67].
1:
2: for each biclique do
3:
4: for each do
5:
6: end for
7: end for
8: for each residual edge do
9:
10: end for
11: return y
It can be seen that, in most cases, WebGraph uses much less space than the others, followed by -trees. Those use in turn much less space than RePair32, and bicliques use the most space. Still, bicliques use only 13%-36% of the space of the baseline. On the other hand, only bicliques and -trees have implemented matrix-matrix multiplications and, as shown in Section 6.4, bicliques are much faster.
Gonzalo Navarro

Fig. 10. PageRank on biclique decompositions, data from Francisco et al. [67]: speedup as a function of the size ratio , with , residual edges and the sums counting the vertices of the bicliques. The dashed line is speedup = size ratio. eu-2015-host-t is the transposed matrix.
6.2 Products by a vector
The biclique structure enables computing the product as in Algorithm 4 [67]. Its time is , that is, proportional to the size of the compressed graph plus the output. The same procedure with the roles of and exchanged ( , then add to for every ) computes left products. A biclique is thus a shared sub-computation that is evaluated once, in a way that resembles a nonterminal of a grammar, with the difference that it shares a set of rows and the same set of columns; a grammar rule on a CSRV sequence factors out a set of columns that are consecutive in a row (possibly after reordering) among the rows that contain that subsequence, and can be nested arbitrarily, whereas a biclique has depth one. In this sense, bicliques are the simplest instance of the general scheme of Section 7.
Experimental results. Figure 10 shows the results on PageRank, obtained by Francisco et al. [67] on top of the extraction software of Hernández and Navarro [82]. As with referencing, the speedup grows with the reduction ratio: with a ratio near 1 the (small) cost of processing the bicliques dominates and the method is slightly slower than the plain product, whereas on it-2004 the speedup is (with a size ratio of 5.38) and on the transposed eu-2015-host it is (ratio 4.03). Remarkably, the biclique sizes (the totals of and ) have a super-linear effect on : a relatively small description removes many edges; on it-2004 the bicliques add about 60 million vertices to remove about 1 000 million edges.
6.3 Boolean matrix-matrix products
Araya et al. [10] extend the biclique representation to support products of two Boolean matrices , with and , and make it compositional: the output is also a biclique-based representation, so products can be chained. The idea builds on Schoor's algorithm [128], which is also the basis of the prejoining technique of Section 3.6.
Schoor’s algorithm revisited. We recalled in Section 2.2 the algorithm for , with A stored by columns (CSC) and B by rows (CSR): each t in the intersection of the nonempty columns of A and the nonempty rows of B contributes a biclique to C, formed by the rows i of column t of A and the columns j of row t of B. The compact implementation of Arroyuelo et al. [15] takes time and words of space, and is the baseline in the experiments below.
Products on bicliques. Write and (Theorem 5). Then
and each of the four terms is computed with an adaptation of Schoor’s algorithm, always producing bicliques rather than individual cells, except for the first one:
-
Residual by residual is the original algorithm of Arroyuelo et al. [15], and produces the residual of the output in CSR format.
-
Matrix by bicliques . For each biclique of , intersect the nonempty columns of with . Every common element gives the rows of column of . The result is a single biclique whose row set is the concatenation (after removing duplicates) of the rows obtained from for all common , and whose column set is .
-
Bicliques by matrix is symmetric: for each biclique of , intersect with the nonempty rows of ; the output biclique has rows and, as columns, the union of the columns of the rows of found.
-
Bicliques by bicliques . A table marks lists, for each vertex appearing in some row set of a biclique of , the column sets of all the bicliques of whose row set contains . For each biclique of , every element of is looked up in marks, and the output biclique has rows and, as columns, the union of the column sets found.
The output is then (Boolean sum) and , which is again a biclique-based representation (some edge of may also be in , which does not affect correctness). This composition is the simplest case of a general product of compressed matrices, which we present in Section 7.3. Compositionality lets matrices stay in this format throughout a computation (and makes it easy to add transposition and sums to the algebra). Its drawback is that the output bicliques may be worse than those that extraction would find on (for example, bicliques with or are better in the residual), so the output can be recompressed at any time, by converting it to CSR (using marks to concatenate and deduplicate the column sets of each row) and running the extraction again. Only the CSR of each matrix is stored; the CSC needed by Schoor's algorithm is built on the fly, since the cost of doing so is very small compared to that of the multiplication (the baseline of Section 3.3, instead, stored both CSR and CSC).
Usage scenarios. The same algorithms support three scenarios: (i) bicliques used only as an accelerator, with matrices in CSR on input and output (extraction and conversion back to CSR is part of the multiplication process); (ii) bicliques as the permanent representation of inputs and outputs, with recompression of the output; and (iii) the same without recompression.
Boolean sums (our derivation). It is easy to compute as and (Boolean sums) in time proportional to the compressed spaces. That is, we simply take the union of the bicliques and of the residual edges, exploiting the fact that we allow repeated
Gonzalo Navarro


Fig. 11. Biclique extraction with fixed and adaptive parameters, ten iterations (data from Araya et al. [10]). Left: space of the representation, , as a percentage of the number of edges. Right: extraction time in seconds (log scale).
edges. While the result is correct, it possibly uses more space than the result of recompressing C. An intermediate alternative is to improve the representation, for example eliminating duplicates in , eliminating bicliques contained in others, detecting bicliques that can be extended, and so on. For example, contained bicliques can be detected by using Bloom filters and checking the cases that pass the filters. For extending cliques we can compute signatures for each in and of ; if the signatures coincide we can check that and, if so, merge bicliques and into one, . We can analogously merge and when .
6.4 Experimental results for matrix-matrix products
Adaptive biclique extraction. The extraction algorithm of Hernández and Navarro [82] sets its parameters arbitrarily at the start and does not use information about the graph, so tuning it is cumbersome, and the extraction is the dominant cost of scenario (i). Araya et al. [10] make it adaptive. First, to target large bicliques and reduce the work per iteration, the first iterations process only the nodes of high degree: minAdjNodes is initialized to the 90th percentile of the degree distribution (that is, only the 10% of nodes with highest degree are processed). Second, after each iteration, if the number of bicliques extracted is below 0.8 times the historical average per iteration, minAdjNodes is reduced by 20%, which lets later iterations reach nodes of lower degree. Figure 11 compares the adaptive extraction with the fixed-parameter one (ten iterations in both): the adaptive version is better in compression and in time in almost all cases, usually taking 45% of the time (as little as 29%) and, measured in bits per edge, 61%-88% of the space of the non-adaptive result. The exceptions are web-Google, where the adaptive version takes 162% of the time but the

space reduction of the input (baseline bits per edge / format bits per edge)
Fig. 12. Space reduction of the input (bits per edge of the CSR baseline over bits per edge of the format) against speedup in the time to compute with respect to the CSR implementation of Schoor's algorithm, for the seven graphs of Araya et al. [10] (log-log scale; marker size grows with the number of edges; values below 1 in the vertical axis are slowdowns). In the accelerator scenario the matrices stay in CSR, so the space reduction is 1 and the extraction time is included.
non-adaptive one practically fails to compress (it keeps 98% of the space of the plain edge list, against 59% for the adaptive one), and wikipedia-link-lmo, where the adaptive result is slightly larger (104% of the space).
Multiplications. Araya et al. [10] extend the C++ implementation of [15] and measure matrix-matrix multiplication times on the same graphs of Section 6.1 on a 256 GB AMD EPYC server, with sequential code. To measure products of the form they compute and charge the extraction time of the two matrices. We summarize the main findings; Figure 12 gives the data.
-
Bicliques as accelerator (scenario i; the diamonds of Figure 12). The matrices stay in CSR and the bicliques are used only to speed up the product. Even counting extraction, the method is up to faster than the baseline on indochina-2011 and on the largest graph (arabic-2005), whereas on small matrices, which the baseline multiplies in a few seconds, it is slower. Extraction is the dominant cost, which is why the improvements of Section 6.4 are key.
-
Bicliques as representation, with recompression (scenario ii; the circles). The output uses 18%–38% of the space of the baseline (which stores only CSR); on large matrices it is competitive with the baseline in time (30%–60% slower, and 16× faster in one case), and it is slower by up to 8× on small ones. It is almost always faster than the -tree, by up to 59× (the -tree wins only once, by 18%), although the output of the -tree is generally smaller by a factor of 2.3–2.6.
Gonzalo Navarro
-
Without recompression (scenario iii; the triangles). The multiplication is up to faster than in scenario ii, the compressed space degrades by 7%-40% in most cases, the output uses 20%-52% of the space of the baseline (storing only CSR), and it is almost always faster than the baseline, by up to (and slower in one case, by 44%).
-
Powers of a matrix. Matrices become much denser when multiplied: the number of edges grows by about an order of magnitude with each squaring, and matrices that are products are much more compressible with bicliques (which is not surprising in light of Schoor's algorithm, which generates them as bicliques). When computing with and without recompression of , both are faster than the baseline (up to ) and the -tree (up to ), and recompressing makes the whole process almost twice as fast as not doing so, so intermediate recompression pays off. The two largest matrices could not be raised to the fourth power for lack of memory.
Overall, Figure 12 shows a trade-off between space and time: the -tree compresses the input the most (20–28 times on five of the graphs) but is slower than the baseline in six of the seven cases; bicliques compress less (3–8 times) and, without recompression, give the largest speedups. The small graphs, with the smallest markers, are always below the large ones, because the fixed cost of the extraction is only paid back when the product is expensive.
6.5 Discussion
Bicliques are the most structured family: they have the clearest semantics (they capture communities of nodes that point to the same targets) and they work well on graphs that are not handled by referencing. Exploiting the fact that Schoor's algorithm produces bicliques by construction, they feature rather natural compositional matrix–matrix multiplication algorithms, the only one implemented and evaluated in the family of the factorization type (Section 7, presented next). Their weaknesses are relatively large size compared to other compression methods, and difficulty of extraction: finding large bicliques is a heuristic search.
As a byproduct, a biclique decomposition is a form of lossless graph summarization; Yang and Bian [144] propose bipartite grammar-based representations of sparse binary matrices which, in the language of Section 7, sit between this family and the previous one. We are not aware of an experimental study of bicliques for real-valued matrices, although Algorithm 4 extends immediately to a decomposition into blocks in which all the nonzeros have the same value (the block contributes instead of ). The matrix–matrix algorithms are limited to Boolean matrices; the authors leave transitive closure on bicliques, parallel and GPU versions, and weighted and dynamic graphs, for future work.
7 A Common View: Sparse Straight-Line Factorizations
The three families of Sections 4 to 6 look different, but they share a simple algebraic structure, which makes it easy to see why the same kind of guarantee holds for all of them, and which we find the most useful way to think about them. In this section we abstract that structure, show how each family instantiates it, and derive from it a way of multiplying two compressed matrices. The framing is ours; it is not stated in the original papers, though it is abstracted from their algorithms. The -tree family of Section 3, which as we saw follows a different principle, is not covered by it.
7.1 Definition and products by a vector
Definition 6 (Sparse straight-line factorization). A sparse straight-line factorization of , over a ring consists of sparse matrices , (strictly lower triangular, hence nilpotent), and such that
Its size is (an identity matrix, when used for P, is implicit and not counted).
To interpret this formula, recall that can be understood as , that is, the entries of give the coefficients of the linear combination of the rows of that form the row . If is sparse, we can also see as telling which rows of is made of. Now consider vectors (or “fragments”) defined by , that is, a sparse set of column positions (the nonzeros of ) plus a sparse combination of earlier fragments (earlier because is lower-triangular). Letting be the matrix with the fragments as rows, we have , or .¹ The matrix then says which fragments each row of is made of, and holds the entries of that are not covered by any shared node (the residual). Equation (4) is then , that is, .
The intuition is that of a straight-line program (a sequence of assignments, each using only earlier values) that builds each row of A, seen as a sparse vector indexed by the column positions 1, ..., m (see Figure 13; when computing y = Ax, the node holds the entry of x at column position j). The q auxiliary nodes (in the middle in the figure) stand for shared sub-computations, representing the fragments . Finally, P sends those values from F to the output vector y. Matrix sends values directly from x to y.
Note that the entries of the four matrices belong to a ring in general; Boolean matrices are regarded as 0/1 matrices over the integers, and the factors may then contain entries -1, for instance in the residual of a referencing format.
Right and left products. The right product Ax is evaluated by forward substitution: compute , then for (so ), and finally . The left product is the transpose of this computation: , then backward substitution on with (that is, for ), and finally . Figure 13 shows the idea again: the products now traverse the same graph in opposite directions.
Theorem 7. Given a sparse straight-line factorization of size s, both Ax and can be computed with arithmetic operations and words of working space.
PROOF. In each of the substitutions every nonzero of , , and is used exactly once, in one multiplication and one addition, and the vectors , (or , ) have entries. The triangular structure of guarantees that when node is processed all the nodes it depends on have been processed (in the order for the right product, and in the reverse order for the left product).
Why it is useful. Theorem 7 is the only algorithmic fact behind the results of Sections 4 to 6, and it has four consequences that apply to all the formats at once.
(i) The compression ratio relative to the plain sparse format, , is the reduction in arithmetic operations, and hence an upper bound on the speedup one can expect from arithmetic alone.
Since is lower-triangular with 1s in the diagonal, it has an inverse; we use this inverse for notational convenience only, we never compute it.
Over a commutative semiring , the same factorization works by writing instead of , and Theorem 7 holds with semiring operations. Referencing formats that delete elements need a ring, however. On the other hand, bicliques may overlap only if the sum is idempotent (as for or min).
Gonzalo Navarro
column
position
auxiliary
nodes
rows

Fig. 13. The evaluation graph of a sparse straight-line factorization (schematic): the inputs correspond to the column positions of and the outputs to its rows. Edges go from column positions to nodes, between nodes (from earlier to later), from nodes to rows, and directly from column positions to rows. The right product propagates values from left to right; the left product propagates them from right to left over the same edges. The cost of either is the number of edges.
(ii) Left products cost exactly the same as right products, so there is no need to store the transpose, which halves the space for algorithms such as PageRank or conjugate gradient that need both.
(iii) The depth of the nodes in Q (the longest chain of dependencies) is the minimum number of sequential steps and thus it governs parallelism. For example, referencing trees may be deep, bicliques have depth one, and grammars can be made of logarithmic depth by design.
(iv) Different families are different ways of finding a small factorization, so that comparing them amounts to comparing the quality and the cost of the corresponding search problems, not the multiplication algorithms.
7.2 The three families as instances
We show how the families of Sections 4 to 6 are particular cases of the general principle, with the notation of those sections.
-
Referencing (Section 4): It encodes each row as a referenced row with (if any) plus a (hopefully sparse) residual row . This fits in the general scheme with , , (if it exists) and 0 elsewhere, and , that is, : row is the residual row plus the (already computed) row of its reference, and is the forest of references.
-
Grammars (Section 5): The nodes are the nonterminals; if the right-hand side of mentions (and 0 if not), and if it mentions the terminal ; records which nonterminals appear in the part of the final sequence that encodes each row, and does the same for the terminals that remain in .
-
Bicliques (Section 6): the nodes are the bicliques ; and are the indicator matrices of the sets and , , and is the residual matrix (the cells not in any biclique): .
Table 4. Three sparse straight-line factorizations of the matrix of the running example. Sizes count the nonzeros of , , and (with implicit for referencing). The three differ in shape: referencing has a chain of depth , the grammar a nested rule , and the bicliques share column sets among non-adjacent rows and with non-consecutive columns .
| Family | Nodes | Residual and connections | Size |
|---|---|---|---|
| Referencing | 20 | ||
| Grammar | rows: | 22 | |
| Bicliques | residual edges | 22 |
A worked example. Consider the Boolean matrix
Rows 1–3 share the columns 1–4, rows 4–5 share the columns 7–8, and the columns 5 and 8 are shared by rows 3 and 6, which are not adjacent; in row 6 the columns 6 and 7 lie between them. Table 4 shows the three factorizations. The corresponding Equation (4) for Referencing is:
Here the references form a chain, , so the row 3 is obtained by adding 8 to the row 2, which in turn is the row 1 plus 5; the other rows are stored explicitly (their reference is ). The rows 4–6 could also reference one another at the same weight, but they would pay for a pointer.
The decomposition for Grammar is as follows. The rules are the runs of columns that are repeated in several rows, and is a rule that uses other rules, so : the fragment of is , the columns 1–4. Each row of is then a short sequence of nonterminals and terminals given by and ; row 3 needs the terminals 5 and 8, which are not consecutive in row 6, so no rule can share them between the two rows. Rules can be nested, but they can share only runs of consecutive columns inside a row.
Gonzalo Navarro
A=\underbrace{\begin{pmatrix}{{{0}}}&{{{0}}}&{{{0}}}&{{{0}}}&{{{1}}} \\{{{0}}}&{{{0}}}&{{{0}}}&{{{0}}}&{{{1}}} \\{{{0}}}&{{{0}}}&{{{0}}}&{{{0}}}&{{{1}}} \\{{{0}}}&{{{1}}}&{{{0}}}&{{{1}}}&{{{0}}} \\{{{1}}}&{{{0}}}&{{{0}}}&{{{1}}}&{{{0}}} \\{{{0}}}&{{{0}}}&{{{1}}}&{{{1}}}&{{{0}}}\end{pmatrix}}_{P}\underbrace{\left(I-\underbrace{\begin{pmatrix}{{{0}}}&{{{0}}}&{{{0}}}&{{{0}}}&{{{0}}} \\{{{0}}}&{{{0}}}&{{{0}}}&{{{0}}}&{{{0}}} \\{{{0}}}&{{{0}}}&{{{0}}}&{{{0}}}&{{{0}}} \\{{{0}}}&{{{0}}}&{{{0}}}&{{{0}}}&{{{0}}} \\{{{1}}}&{{{1}}}&{{{0}}}&{{{0}}}&{{{0}}}\end{pmatrix}\right)^{-1}}_{Q}\underbrace{\begin{pmatrix}{{{1}}}&{{{1}}}&{{{0}}}&{{{0}}}&{{{0}}}&{{{0}}}&{{{0}}} \\{{{0}}}&{{{0}}}&{{{1}}}&{{{1}}}&{{{0}}}&{{{0}}}&{{{0}}} \\{{{0}}}&{{{0}}}&{{{0}}}&{{{0}}}&{{{1}}}&{{{1}}}&{{{0}}}&{{{0}}} \\{{{0}}}&{{{0}}}&{{{0}}}&{{{0}}}&{{{0}}}&{{{0}}}&{{{1}}}&{{{1}}} \\{{{0}}}&{{{0}}}&{{{0}}}&{{{0}}}&{{{0}}}&{{{0}}}&{{{0}}}\end{pmatrix}}_{T}+\underbrace{\begin{pmatrix}{{{0}}}&{{{0}}}&{{{0}}}&{{{0}}}&{{{0}}}&{{{0}}}&{{{0}}} \\{{{0}}}&{{{0}}}&{{{0}}}&{{{0}}}&{{{1}}}&{{{0}}}&{{{0}}}&{{{0}}} \\{{{0}}}&{{{0}}}&{{{0}}}&{{{0}}}&{{{1}}}&{{{0}}}&{{{0}}}&{{{1}}} \\{{{0}}}&{{{0}}}&{{{0}}}&{{{0}}}&{{{0}}}&{{{0}}}&{{{0}}}&{{{0}}} \\{{{0}}}&{{{0}}}&{{{0}}}&{{{0}}}&{{{0}}}&{{{0}}}&{{{0}}}&{{{0}}}\end{pmatrix}}_{T^{\prime}}Finally, the factorization by Bicliques has (depth one), so the factor is not needed. Its nodes are complete bipartite subgraphs: the first one connects the rows 1–3 with the columns 1–4, the second the rows 4–5 with the columns 7–8 and the third the non-adjacent rows 3 and 6 with the non-consecutive columns 5 and 8: in row 6 the columns 6 and 7 lie between them, so a grammar cannot capture this sharing with a rule, whereas a biclique can. A row may belong to several bicliques (row 3 belongs to two), and the column set of a biclique need not be consecutive.
The three factorizations have sizes 20, 22 and 22, all smaller than (they have that many nonzeros in their matrices), and evaluating Ax with any of them takes that many multiplications/additions instead of 27. For the biclique factorization, for example, this means , and are computed once and added to , , , to , , and to , , respectively.
How the families differ. Seen this way, the three families differ in how the factorization is found, and the compression ratio they obtain is the sparsity ratio . Referencing uses a forest on the rows and is the most constrained (each node is a row); grammars discover shared consecutive subsequences and allow arbitrarily deep sharing; bicliques share both a set of rows and a set of columns simultaneously, but have depth one. Finding the smallest grammar is NP-hard [45, 131], so practical compressors are heuristics (Section 5), and biclique extraction is also heuristic [64, 82]; for referencing, the optimal choice is a minimum spanning tree problem [29, 69] when the reference may be any row, and a more constrained problem when it must lie in a window [27] (Section 4.6).
What the view does not cover. The view concerns products by a vector and, as seen in Section 7.3, sums and products of factorized matrices. The latter produce factorizations whose size we cannot bound, so they must be recompressed, and other operations whose output is again a matrix, such as the transitive closure, are not covered. The view also does not cover the -tree family, which follows a different principle: instead of factoring the matrix, it partitions the matrix recursively into quadrants and discards the empty ones; those formats support a much wider set of algebraic operations (Section 3). The distinction is useful: factorization-based formats work better for specific operations like products, and partition-based ones support a more general algebra.
7.3 Products of factorized matrices
The view of Section 7.1 concerns products by a vector, but it also gives matrix–matrix products whose output is again a factorization of the same form. As far as we know the surveyed papers do not state this in general: the compositional biclique algorithm of Section 6.3 is its depth-one case. The more general derivation that follows is ours.
Let and be sparse straight-line factorizations with and nodes, with fragments and . The fragments of are vectors over the column positions of , which are the row positions of , and says which fragments of make up each of those rows. The matrix therefore relates the two structures through the shared dimension .
Theorem 8. Let denotes the horizontal concatenation of the matrices X and Y, and
Then is a sparse straight-line factorization with nodes (those of B first; is strictly lower triangular), whose fragments are those of B followed by .
PROOF. Let and split it as according to the blocks. Since , the first block gives , so . The second gives , so . Then .
The nodes of A now hold the products of its shared fragments by B, each computed once, and every row of AB is a combination of them and of the fragments of B, plus the residual . The only new matrices are the four sparse products , , and between pieces of the factorizations, which can be computed with any sparse product algorithm (for instance Schoor's algorithm [128], whose cost is dominated by the number of elementary products , where and are the numbers of nonzeros in position t of the left and right pieces). The time thus depends on the compressed pieces, and not on the nonzeros of A and B, and the size of the result is .
Matrix sums. Sums can also be supported: for (same shape) take
with nodes. The same identities hold over any commutative semiring, with the caveats of footnote 2. While this is computed in time proportional to the compressed sizes, the representation obtained may not be optimal and may benefit from recompression, just like the proposed summation algorithm for bicliques (Section 6.3).
Pointwise and Kronecker products. The Hadamard (element-wise) product is, in the Boolean case, the intersection, which -trees already support (Section 3.3). In the factorization view it is less direct than the sum: row of is plus residual terms, so a fragment is needed for every pair of nodes used together by some row, and we do not see a bound on the size of the result better than that of the explicit matrix. The Kronecker product is, in contrast, simple over a ring (our own observation). Since and , a factorization of has one node per pair , with , and (strictly lower triangular in
Gonzalo Navarro
lexicographic order of the pairs); to simplify we took , which can always be assumed by regarding each residual row as one more node. Its size is for factorizations of sizes and , so, as , the compression ratio of the Kronecker product is the product of the ratios of its factors.
Special cases.
• Only the left factor is compressed , so is explicit): . The structure is untouched and only and are multiplied by . For referencing , , ) this is : the same reference forest with the residual . When is a dense matrix, as in the GNNs mentioned in Section 4, these are the two stages of Alves et al. [7] (a sparse–dense product with , followed by the substitution along the forest); when is sparse, the substitution can be skipped and the output left in compressed form.
• Only the right factor is compressed : , which keeps and multiplies by and .
- Bicliques , with sets and ): counts how many positions connect the biclique of with the biclique of , and in the Boolean case is all that matters. The four terms of Equation (3) are the four terms of the product, and the unions of column sets that the algorithm of Section 6.3 materializes for every biclique of are the fragments ; the table marks of that algorithm is a row-wise representation of , and looking up in it the elements of each computes . Materializing the fragments gives again a biclique representation , as in that paper [10]; keeping the nonzeros of as edges inside , instead, is what our generic algorithm does and saves space, but the result is not anymore a biclique.
A dual combination for referencing, in which A is used through its row structure and B through the structure of its columns, underlies Equation (2): if is the residual matrix of (the matrix whose rows are the differences with its references), then . Its output is a two-sided factorization, which does not have the form of Equation (4). The Boolean product on compressed binary trees of Section 4.4 also uses the rows of A and the columns of B, and produces its output by columns, so that it can be the right operand of the next product.
What it does not give. We do not have a bound on the size of the result. The matrix can have up to nonzeros, the other three products can have fill-in, and nothing prevents the output from being larger than a factorization of AB found from scratch (or even than ). It is therefore a valid but not necessarily good factorization, which can be improved by recompression: discarding the nodes that are no longer reached by any row, merging nodes with identical fragments, or running again the search for a good factorization on AB, as in the biclique algorithms. The experiments of Araya et al. [10] show both sides: skipping the recompression makes the product up to faster, but the space of the output degrades by 7%-40% in most cases. In iterated products the effect compounds: squaring doubles the number of nodes ( for ), so recompression is needed to stay compressed. Finally, when only products by vectors are needed one should usually avoid forming AB at all, since costs the sizes of the two factorizations, which is typically less than that of AB; forming the product pays off when it is reused (powers, closures) or needed in explicit form.
Table 5. Qualitative comparison of the families of computation-friendly formats. √: supported and evaluated; (√): doable and promising, but not evaluated; —: not studied. Compression and speed are coarse ratings relative to the plain (CSR or dense) representation (more + is better, – is worse); speed refers to the product that each family supports best (by a vector for referencing and grammars, matrix–matrix for bicliques and -trees), and both depend strongly on the matrix.
| Family | Right product | Left product | Mat ×mat | Sum & more | Real values | Random access | Compression | Speed |
|---|---|---|---|---|---|---|---|---|
| Referencing | ✓ | (✓) | (✓) | - | (✓) | (✓) | ++++ | + |
| Grammar | ✓ | ✓ | - | - | ✓ | (✓) | ++ | ++ |
| Biclique | ✓ | (✓) | ✓ | (✓) | - | - | + | +++ |
| -tree | (✓) | (✓) | ✓ | ✓ | (✓) | ✓ | +++ | - |
8 Comparison and Guidelines
Table 5 compares the families along the dimensions that matter when choosing a format. The general tradeoff is that, the more compression, the less computation performance. Still, compressed computation is viable overall: some formats achieve space and time reduction at the same time.
8.1 Cross-cutting observations
The gain follows the compression ratio. In all the experiments on products by vector, the speedup is a fraction of the reduction in the number of symbols processed: the compression ratio of Figures 4, 8 and 10 upper-bounds the speedup, because the compressed traversal has worse locality (the nonzeros of are scattered in the referencing format, nonterminals and bicliques require random writes to y) or involves extra work (decoding, pointer chasing, rank operations). The cache-friendly deployment of kache-trees [63] makes this explicit: with the same asymptotic work, fewer cache misses give up to 60% speedups. A compressed format is therefore most useful for compressed computation if its structure is also hardware-friendly; cache-obliviousness and vectorization are important topics for future work. On the other hand, matrix–matrix products may benefit superlinearly from convenient compression formats: the biclique representation (Section 6) obtains speedups of , which exceed the space reduction by a large margin.
The matrix decides the family. Web graphs ordered by URL are ideal for referencing; social networks are not, but bicliques and -trees perform reasonably on them; machine-learning matrices with few distinct values per column (categorical features, one-hot encodings, quantized values) are the natural domain of grammars and of CLA; and clustered Boolean relations (knowledge graphs, RDF) suit the -tree. In matrices with little structure (like Susy, where more than 98% of the entries are nonzero and there are over 20 million distinct values) none of the formats helps, and the dense or the plain sparse representation is the right choice.
Preprocessing is the price. All the formats are static, and the cost of building them ranges from per edge for -trees [15] and a few minutes for the largest ML matrices with RePair, to hours for the recompression of the largest Web graphs for referencing [67] and to heavy MST computations for the best references [69]. Since the intended use is to multiply the same matrix many times (PageRank iterations, iterative solvers), the amortization is generally acceptable, but it means that the formats are not meant for matrices that are operated once or change often.
Gonzalo Navarro
Compositionality and recompression. Because the product of two factorizations is again one (Section 7.3), the families can be chained, but the output size is not bounded and grows with every product. Skipping recompression made the biclique product up to faster at a cost of 7%-40% in space [10]; whether to recompress is a trade-off between the cost of the next operation and that of the extraction.
Working space. The auxiliary space is small but not null: grammar-based products need words, referencing needs the n partial results, and algebraic operations produce outputs that may be much larger than the inputs (the transitive closure being the extreme). The peak memory of the grammar-based product is a small multiple of the compressed size (Table 5 of Ferragina et al. [65]), and the benefits in time are largest for matrices that compress well (Figures 7 and 8).
Parallelism. Row-block partitioning is the natural way to parallelize the product for all the families (each block is compressed and multiplied independently), at the price of losing inter-block redundancy: the grammar results showed that sometimes the split even improves compression because blocks have little in common. The recursive structure of -trees gives parallelism in the algebra, but thread-creation overhead cancels the gain on very sparse inputs.
8.2 Which format when?
As a practical summary of the evidence in the surveyed papers:
-
Large Web or host graph, many products with the same matrix (PageRank and similar power-method computations): reference-based compression via WebGraph with the residual trick of Algorithm 2; expect up to speedup on page graphs; consider bicliques when the graph is less copy-friendly (the biclique format reached on it-2004).
-
Real matrix with few distinct values, large and tall (ML design matrices): grammar compression with column reordering, row blocks and 16 or more threads; expect compression within about 50% of xz and sometimes smaller, smaller peak memory than CLA, and speed comparable to or better than dense when the compression ratio is high.
-
Boolean matrices that must be composed (graph databases): -trees (smallest), their kache or prejoin variants (faster) or a CSR/CSC baseline (about the space of the -tree and several times faster; space drops to if storing just CSR [10]). For products of large Web graphs, bicliques with Schoor’s algorithm (up to faster than the baseline depending on how the bicliques are used).
-
Moderately compressible matrices, tight memory: combine a computation-friendly format with a lightweight entropy coder, accepting a decoding cost (re_iv, re_ans).
In the terms of Section 7, the choice depends on which matrices have small factorizations of each shape, and on how much it costs to find them.
Table 6 lists the implementations of the surveyed works that we found.
8.3 Relation to theory
Every method in Sections 3 to 6 has time (size of the representation) to compute Ax: the product reads each symbol once. Therefore the possible speedup is exactly the sparsity-relative compression ratio, and the interesting questions are about which matrices admit small representations. The formal guarantees available so far connect size to combinatorial measures of the input: the symmetric-difference compressibility for referencing [69], the size of the smallest grammar that generates
Table 6. Public implementations of the works discussed.
| Work | Family | Code |
|---|---|---|
| Boldi and Vigna [27] | Referencing (build) | https://github.com/vigna/webgraph/ |
| Alves et al. [7] | Referencing (CBM) | https://github.com/cbm4scale |
| Ferragina et al. [65] | Grammars | https://gitlab.com/manzai/mm-repair |
| Francisco et al. [67] | Bicliques | https://github.com/koeppl/matrixbiclique |
| Araya et al. [10] | Bicliques (mat-mat) | https://github.com/nicolasaraya/BicliqueMultiplication |
| Arroyuelo et al. [15] | -tree algebra | https://github.com/adriangbrandon/rpq-matrix |
| Tosoni et al. [135] | Various | https://gitlab.com/ftosoni/green-lossless-spmv |
the CSRV sequence for grammars [45, 65] (which practical compressors approximate only heuristically), the smallest biclique partition [96] (which again, implementations approach heuristically with small biclique covers) and, for -trees, bounds in terms of nnz(A) and of clustering [55]. There is no common measure; a unification of these notions into a notion of “computation-friendly compressibility” is an open challenge.
9 Open Problems and Research Directions
The surveyed papers conclude with a number of future-work items, and the comparison of Section 8 reveals further gaps. We group them into five themes: supported algebra, compression methods, theoretical results, applications, and computation models.
9.1 Boolean and other algebras
The Boolean algebra of Section 3 is compositional but compresses only by spatial clustering; it would be interesting to extend those formats so as to capture row similarity or repeated patterns while preserving functionality. Two-dimensional block trees and depth-first -trees (Section 3.7) are first steps in this direction, as they share repeated submatrices inside a -tree. However, for the former it is not clear that the algorithms of Section 3 keep their time bounds, and for the latter the variant that shares submatrices, which compresses best, was the slowest in the products evaluated by Carmona and Manzini [42].
From the other formats, which capture repetitions, bicliques are the family that most clearly supports Boolean matrix–matrix products and sums (Section 6.3), and it is compositional. This technique is generalized in Theorem 8, which holds on rings and may yield new ways to address this operation. A problem, in both cases, is how to maintain the quality of the compression along the composition of operations; we further discuss this issue in Section 9.2. Equation (2) gives another initial idea to multiply with references; its evaluation and analysis is open. Other pointwise matrix operations, like Hadamard products, may not be so easy to perform on these formats.
As for transitive closures, the algorithm of Section 3.3 converts any solution for matrix products into one for transitive closure, for recursive decompositions. The improved multiplication results on kache-trees have already been seen to carry over transitive closures. This operation is still missing on all the other formats. Other operations that are not addressed in the surveyed papers include the sparse–sparse product with a real semiring such as for shortest paths, and matrix powers applied to vectors (combining repeated matrix–vector products with iterated squaring, for example). Over a commutative semiring, the products of Theorem 7 can be evaluated with
Personal communication with the authors.
Gonzalo Navarro
semiring operations alone (writing for ), so grammar-based formats extend to any semiring in which the values to be multiplied are the semiring elements of . Referencing formats are more delicate: when a row deletes elements of its reference they need additive inverses (a ring), and over semirings without them, such as for shortest paths or the Boolean semiring, only references that insert elements (insertion compressibility ) are available. Bicliques, in turn, may overlap in an idempotent semiring (e.g., Boolean) but must partition the edges over . Which compression ratios these restricted forms achieve on matrices of interest, and whether closures over such semirings (all-pairs shortest paths, reachability) can be accelerated, are open questions.
9.2 Compression and recompression
Computing good references, good grammars and good bicliques is expensive. For referencing, the incremental MST of Gagie et al. [69] is a step towards practicality, and can be complemented with adding Steiner nodes and with sketching and approximate nearest-neighbor techniques to find references (Section 4.6). For grammars, row permutations and co-clustering are mentioned as future work in [65], together with different compressors per block; for bicliques, better extraction techniques may yield improved compression. Streaming or distributed construction, and construction with explicit space/time trade-offs (for example, spending more preprocessing to get a higher compression ratio) are largely unexplored.
Recompression along the algebra. Sums and products of factorized matrices (Section 7.3) give valid but not necessarily small factorizations, and the problem compounds in chains of products, powers, and closures. A general problem is then to keep the quality of the compression along the operations of the algebra: either with recompression procedures cheap enough to be applied after each operation, which trade the cost of the next operation against that of the recompression (as the experiments with bicliques show [10]), or with formats that stay compact under the operations without extra work, as the -tree does for the Boolean algebra (Section 3.3).
Dynamic matrices. All formats here are static. The Boolean-algebra paper identifies dynamic -trees [13] as a way to support updates; for referencing and grammar formats, updates could break the references or the rules, and incremental maintenance is not known to us. Applications such as evolving graphs (where PageRank is recomputed periodically) would benefit. For time-evolving graphs, the differential compressed binary trees of Section 4.4 have been extended to support the insertion and deletion of arcs and of whole time frames directly on the compressed structure, with algorithms for earliest-arrival paths and for transitive closure over it [111]; whether the speedups for products by a vector and by a matrix survive such updates is, as far as we know, unexplored.
9.3 Theory
The most important opening of the view of Section 7 is theoretical. The three factorization-based families fit a single scheme, whose size is a measure of the matrix, a kind of “straight-line complexity” of the product by a vector, analogous to the size of the smallest grammar of a string. What is the minimum size of such a factorization of a given matrix, how does it extend the measures of each family ( , the size of the smallest grammar of the CSRV sequence, number of residual edges), and is it approximable? Which classes of compressed representations admit products in time linear in their size, and which do not, in the spirit of Abboud et al. [2]?
In these terms, recompression has a simple abstract form: given a factorization of a matrix, find a smaller one for the same matrix. Two steps are cheap and exact in all the families (Section 7.3): discarding the nodes that no row reaches, and merging nodes with identical fragments. A third step is the expensive heuristic: running again the search for a good factorization (a reference search, a grammar compressor, or a biclique extractor) on the result or on the explicit matrix. Characterizing the factorizations that cannot be reduced by the first two steps, and how far they are from the minimum one, would be a first step towards a theory of recompression, and would connect the previous question with the construction problem above.
9.4 Applications
The use of these techniques in applications would not only benefit them, but also bring new challenges to the area.
Interaction with lossy compression: ML and LLM weights. Lossless grammar compression gave good results on classical machine-learning matrices; the open question is its effect on modern, large and dense weight matrices of neural networks, which are mostly not sparse and have few exact repetitions, except after quantization, where the value domain is small and the CSRV model fits well. Combining lossy quantization with lossless computation-friendly formats [65, 78] is a natural but unexplored experiment at scale. In GNNs, the compression of the adjacency matrix with the set-difference formats has been used to accelerate the training [7].
Semirings and database workloads. Ferragina et al. [65] mention that grammar compression could handle semiring-annotated data, simulating joins on logical matrices (+ replaced by OR and × by AND), and columnar databases. The -trees and prejoining [12, 15, 16] tie matrix multiplication with worst-case-optimal joins and regular path queries on graph databases, and could be a vehicle to bring compressed matrices to the optimizer of a relational or graph database engine.
Integration in libraries. The implementations are research prototypes. Making them available as formats in sparse-algebra frameworks (GraphBLAS-like interfaces, tensor compilers [48, 57, 90]) would make them more widely available for practitioners. Since the surveyed papers use different datasets, hardware and baselines, a common benchmark suite would also make the families comparable.
9.5 Computation models
While reducing space gives opportunities to execute on higher and faster levels of the memory hierarchy, poor locality of reference may ruin those advantages. Kache-trees (Section 3.5) showed that layout matters as much as asymptotics; a fully cache-oblivious variant, in which the number of I/Os matches the best known for sparse matrices [58, 73], is announced as future work [63]. The irregular memory access of compressed formats is a challenge for GPUs, where the uncompressed formats (ELL, HYB) were designed around regularity [20]; GPU-oriented decode-first formats are reviewed in Section A. Interesting results in this respect are reported by Tosoni and Mencagli [136], who port the right product on grammar-compressed matrices to GPUs: by layering the grammar (inserting pass-through nodes so that each level reads only the previous one) the device footprint is 4–8× smaller than a CSR baseline on genotype matrices, with times within a small factor of cuSPARSE and lower energy. Distributed-memory versions would require partitioning compressed structures and communicating partial results efficiently.
Gonzalo Navarro
10 Conclusions
We have surveyed computation-friendly formats for sparse matrices: representations that are smaller than the plain sparse format and allow matrix-vector products, and in some cases matrix-matrix products, sums or closures, to be computed in time proportional to their size. The four families we identified exploit different kinds of redundancy (spatial clustering, similar rows, repeated subsequences, dense bipartite blocks).
The main conceptual message of the survey is that three of these families, referencing, grammars and bicliques, are one idea in three appearances: each finds a sparse straight-line factorization of the matrix, and the same forward substitution evaluates the right product Ax and its transposed backward substitution evaluates the left product , in time proportional to the number of nonzeros of the factors (Section 7). Everything that distinguishes the families, apart from the matrices they suit, is how the factorization is found: a minimum spanning tree over symmetric differences, a grammar compressor, or an extractor of dense bipartite subgraphs. This view turns the question of which format to use into the question of which matrices admit small factorizations of which shape, and at what cost. The product of two factorizations is again a factorization (Section 7.3), although of unbounded size, so a compositional algebra with recompression is the natural next step. This view also suggests that a theory of the minimum size of such factorizations is the missing foundation of the area. The -tree family stands apart, built on recursive partitioning rather than on factorization, and it offers a complete algebra of Boolean matrices, but obtains the least speedups over a plain sparse representation
The empirical results show that the approach is practical. Speedups of on Web graphs with referencing, of up to for products by a vector with bicliques, up to (up to when the format is kept) for Boolean matrix-matrix products with bicliques, running times below those of the dense product on the most compressible machine-learning matrices with grammars, and speedups of for chains of Boolean matrix products over qdags, come with space reductions that range, depending on the family and on the data, from modest to an order of magnitude. At the same time, the speedups remain below the compression ratio, preprocessing is costly and the formats are static, and the families have been evaluated in isolation. The most valuable next practice-oriented step for the field may be a common benchmark and a common framework, in which the formats can be compared, combined and extended to new operations and hardware.
References
[1] Daniel Abadi, Samuel Madden, and Miguel Ferreira. 2006. Integrating Compression and Execution in Column-Oriented Database Systems. In Proc. ACM SIGMOD International Conference on Management of Data. 671–682.
[2] Amir Abboud, Arturs Backurs, Karl Bringmann, and Marvin Künnemann. 2020. Impossibility Results for Grammar-Compressed Linear Algebra. In Advances in Neural Information Processing Systems (NeurIPS), Vol. 33. 8810–8823.
[3] Micah Adler and Michael Mitzenmacher. 2001. Towards Compressing Web Graphs. In Proc. Data Compression Conference (DCC). 203–212.
[4] Jarno Alanko, Philip Bille, Inge Li Gørtz, Gonzalo Navarro, and Simon J. Puglisi. 2025. Compact Data Structures for Collections of Sets. In From Strings to Graphs, and Back Again: A Festschrift for Roberto Grossi's 60th Birthday. OASIcs, Vol. 132. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. Article 6.
[5] Josh Alman and Virginia Vassilevska Williams. 2018. Further Limitations of the Known Approaches for Matrix Multiplication. In Proc. Innovations in Theoretical Computer Science (ITCS) (LIPIcs, Vol. 94). 25:1–25:15.
[6] Sandra Álvarez-García, Nieves R. Brisaboa, Javier Fernández, Miguel Martínez-Prieto, and Gonzalo Navarro. 2015. Compressed Vertical Partitioning for Efficient RDF Management. Knowledge and Information Systems 44, 2 (2015), 439–474.
[7] João N. F. Alves, Samir Moustafa, Siegfried Benkner, Alexandre P. Francisco, Wilfried N. Gansterer, and Luís M. S. Russo. 2025. Accelerating Graph Neural Networks Using a Novel Computation-Friendly Matrix Compression Format. In Proc. IEEE International Parallel and Distributed Processing Symposium (IPDPS). 1091–1103.
[8] Rasmus Resen Amossen and Rasmus Pagh. 2009. Faster Join-Projects and Sparse Matrix Multiplications. In Proc. International Conference on Database Theory (ICDT). 121–126.
[9] Renzo Angles, Marcelo Arenas, Pablo Barceló, Aidan Hogan, Juan L. Reutter, and Domagoj Vrgoč. 2017. Foundations of Modern Query Languages for Graph Databases. Comput. Surveys 50, 5 (2017), 68:1–68:40.
[10] Nicolás Araya, José Zagal, Cecilia Hernández, and Gonzalo Navarro. 2026. Compressed Boolean Matrix Multiplication using Bicliques. arXiv preprint 2610.32836.
[11] V. Arlazarov, E. Dinic, M. Kronrod, and I. Faradzev. 1970. On Economical Construction of the Transitive Closure of a Directed Graph. Doklady Akademii Nauk SSSR 194, 11 (1970), 487–488.
[12] Diego Arroyuelo, José M. Cazorla, and Gonzalo Navarro. 2026. Boosting Graph Joins and Matrix Multiplications in Little Space. In Proc. Joint Workshop on Graph Data Management Experiences & Systems (GRADES) and Network Data Analytics (NDA). 3:1–3:11. doi:10.1145/3810460.3812779
[13] Diego Arroyuelo, Guillermo de Bernardo, Travis Gagie, and Gonzalo Navarro. 2019. Faster Dynamic Compressed d-ary Relations. In Proc. International Symposium on String Processing and Information Retrieval (SPIRE) (LNCS, Vol. 11811). 419–433.
[14] Diego Arroyuelo, Adrián Gómez-Brandón, and Gonzalo Navarro. 2023. Evaluating Regular Path Queries on Compressed Adjacency Matrices. In Proc. International Symposium on String Processing and Information Retrieval (SPIRE). 35–48.
[15] Diego Arroyuelo, Adrián Gómez-Brandón, and Gonzalo Navarro. 2025. Evaluating Regular Path Queries on Compressed Adjacency Matrices. The VLDB Journal 34, 1 (2025), 45–69.
[16] Diego Arroyuelo, Gonzalo Navarro, Juan L. Reutter, and Javiel Rojas-Ledesma. 2022. Optimal Joins using Compressed Quadtrees. ACM Transactions on Database Systems 47, 2 (2022), 8:1–8:32.
[17] Albert Atserias, Martin Grohe, and Dániel Marx. 2013. Size Bounds and Query Plans for Relational Joins. SIAM J. Comput. 42, 4 (2013), 1737–1767.
[18] Jérémy Barbay and Claire Kenyon. 2008. Alternation and Redundancy Analysis of the Intersection Problem. ACM Transactions on Algorithms 4, 1 (2008), 4:1–4:18.
[19] Sebastian Baunsgaard and Matthias Boehm. 2023. AWARE: Workload-Aware, Redundancy-Exploiting Linear Algebra. Proceedings of the ACM on Management of Data 1, 1 (2023), 1–28.
[20] Nathan Bell and Michael Garland. 2009. Implementing Sparse Matrix-Vector Multiplication on Throughput-Oriented Processors. In Proc. Conference on High Performance Computing Networking, Storage and Analysis (SC). 1–11.
[21] David Benoit, Erik D. Demaine, J. Ian Munro, Rajeev Raman, Venkatesh Raman, and S. Srinivasa Rao. 2005. Representing Trees of Higher Degree. Algorithmica 43, 4 (2005), 275–292.
[22] Krishna Bharat, Andrei Broder, Monika Henzinger, Puneet Kumar, and Suresh Venkatasubramanian. 1998. The Connectivity Server: Fast Access to Linkage Information on the Web. Computer Networks and ISDN Systems 30, 1–7 (1998), 469–477.
[23] Anders Björklund and Andrzej Lingas. 2001. Fast Boolean Matrix Multiplication for Highly Clustered Data. In Proc. Workshop on Algorithms and Data Structures (WADS). 258–263.
[24] Paolo Boldi, Andrea Marino, Massimo Santini, and Sebastiano Vigna. 2018. BUbiNG: Massive Crawling for the Masses. ACM Transactions on the Web 12, 2 (2018), 12:1–12:26.
[25] Paolo Boldi, Marco Rosa, Massimo Santini, and Sebastiano Vigna. 2011. Layered Label Propagation: A Multiresolution Coordinate-Free Ordering for Compressing Social Networks. In Proc. International Conference on World Wide Web (WWW). 587–596.
[26] Paolo Boldi, Massimo Santini, and Sebastiano Vigna. 2009. Permuting Web and Social Graphs. Internet Mathematics 6, 3 (2009), 257–283.
[27] Paolo Boldi and Sebastiano Vigna. 2004. The WebGraph Framework I: Compression Techniques. In Proc. International Conference on World Wide Web (WWW). 595–602.
[28] Paolo Boldi and Sebastiano Vigna. 2005. Codes for the World Wide Web. Internet Mathematics 2, 4 (2005), 407–429.
[29] Abraham Bookstein and Shmuel T. Klein. 1991. Compression of Correlated Bit-Vectors. Information Systems 16, 4 (1991), 387–400.
[30] Nieves R. Brisaboa, Travis Gagie, Adrián Gómez-Brandón, and Gonzalo Navarro. 2024. Two-Dimensional Block Trees. Comput. J. 67, 1 (2024), 391–406.
[31] Nieves R. Brisaboa, Susana Ladra, and Gonzalo Navarro. 2009. -Trees for Compact Web Graph Representation. In Proc. International Symposium on String Processing and Information Retrieval (SPIRE) (LNCS, Vol. 5721). 18–30.
[32] Nieves R. Brisaboa, Susana Ladra, and Gonzalo Navarro. 2014. Compact Representation of Web Graphs with Extended Functionality. Information Systems 39, 1 (2014), 152–174.
[33] Andrei Z. Broder, Moses Charikar, Alan M. Frieze, and Michael Mitzenmacher. 1998. Min-Wise Independent Permutations. In Proc. 30th Annual ACM Symposium on Theory of Computing (STOC). 327–336.
Gonzalo Navarro
[34] Adam L. Buchsbaum, Donald F. Caldwell, Kenneth W. Church, Glenn S. Fowler, and S. Muthukrishnan. 2000. Engineering the Compression of Massive Tables: An Experimental Approach. In Proc. ACM-SIAM Symposium on Discrete Algorithms (SODA). 175–184.
[35] Adam L. Buchsbaum, Glenn S. Fowler, and Raffaele Giancarlo. 2003. Improving Table Compression with Combinatorial Optimization. J. ACM 50 (2003), 825–851.
[36] Gregory Buehrer and Kumar Chellapilla. 2008. A Scalable Pattern Mining Approach to Web Graph Compression with Communities. In Proc. ACM International Conference on Web Search and Data Mining (WSDM). 95–106.
[37] Aydin Buluç, Jeremy T. Fineman, Matteo Frigo, John R. Gilbert, and Charles E. Leiserson. 2009. Parallel Sparse Matrix-Vector and Matrix-Transpose-Vector Multiplication Using Compressed Sparse Blocks. In Proc. ACM Symposium on Parallelism in Algorithms and Architectures (SPAA). 233–244.
[38] Aydin Buluç and John R. Gilbert. 2008. On the Representation and Multiplication of Hypersparse Matrices. In Proc. IEEE International Symposium on Parallel and Distributed Processing (IPDPS). 1–11.
[39] Michael Burrows and David J. Wheeler. 1994. A Block-Sorting Lossless Data Compression Algorithm. Technical Report 124. Digital Equipment Corporation, Systems Research Center.
[40] Jarosław Byrka, Fabrizio Grandoni, Thomas Rothvoß, and Laura Sanità. 2013. Steiner Tree Approximation via Iterative Randomized Rounding. J. ACM 60, 1 (2013), article 6.
[41] Gabriel Carmona and Giovanni Manzini. 2025. Depth First Representations of -trees. In Proc. 32nd International Symposium on String Processing and Information Retrieval (SPIRE). 28–44.
[42] Gabriel Carmona and Giovanni Manzini. 2025. Depth First Representations of -trees. arXiv:2505.11302.
[43] Deepayan Chakrabarti, Spiros Papadimitriou, Dharmendra S. Modha, and Christos Faloutsos. 2004. Fully Automatic Cross-Associations. In Proc. ACM SIGKDD Conference on Knowledge Discovery and Data Mining (KDD). 79–88.
[44] Diptarka Chakraborty, Lior Kamma, and Kasper Green Larsen. 2018. Tight Cell Probe Bounds for Succinct Boolean Matrix-Vector Multiplication. In Proc. ACM Symposium on Theory of Computing (STOC). 1297–1306.
[45] Moses Charikar, Eric Lehman, Ding Liu, Rina Panigrahy, Manoj Prabhakaran, Amit Sahai, and Abhi Shelat. 2005. The Smallest Grammar Problem. IEEE Transactions on Information Theory 51, 7 (2005), 2554–2576.
[46] Flavio Chierichetti, Ravi Kumar, Silvio Lattanzi, Michael Mitzenmacher, Alessandro Panconesi, and Prabhakar Raghavan. 2009. On Compressing Social Networks. In Proc. ACM SIGKDD Conference on Knowledge Discovery and Data Mining (KDD). 219–228.
[47] Miroslav Chlebík and Janka Chlebíková. 2008. The Steiner Tree Problem on Graphs: Inapproximability Results. Theoretical Computer Science 406, 3 (2008), 207–214.
[48] Stephen Chou, Fredrik Kjolstad, and Saman Amarasinghe. 2018. Format Abstraction for Sparse Tensor Algebra Compilers. Proceedings of the ACM on Programming Languages 2, OOPSLA (2018), 123:1–123:30.
[49] Fan Chung. 2007. The Heat Kernel as the PageRank of a Graph. Proceedings of the National Academy of Sciences 104, 50 (2007), 19735–19740.
[50] Francisco Claude and Gonzalo Navarro. 2010. Fast and Compact Web Graph Representations. ACM Transactions on the Web 4, 4 (2010), 16:1–16:31.
[51] Yann Collet and Murray Kucherawy. 2021. Zstandard Compression and the application/zstd Media Type. RFC 8878. IETF.
[52] Don Coppersmith and Shmuel Winograd. 1990. Matrix Multiplication via Arithmetic Progressions. Journal of Symbolic Computation 9, 3 (1990), 251–280.
[53] Timothy A. Davis. 2019. Algorithm 1000: SuiteSparse:GraphBLAS: Graph Algorithms in the Language of Sparse Linear Algebra. ACM Trans. Math. Software 45, 4 (2019), 44:1–44:25.
[54] G. de Bernardo, S. Alvarez-García, N. Brisaboa, G. Navarro, and O. Pedreira. 2013. Compact Querieable Representations of Raster Data. In Proc. 20th International Symposium on String Processing and Information Retrieval (SPIRE) (LNCS, Vol. 8214). 96–108.
[55] Guillermo de Bernardo, Travis Gagie, Susana Ladra, Gonzalo Navarro, and Diego Seco. 2023. Faster Compressed Quadtrees. J. Comput. System Sci. 131 (2023), 86–104.
[56] L. Peter Deutsch. 1996. DEFLATE Compressed Data Format Specification version 1.3. RFC 1951. IETF.
[57] Daniel Donenfeld, Stephen Chou, and Saman Amarasinghe. 2022. Unified Compilation for Lossless Compression and Sparse Computing. In Proc. IEEE/ACM International Symposium on Code Generation and Optimization (CGO). 205–216.
[58] Matteo Dusefante and Riko Jacob. 2018. Cache Oblivious Sparse Matrix Multiplication. In Proc. Latin American Theoretical Informatics Symposium (LATIN). 437–447.
[59] Ahmed Elgohary, Matthias Boehm, Peter J. Haas, Frederick R. Reiss, and Berthold Reinwald. 2018. Compressed Linear Algebra for Large-Scale Machine Learning. The VLDB Journal 27, 5 (2018), 719–744.
[60] Ahmed Elgohary, Matthias Boehm, Peter J. Haas, Frederick R. Reiss, and Berthold Reinwald. 2019. Compressed Linear Algebra for Declarative Large-Scale Machine Learning. Commun. ACM 62, 5 (2019), 83–91.
[61] Peter Elias. 1974. Efficient Storage and Retrieval by Content and Address of Static Files. J. ACM 21, 2 (1974), 246–260.
[62] Peter Elias. 1975. Universal Codeword Sets and Representations of the Integers. IEEE Transactions on Information Theory 21, 2 (1975), 194–203.
[63] Antonio Fariña, Adrián Gómez-Brandón, Asunción Gómez-Colomer, and Gonzalo Navarro. 2025. Cache-Friendly Compressed Boolean Matrices. In Proc. International Symposium on String Processing and Information Retrieval (SPIRE). 95–108.
[64] Tomás Feder and Rajeev Motwani. 1995. Clique Partitions, Graph Compression and Speeding-up Algorithms. J. Comput. System Sci. 51, 2 (1995), 261–272.
[65] Paolo Ferragina, Giovanni Manzini, Travis Gagie, Dominik Köppl, Gonzalo Navarro, Manuel Striani, and Francesco Tosoni. 2022. Improving Matrix-Vector Multiplication via Lossless Grammar-Compressed Matrices. Proceedings of the VLDB Endowment 15, 10 (2022), 2175–2187.
[66] Raphael A. Finkel and Jon Louis Bentley. 1974. Quad Trees: A Data Structure for Retrieval on Composite Keys. Acta Informatica 4, 1 (1974), 1–9.
[67] Alexandre P. Francisco, Travis Gagie, Dominik Köppl, Susana Ladra, and Gonzalo Navarro. 2022. Graph Compression for Adjacency-Matrix Multiplication. SN Computer Science 3 (2022), article 193.
[68] Alexandre P. Francisco, Travis Gagie, Susana Ladra, and Gonzalo Navarro. 2018. Exploiting Computation-Friendly Graph Compression Methods for Adjacency-Matrix Multiplication. In Proc. Data Compression Conference (DCC). 307–314.
[69] Travis Gagie, Meng He, and Gonzalo Navarro. 2026. Compressed Set Representations based on Set Difference. In Proc. Latin American Theoretical Informatics Symposium (LATIN). To appear.
[70] Travis Gagie, Meng He, and Gonzalo Navarro. 2026. Compressed Set Representations based on Symmetric Set Difference. arXiv preprint arXiv:2601.23240v2.
[71] Amir Gholami, Sehoon Kim, Zhen Dong, Zhewei Yao, Michael W. Mahoney, and Kurt Keutzer. 2021. A Survey of Quantization Methods for Efficient Neural Network Inference. arXiv:2103.13630.
[72] John R. Gilbert, Cleve Moler, and Robert Schreiber. 1992. Sparse Matrices in MATLAB: Design and Implementation. SIAM J. Matrix Anal. Appl. 13, 1 (1992), 333–356.
[73] Niels Gleinig, Maciej Besta, and Torsten Hoefler. 2022. I/O-Optimal Cache-Oblivious Sparse Matrix-Sparse Matrix Multiplication. In Proc. IEEE International Parallel and Distributed Processing Symposium (IPDPS). 36–46.
[74] Solomon W. Golomb. 1966. Run-Length Encodings. IEEE Transactions on Information Theory 12, 3 (1966), 399–401.
[75] Szymon Grabowski and Wojciech Bieniecki. 2011. Merging Adjacency Lists for Efficient Web Graph Compression. In Proc. International Conference on Man-Machine Interactions (ICMMI) (Advances in Intelligent and Soft Computing, Vol. 103). 385–392.
[76] Szymon Grabowski and Wojciech Bieniecki. 2014. Tight and Simple Web Graph Compression for Forward and Reverse Neighbor Queries. Discrete Applied Mathematics 163 (2014), 298–306.
[77] Fred G. Gustavson. 1978. Two Fast Algorithms for Sparse Matrices: Multiplication and Permuted Transposition. ACM Trans. Math. Software 4, 3 (1978), 250–269.
[78] Song Han, Huizi Mao, and William J. Dally. 2016. Deep Compression: Compressing Deep Neural Networks with Pruning, Trained Quantization and Huffman Coding. In Proc. International Conference on Learning Representations (ICLR).
[79] Sariel Har-Peled, Piotr Indyk, and Rajeev Motwani. 2012. Approximate Nearest Neighbor: Towards Removing the Curse of Dimensionality. Theory of Computing 8, 14 (2012), 321–350.
[80] Keld Helsgaun. 2000. An Effective Implementation of the Lin–Kernighan Traveling Salesman Heuristic. European Journal of Operational Research 126, 1 (2000), 106–130.
[81] Monika Henzinger, Sebastian Krinninger, Danupon Nanongkai, and Thatchaphol Saranurak. 2015. Unifying and Strengthening Hardness for Dynamic Problems via the Online Matrix-Vector Multiplication Conjecture. In Proc. ACM Symposium on Theory of Computing (STOC). 21–30.
[82] Cecilia Hernández and Gonzalo Navarro. 2014. Compressed Representations for Web and Social Graphs. Knowledge and Information Systems 40, 2 (2014), 279–313.
[83] Torsten Hoefler, Dan Alistarh, Tal Ben-Nun, Nikoli Dryden, and Alexandra Peste. 2021. Sparsity in Deep Learning: Pruning and Growth for Efficient Inference and Training in Neural Networks. Journal of Machine Learning Research 22, 241 (2021), 1–124.
[84] R. Ilango, B. Loff, and I. C. Oliveira. 2020. NP-Hardness of Circuit Minimization for Multi-Output Functions. In Proc. 35th Computational Complexity Conference (CCC) (LIPIcs, Vol. 169). 22:1–22:36. doi:10.4230/LIPIcs.CCC.2020.22
[85] Eun-Jin Im, Katherine Yelick, and Richard Vuduc. 2004. Sparsity: Optimization Framework for Sparse Matrix Kernels. International Journal of High Performance Computing Applications 18, 1 (2004), 135–158.
[86] Guy Jacobson. 1989. Space-Efficient Static Trees and Graphs. In Proc. IEEE Symposium on Foundations of Computer Science (FOCS). 549–554.
Gonzalo Navarro
[87] A. Jez. 2015. Approximation of grammar-based compression via recompression. Theoretical Computer Science 592 (2015), 115–134.
[88] David S. Johnson, Shankar Krishnan, Jatin Chhugani, Subodh Kumar, and Suresh Venkatasubramanian. 2004. Compressing Large Boolean Matrices using Reordering Techniques. In Proc. International Conference on Very Large Data Bases (VLDB). 13–23.
[89] Chinmay Karande, Kumar Chellapilla, and Reid Andersen. 2009. Speeding up Algorithms on Compressed Web Graphs. Internet Mathematics 6, 3 (2009), 373–398.
[90] Jeremy Kepner, Peter Aaltonen, David Bader, Aydin Buluç, Franz Franchetti, John Gilbert, Dylan Hutchison, Manoj Kumar, Andrew Lumsdaine, Henning Meyerhenke, Scott McMillan, Carl Yang, John D. Owens, Marcin Zalewski, Timothy Mattson, and Jose Moreira. 2016. Mathematical Foundations of the GraphBLAS. In Proc. IEEE High Performance Extreme Computing Conference (HPEC). 1–9.
[91] Jeremy Kepner and John Gilbert (Eds.). 2011. Graph Algorithms in the Language of Linear Algebra. SIAM.
[92] Fredrik Kjolstad, Shoaib Kamil, Stephen Chou, David Lugato, and Saman Amarasinghe. 2017. The Tensor Algebra Compiler. Proceedings of the ACM on Programming Languages 1, OOPSLA (2017), 77:1–77:29.
[93] Kornilios Kourtis, Georgios I. Goumas, and Nectarios Koziris. 2008. Optimizing Sparse Matrix-Vector Multiplication Using Index and Value Compression. In Proc. Conference on Computing Frontiers. 87–96.
[94] Kornilios Kourtis, Vasileios Karakasis, Georgios Goumas, and Nectarios Koziris. 2011. CSX: An Extended Compression Format for SpMV on Shared Memory Systems. In Proc. ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP). 247–256.
[95] Mirosław Kowaluk, Andrzej Lingas, and Mia Persson. 2026. Approximate All-Pairs Hamming Distances and 0–1 Matrix Multiplication. In Proc. International Conference on Applied Algorithms (ICAA). 38–49.
[96] Andrew Krapivin, Benjamin Przybocki, Nicolás Sanhueza-Matamala, and Bernardo Subercaseaux. 2026. Optimal and Efficient Partite Decompositions of Hypergraphs. In Proc. 58th Annual ACM Symposium on Theory of Computing (STOC). 2187–2198.
[97] Amy N. Langville and Carl D. Meyer. 2006. Google’s PageRank and Beyond: The Science of Search Engine Rankings. Princeton University Press.
[98] Kasper Green Larsen and R. Ryan Williams. 2017. Faster Online Matrix-Vector Multiplication. In Proc. ACM-SIAM Symposium on Discrete Algorithms (SODA). 2182–2189.
[99] N. Jesper Larsson and Alistair Moffat. 2000. Off-Line Dictionary-Based Compression. Proc. IEEE 88, 11 (2000), 1722–1732.
[100] Daniel Lemire and Leonid Boytsov. 2015. Decoding Billions of Integers per Second through Vectorization. Software: Practice and Experience 45, 1 (2015), 1–29.
[101] Abraham Lempel and Jacob Ziv. 1976. On the Complexity of Finite Sequences. IEEE Transactions on Information Theory 22, 1 (1976), 75–81.
[102] Peter Lindstrom. 2014. Fixed-Rate Compressed Floating-Point Arrays. IEEE Transactions on Visualization and Computer Graphics 20, 12 (2014), 2674–2683.
[103] Peter Lindstrom and Martin Isenburg. 2006. Fast and Efficient Compression of Floating-Point Data. IEEE Transactions on Visualization and Computer Graphics 12, 5 (2006), 1245–1250.
[104] Markus Lohrey. 2012. Algorithms on SLP-Compressed Strings: A Survey. Groups Complexity Cryptology 4, 2 (2012), 241–299.
[105] Katja Losemann and Wim Martens. 2013. The Complexity of Regular Expressions and Property Paths in SPARQL. ACM Transactions on Database Systems 38, 4 (2013), 24:1–24:39.
[106] Sebastian Maneth and Fabian Peternek. 2018. Grammar-Based Graph Compression. Information Systems 76 (2018), 19–45.
[107] Giosuè C. Marinò, Francesco Furia, Dario Malchiodi, and Marco Frasca. 2023. Efficient and Compact Representations of Deep Neural Networks via Entropy Coding. IEEE Access 11 (2023), 106103–106125.
[108] Alistair Moffat and Matthias Petri. 2020. Large-Alphabet Semi-Static Entropy Coding via Asymmetric Numeral Systems. ACM Transactions on Information Systems 38, 4 (2020), 33:1–33:33.
[109] Gonzalo Navarro. 2016. Compact Data Structures – A Practical Approach. Cambridge University Press.
[110] Gonzalo Navarro. 2021. Indexing Highly Repetitive String Collections, Part I: Repetitiveness Measures. Comput. Surveys 54, 2 (2021), 29:1–29:31.
[111] Michael Nelson. 2019. Compressing and Performing Algorithms on Massively Large Networks. Ph.D. Dissertation. University of Oklahoma.
[112] Michael Nelson, Sridhar Radhakrishnan, Amlan Chatterjee, and Chandra N. Sekharan. 2017. Queryable Compression on Streaming Social Networks. In Proc. IEEE International Conference on Big Data (Big Data). 988–993.
[113] Michael Nelson, Sridhar Radhakrishnan, and Chandra N. Sekharan. 2019. Billion-Scale Matrix Compression and Multiplication with Implications in Data Mining. In Proc. IEEE International Conference on Information Reuse and
Integration for Data Science (IRI). 395–402.
[114] Mark Newman. 2010. Networks: An Introduction. Oxford University Press.
[115] Hung Q. Ngo, Ely Porat, Christopher Ré, and Atri Rudra. 2012. Worst-Case Optimal Join Algorithms. In Proc. ACM Symposium on Principles of Database Systems (PODS). 37–48.
[116] Masaaki Nishino, Norihito Yasuda, Shin-ichi Minato, and Masaaki Nagata. 2014. Accelerating Graph Adjacency Matrix Multiplications with Adjacency Forest. In Proc. SIAM International Conference on Data Mining (SDM). 1073–1081.
[117] Giuseppe Ottaviano and Rossano Venturini. 2014. Partitioned Elias–Fano Indexes. In Proc. ACM SIGIR Conference on Research and Development in Information Retrieval. 273–282.
[118] Lawrence Page, Sergey Brin, Rajeev Motwani, and Terry Winograd. 1999. The PageRank Citation Ranking: Bringing Order to the Web. Technical Report 1999-66. Stanford InfoLab.
[119] Rasmus Pagh. 2013. Compressed Matrix Multiplication. ACM Transactions on Computation Theory 5, 3 (2013), 9:1–9:15.
[120] Tuomas Pelkonen, Scott Franklin, Justin Teller, Paul Cavallaro, Qi Huang, Justin Meza, and Kaushik Veeraraghavan. 2015. Gorilla: A Fast, Scalable, In-Memory Time Series Database. Proceedings of the VLDB Endowment 8, 12 (2015), 1816–1827.
[121] Gerald Penn. 2006. Efficient Transitive Closure of Sparse Matrices over Closed Semirings. Theoretical Computer Science 354, 1 (2006), 72–81.
[122] Ali Pinar and Michael T. Heath. 1999. Improving Performance of Sparse Matrix-Vector Multiplication. In Proc. ACM/IEEE Conference on Supercomputing (SC). 30:1–30:11.
[123] Paul Purdom. 1970. A Transitive Closure Algorithm. BIT Numerical Mathematics 10, 1 (1970), 76–94.
[124] W. Rytter. 2003. Application of Lempel-Ziv factorization to the approximation of grammar-based compression. Theoretical Computer Science 302, 1-3 (2003), 211–222.
[125] Yousef Saad. 2003. Iterative Methods for Sparse Linear Systems (2nd ed.). SIAM.
[126] Hanan Samet. 1984. The Quadtree and Related Hierarchical Data Structures. Comput. Surveys 16, 2 (1984), 187–260.
[127] Emil Schätzle, Tommaso Pegolotti, and Markus Püschel. 2026. Fast Entropy Decoding for Sparse MVM on GPUs. arXiv preprint arXiv:2603.01915.
[128] Anne Schoor. 1982. Fast Algorithm for Sparse Matrix Multiplication. Inform. Process. Lett. 15, 2 (1982), 87–89.
[129] Julian Shun, Laxman Dhulipala, and Guy E. Blelloch. 2015. Smaller and Faster: Parallel Processing of Compressed Graphs with Ligra+. In Proc. Data Compression Conference (DCC). 403–412.
[130] Shaden Smith and George Karypis. 2015. Tensor-Matrix Products with a Compressed Sparse Tensor. In Proc. Workshop on Irregular Applications: Architectures and Algorithms. 5:1–5:7.
[131] James A. Storer and Thomas G. Szymanski. 1982. Data Compression via Textual Substitution. J. ACM 29, 4 (1982), 928–951.
[132] Volker Strassen. 1969. Gaussian Elimination is not Optimal. Numer. Math. 13 (1969), 354–356.
[133] Yasuo Tabei, Hiroto Saigo, Yoshihiro Yamanishi, and Simon J. Puglisi. 2016. Scalable Partial Least Squares Regression on Grammar-Compressed Data Matrices. In Proc. 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD). 1875–1884.
[134] Robert E. Tarjan. 1972. Depth-First Search and Linear Graph Algorithms. SIAM J. Comput. 1, 2 (1972), 146–160.
[135] Francesco Tosoni, Philip Bille, Valerio Brunacci, Alessio De Angelis, Paolo Ferragina, and Giovanni Manzini. 2025. Toward Greener Matrix Operations by Lossless Compressed Formats. IEEE Access 13 (2025), 56756–56779.
[136] Francesco Tosoni and Gabriele Mencagli. 2026. Right Multiplication on Grammar-Compressed Matrices: A Streaming, Memory-Bounded GPU Engine. arXiv preprint arXiv:2607.24971.
[137] Todd L. Veldhuizen. 2014. Triejoin: A Simple, Worst-Case Optimal Join Algorithm. In Proc. International Conference on Database Theory (ICDT). 96–106.
[138] Sebastiano Vigna. 2013. Quasi-Succinct Indices. In Proc. ACM International Conference on Web Search and Data Mining (WSDM). 83–92.
[139] Binh Dao Vo and Kiem-Phong Vo. 2007. Compressing Table Data with Column Dependency. Theoretical Computer Science 387, 3 (2007), 273–283.
[140] Richard W. Vuduc and Hyun-Jin Moon. 2005. Fast Sparse Matrix-Vector Multiplication by Exploiting Variable Block Structure. In Proc. International Conference on High Performance Computing and Communications (HPCC) (LNCS, Vol. 3726). 807–816.
[141] Stephen Warshall. 1962. A Theorem on Boolean Matrices. J. ACM 9, 1 (1962), 11–12.
[142] Jeremiah Willcock and Andrew Lumsdaine. 2006. Accelerating Sparse Matrix Computations via Data Compression. In Proc. ACM International Conference on Supercomputing (ICS). 307–316.
[143] Samuel Williams, Leonid Oliker, Richard Vuduc, John Shalf, Katherine Yelick, and James Demmel. 2009. Optimization of Sparse Matrix-Vector Multiplication on Emerging Multicore Platforms. Parallel Comput. 35, 3 (2009), 178–194.
[144] En-Hui Yang and Jin Bian. 2016. Bipartite Grammar-Based Representations of Large Sparse Binary Matrices: Framework and Transforms. In Proc. International Symposium on Information Theory and its Applications (ISITA). 241–245.
Gonzalo Navarro
Table 7. Decode-first classes of formats. "Lossy" means that the matrix itself is modified.
| Class | Examples | What must be decoded | Gain |
|---|---|---|---|
| General-purpose | gzip, bzip2, xz, zstd | Whole block / matrix | Disk, network |
| Floating-point | fpzip, ZFP, Gorilla | Blocks of values | Disk, memory |
| Index/value coding | CSR-DU, CSX, DCSR; Elias-Fano; PFOR | Streams while multiplying | Memory bandwidth |
| Blocked / structured | BCSR, VBR, CSB, DCSC, ELL, DIA, HYB | Nothing (extra zeros stored) | Fewer indices; SIMD/GPU |
| Lightweight columnar | RLE, dictionary (CLA, AWARE) | Mostly operate on compressed data | Space; time |
| Lossy (ML) | Pruning, quantization, low rank | Weights, at inference | Space; time |
[145] Raphael Yuster and Uri Zwick. 2005. Fast Sparse Matrix Multiplication. ACM Transactions on Algorithms 1, 1 (2005), 2–13.
[146] Marcin Zukowski, Sandor Heman, Niels Nes, and Peter Boncz. 2006. Super-Scalar RAM-CPU Cache Compression. In Proc. IEEE International Conference on Data Engineering (ICDE). 59.
A Formats that Require Decompression: A Brief Tour
For completeness, we briefly review “decode-first” matrix compression formats, in which the matrix must be decoded, wholly or in blocks, before (or while) it is operated upon, so that the cost of the operation does not shrink with the size of the compressed representation, that is, operation time is always . This is not the focus of the survey and the review is deliberately short, but it is useful in order to place the computation-friendly formats in context. The border is not sharp: the formats range from those that decompress everything into memory, to those that decode small pieces on the fly inside the multiplication loop, to those that operate directly on compressed pieces (the latter being the subject of the main body of this survey). Table 7 summarizes the classes.
A.1 General-purpose and floating-point compressors
General-purpose compressors based on Lempel–Ziv [101] (gzip/DEFLATE [56], LZMA as in xz), on the Burrows–Wheeler transform [39] (bzip2), or on a mixture of LZ and entropy coding (zstd [51]) are often excellent in compression ratio, and they are the natural baseline against which matrix compressors are compared [65]; however, they ignore the two-dimensional structure and force the whole matrix (or block) to be decompressed before any operation. In the experiments of Ferragina et al. [65], a multithreaded gzip-based product that decompressed each block at every iteration had the best memory footprint, together with the grammar-based formats, but was by far the slowest, in some cases more than slower. Moreover, grammar compressors (and thus the Lempel–Ziv family, whose size is within a logarithmic factor of grammars) are the class covered by the impossibility results of Section 2.4 when they are applied to the plain sequence of values.
For floating-point data, specialized lossless compressors exploit the structure of the IEEE representation: fpzip [103] predicts values and encodes residuals; Gorilla [120] XORs consecutive values, which suits time series. ZFP [102] compresses small blocks of a multidimensional array (in a fixed-rate mode, which permits random access to blocks) and is lossy or lossless depending on the mode. They reduce memory and disk, but the blocks are decoded before arithmetic is applied.
A.2 Index and value coding for sparse formats
Sparse matrix–vector multiplication on modern hardware is memory-bound, so reducing the number of bytes moved can speed it up even if the number of arithmetic operations is unchanged [143]. This motivated compressing the index arrays of CSR: CSR-DU [93] replaces column indices by small deltas with variable-length encodings, CSX [94] detects substructures (horizontal, vertical, diagonal runs and blocks), and Willcock and Lumsdaine [142] proposed delta-coded variants of CSR. These formats decode a few indices inside the multiplication loop. The time per product is still proportional to nnz(A) (and may get higher due to decoding), and the gain comes from bandwidth. More recently, Schätzle et al. [127] compress CSR with an entropy coder (a variant of asymmetric numeral systems, dtANS) designed to be decoded in parallel on a GPU inside the multiplication; the result is up to smaller than the smallest cuSPARSE format and, on matrices with at least nonzeros, usually faster, with a best speedup of . Decoding cost is hidden by the memory-bound nature of the product, but the work is still proportional to nnz(A).
The same idea underlies the compression of integer sequences: universal and Golomb-like codes [62, 74] (the WebGraph framework also uses them for gaps [28]), Elias–Fano [61, 117, 138], and SIMD-friendly frame-of-reference codes with patching [100, 146]. Graph processing systems run algorithms over gap-coded adjacency lists by decoding on the fly, as Ligra+ [129] does. All of these decode before using the data, and they are orthogonal to, and combinable with, the computation-friendly formats: for example, the residual graph of Section 4 or the sequence C of Section 5 can be further encoded with these methods, at the price of a decoding step.
A.3 Blocked and structured formats
A different way to save indices is to store blocks of nonzeros: in blocked CSR (BCSR) a single index describes a small dense block (of, say, or entries), which allows register blocking and SIMD, at the price of storing explicit zeros to complete the blocks [85, 122]; variable block structures [140], compressed sparse blocks (CSB), which makes products with A and equally efficient [37], and doubly compressed formats for hypersparse matrices (DCSC) [38] refine this idea. GPU formats such as ELLPACK, diagonal (DIA), and hybrids (HYB) [20] pad or regularize rows to match the hardware. They are lossless but their “compression” is a layout choice rather than a reduction of the information: the work is proportional to the number of stored entries, including padding. The -tree formats of Section 3 are in some sense a more principled version of blocking, since blocks are discovered hierarchically.
A.4 Lightweight schemes from column stores, and CLA
Column-oriented database systems use lightweight compression (run-length, dictionary, bit-packing) and, whenever possible, operate directly on the compressed columns [1]. The matrix analogue is Compressed Linear Algebra (CLA) [59, 60], which groups correlated columns and uses offset lists, run-length encoding and dictionary coding per group to support matrix-vector products on the compressed form, with a cost related to the number of distinct values and runs, and its successors such as AWARE [19], which chooses formats according to the workload. Donenfeld et al. [57] propose a compiler that generates code for sparse computations over lossless-compressed formats. These systems straddle our border: simple schemes such as run-length encoding are computation-friendly, whereas more complex ones need partial decoding; they are the main baseline for Section 5.
Gonzalo Navarro
A.5 Lossy compression for machine learning
In deep learning the matrices are weights, and it is common to change them: pruning produces sparse matrices [83], quantization reduces the precision of the values [71], low-rank factorizations replace a matrix by the product of two thin ones, and the combination of pruning, quantization and Huffman coding of Deep Compression [78] achieves large reductions of size, with entropy coding followed by decoding at inference time [107]. Lossy techniques may damage accuracy in a data- and model-dependent way, but they are orthogonal to lossless ones: as observed in [65], one can apply lossy compression first and lossless compression later, which is the setting in which the formats of the main body are most attractive, since they remain exact.
A.6 Sparse tensor frameworks and GraphBLAS
Frameworks for sparse algebra provide formats and kernels over semirings, without compression beyond sparsity: GraphBLAS [53, 90, 91] expresses graph algorithms as sparse matrix operations over semirings, and tensor compilers [48, 92] generate kernels for combinations of per-dimension formats (dense, compressed, singleton, …), including compressed sparse fibers [130]. Their algebraic model is the natural target for integrating the computation-friendly formats of this survey (Section 9), since they already abstract the format of an operand from the kernel that uses it. Matrix multiplication in these frameworks follows classical sparse algorithms [72, 77] that are the uncompressed counterparts of the baseline of Section 3.3.