Manuscript Offprint
arXiv:2610.32836Compressed Boolean Matrix Multiplication using Bicliques
Abstract
Boolean matrix multiplication is a fundamental operation in many graph-based applications, including web and social network analysis, information retrieval, and graph query evaluation. However, conventional sparse representations such as CSR/CSC still incur significant space and time costs on large graphs. In this work, we introduce a method for multiplying Boolean matrices based on a biclique-based compressed representation that decomposes them into dense bipartite subgraphs, thereby capturing large sets of implicit edges. We first improve the iterative biclique extraction algorithm of Hernández and Navarro by introducing percentile-based parameter adaptation that dynamically adjusts its parameters according to the degree distribution, enhancing both extraction efficiency and compression ratio. We then extend the Schoor multiplication algorithm to operate directly on biclique-encoded matrices, thereby enabling a compositional form of multiplication.
*Corresponding author
Email addresses: naraya2018@udec.cl (Nicolás Araya), jzagal2018@inf.udec.cl (José Zagal), cecihernandez@udec.cl (Cecilia Hernández), gnavarro@dcc.uchile.cl (Gonzalo Navarro) where the output can also be represented as a collection of bicliques. Our experimental results on large real-world web and social graphs show that our approach achieves substantial reductions in space and computation time with respect to CSR/CSC-based representations. For example, using biclique extraction just as a tool to speed up multiplication (but retaining the CSR/CSC format) yields up to 34-fold speedups. Further, using the biclique-based representation for input and output yields up to a 10-fold reduction in space and up to a 290-fold speedup for matrix multiplication. These results demonstrate that our representation based on bicliques is both space- and time-effective to support an algebra of Boolean matrices.
Keywords: Boolean matrix multiplication, compressed graph representation, bicliques, sparse matrices, graph compression
1. Introduction
Graphs play a fundamental role in modeling a wide range of problems in many areas, including social networks [1], knowledge graphs [2], the Web [3], and scientific applications such as gene sharing [4] or de Bruijn graphs [5]. A common representation for graphs is adjacency matrices, which enable algebraic operations between graphs using Boolean matrix arithmetic: transposing matrices, Boolean sums, matrix-vector and matrix-matrix multiplication, and transitive closures are fundamental in a wide range of tasks, including context-free grammar parsing and query processing in graph databases, multi-hop reachability computation, diffusion or influence analysis in social networks, and dynamism in evolving graphs.
Most of those applications involve sparse graphs, which means that their adjacency matrices have comparatively few non-zeros. The best known representations for sparse matrices include the classic Compressed Sparse Row (CSR) format, which stores non-zero elements in row-major order, along with column indices and the starting position of each row. The Compressed Sparse Column (CSC) format is the analogous structure for indexing columns. The space required by these representations is proportional to the number of edges in the graph. Further, they operate on sparse matrices much faster than the standard dense matrix representation.
On large sparse graphs and matrices, however, the space and operation time remains and issue, especially on the most costly operations like matrix multiplication and transitive closure. In this paper we focus on the former operation, as it appears more frequently in applications. One of the best practical sparse matrix multiplication algorithms is due to Schoor [6], which has an average time complexity of for multiplying matrices of dimensions and , where and are the number of nonzero elements in X and Y, respectively, assuming nonzero entries distribute uniformly in the matrices. Recently, Arroyuelo et al. [7] developed a compact-space implementation of Schoor's algorithm with an average time complexity of on top of CSR/CSC representations.
Several schemes obtain further compression upon conventional sparse-matrix formats like CSR and CSC, by exploiting sparsenes and clustering [8], similarity of adjacency lists [9, 10], or clique and biclique patterns [11, 12], among others. Some of those formats enable efficient matrix-vector [13, 10] and matrix-matrix [7] multiplication. In this paper we are interested in the compression based on bicliques [11], which capture highly connected regions that frequently occur in social and web graphs, where communities or connectivity clusters induce high edge density. By compactly representing those dense substructures, compression methods represent many edges implicitly. Further, it has been shown that those compact representations can be used to speed up matrix-vector multiplication, where the matrix is sparse but the vector is dense [13].
In this work we improve the biclique-based representation and extend its functionality to support Boolean matrix-matrix multiplications directly on the compressed matrices, improving both space usage and computation time compared to the state of the art. More precisely, our main contributions follow.
-
We improve our previous biclique extraction [11] by defining an adaptive method that dynamically adjusts the parameters according to the degree distribution of the input graph. This adaptive strategy improves both compression ratio and the runtime, particularly for large real-world networks with heterogeneous degree distributions.
-
We show that Schoor's algorithm [6] adapts naturally to biclique-based representations, and develop a version that directly operates over our representation. In particular, our version of Schoor's algorithm both receives the input and produces the output in the form of bicliques.
-
We provide an extensive experimental evaluation on large real-world web graphs, comparing space usage and running time against CSR/CSC-based Schoor and other compressed representations that support matrix-matrix multiplications [7]. In a first scenario, we retain the CSR/CSC format and use biclique extraction and multiplication just as a speedup, becoming up to 34 times faster than Arroyuelo et al.'s CSR/CSC baseline multiplication. In a second scenario, we use bicliques as the standard matrix representation and exploit the compositionality of our biclique-based Shoor's multiplication to maintain the matrices compressed with bicliques all of the time. We obtain space reductions up to 10-fold and time improvement factors of up to 290 with respect to the baseline. Our compression based on bicliques is shown to perform even better on the output of multiplications, which makes the method even stronger.
In the context of graph structures, various space-efficient compressed representations have been proposed, which also support efficient computation of queries. Some of the most relevant methods include the Webgraph framework [9] and the -tree [8]. Over the years, the Webgraph framework has been improved by exploiting locality, similarity, and node ordering in large Web and social graphs. On the other hand, -tree exploits the sparseness and clustering of zeros of adjacency matrices. Other methods use other regularities; for instance, Hernández and Navarro [11] exploit dense subgraphs that include cliques and bicliques to represent edges implicitly via their ver-tex sets, and on a later work Glaria et al. [12] showed how to compress undirected graphs by clustering maximal cliques. Pinar and Heath [14] used a compressed form to represent the matrix using the CSR format.
Compressed graph representations also provide support for computing fast matrix operations. For instance, Francisco et al. [13] reduced the matrix-vector multiplication time (where the matrix is sparse and the vector is dense) using the Webgraph framework of Boldi and Vigna [9] and the biclique extraction approach of Hernández and Navarro [11]. They evaluated the impact in the PageRank computation using an approximation of the power method [13]. Ferragina et al. [10] present a different approach to matrix-vector multiplication computation of non-binary matrices. They focus on grammar-based compression, emphasizing the similarities in the matrix more than its sparseness. They represent the matrix using an extension of CSR that also stores (nonzero) cell values, and implement a grammar-based compression similar to RePair [15]. The resulting representation allows matrix-vector operations in time proportional to the number of replacement rules generated by the compression. Nelson et al. [16] propose matrix-vector and matrix-matrix multiplications using compressed Boolean matrices with compressed binary tree algorithms [17] and an adapted encoding algorithm and node reordering to better capture similarities of contiguous adjacency lists.
3. Schoor's Multiplication Algorithm
3.1. Original Algorithm
Schoor [6] proposed one of the most efficient sparse matrix multiplication algorithms, over a CSR/CSC-like representation. The algorithm uses
words of space for an matrix with nonzero cells. Its average time to compute is , where and are the number of non-zero cells in matrices (of size ) and (of size ), assuming the nonzero entries are uniformly distributed. The core idea is to intersect the set of nonempty columns of with the set of nonempty rows of . For each in that intersection, every nonzero cell of and every nonzero cell of contribute to . On Boolean matrices, this means that contributes a biclique to formed by all the nonzero rows of column of on one side, and all the nonzero columns of row of on the other.
Recently, Arroyuelo et al. [7] implemented Schoor's algorithm in a more compact form. Since the algorithm needs X in CSC form and Y in CSR form, they store both, yet using only words and also compacted the intermediate space for computation. Their average computation time, in exchange, raises to .
3.2. A Compact Implementation
Arroyuelo et al. [7] present an adaptation of Schoor's algorithm using the CSR and CSC matrix representations. This implementation improves space efficiency and achieves an average time complexity of . The implementation uses integer arrays for the CSR format to store the non-empty rows (rowId), the non-empty columns for each row (colsIdx), and the starting position of each row (rowPtr). Similarly, for CSC it uses colId, rowsIdx and colPtr arrays. Arrays rowPtr and colPtr have a terminator entry that points to the first cell past the arrays colsIdx and rowsIdx.
The matrix multiplication computes using X in CSC, Y in CSR, and Z in CSR (plus CSC, generated from CSR), in two main steps:
STEP 1: Intersections and Cartesian product sizes This step identifies intersections between columns of X (in colId) and rows of Y (in rowId) that participate in the multiplication. The intersection algorithm uses exponential or linear search depending on array sizes, finding all t such that a column t in X matches a row t in Y. Each intersection t enables the computation of the Cartesian product between cells of rows i and cells of columns j. The cardinality of these products determines the total number of edges, though duplicates may occur. Rows i are retrieved from colPtr and rowsIdx of X, and columns j from rowPtr and colsIdx of Y. A structure called Task stores pointers and sizes of Cartesian products, which are collected in an array.
STEP 2: Cartesian product computation This step computes the Cartesian products to identify the nonzero cells of the matrix Z. Since the same cell may appear in multiple products, two min-heaps are used to avoid duplicates: one for rows and one for columns.
All Cartesian products are first inserted in HeapByRow, which is sorted by the smallest row i in the product. Elements are then extracted until all those sharing the smallest row are obtained. As rows are extracted, their columns j are inserted in increasing order into HeapByCol. If the products have more than one row, they are reinserted into HeapByRow with the first row removed. The elements extracted from HeapByCol are used to directly produce Z in CSR format.

Figure 1: Illustration of Schoor's Boolean matrix multiplication algorithm.
Figure 1 shows an example that illustrates the main stages of the algorithm. In Step 1, both matrices X and Y are presented in their CSC and CSR formats, respectively, which are used to compute the multiplication . The intersection between the colId array of and the rowId array of yields the set (highlighted in blue, pink, yellow, and green, respectively); each such element determines a Cartesian product.
For , the algorithm accesses position 0 in colPtr and retrieves row {2} from the rowIdx array; then, from position 0 in rowPtr it obtains column {4}. For , it accesses position 2 in colPtr and obtains row {4}; then, from the corresponding position in rowPtr of CSR(Y), it retrieves columns {1, 4}. For , it retrieves rows {3, 5} from colPtr and, from position 3 in rowPtr, it obtains columns {2, 3}. Finally, for , it retrieves row {3} from colPtr and column {1} from rowPtr.
Step 2 in Figure 1 illustrates how Cartesian products are handled using heaps. Once the intersections are obtained, they are inserted into HeapByRow, which is sorted according to the first element of each row array, ensuring that intersections sharing the same row are grouped together and ordered in ascending form.
For each processed row, a heap HeapByCol is created. In the example, the first row extracted in the first iteration is row 2. After performing a pop on HeapByRow, the algorithm computes the Cartesian product , which is inserted into HeapByCol(2).
In the following two iterations, row 3 is obtained. Since this row differs from the previous one, HeapByCol(2) is emptied, and as its elements are extracted, the resulting matrix in CSR format is constructed. Next, the Cartesian products and , are processed and inserted into HeapByCol(3). Because the intersection still has pending rows, it is reinserted into HeapByRow as .
In the next iteration, the element extracted from HeapByRow corresponds to . Since this is a new row, HeapByCol(3) is emptied, continuing the construction of the resulting matrix. The final iteration processes . Once both heaps become empty, the algorithm completes the construction of .
4. Current Biclique-based Representation
A representation based on bicliques (i.e., complete bipartite subgraphs) allows a matrix to be decomposed into structured components that enable the implicit representation of edges, reducing the storage and time processing. We describe here the biclique representation we build on [11].
Definition 1. Let be a directed graph. The set of bicliques in is defined as a collection of complete bipartite subgraphs. Each biclique , where are subsets of vertices, represents the subgraph . The biclique-based representation of graph is expressed as the pair , where represents the residual of the graph, that is, that induced by the edges not in any biclique.
Note that duplicates are allowed, that is, the same edge may appear in more than one biclique . This may enable a better representation as a union of bicliques plus a residual graph.
The representation based on bicliques uses words to represent the edges of biclique , and then words to represent the edges of the residual graph. Those words are written contiguously, biclique by biclique and then the residual graph, in an array. A bitmap is used to mark the first entry of each component , , and . The total space adds up to words, plus a sublinear term for the bitmap.
The main challenge to use this representation is how to extract suitable bicliques from the graph. Finding the bicliques that yield a minimum-space representation is NP-hard, so heuristics are used. The biclique extraction algorithm used in the current representation [11] aims to extract large bicliques in four steps: Step 1 uses MinHashing [18] to compute a small hash set for each adjacency list aiming to efficiently estimate similar adjacency lists. Next, Step 2 builds clusters with similar hash sets, Step 3 sorts by edge frequency each cluster adjacency list to improve the discovery of large bicliques, and Step 4 builds a prefix tree to extract the bicliques.
Their implementation extracts bicliques iteratively using various parameters, in particular the minimum vertex degree to process (minAdjNodes), the number of edges implicitly represented in bicliques to extract (bicliqueSize), a minimum number of bicliques (threshold) below which the extractor reduces the bicliqueSize parameter for the next iteration to enable the extraction of more bicliques, and the maximum number of iterations for the extractor (iterations). This parameterization is done arbitrarily at initialization and does not use information about the input graph; therefore, parameter tuning is cumbersome and impact the quality of the bicliques and the running time required by the algorithm.
5. Matrix Multiplication with Bicliques
Boolean matrix multiplication can benefit significantly from the biclique structure of the graphs they represent. We now present our matrix multiplication algorithm, which adapts Shoor's algorithm (Section 3) to run on the matrix representation based on bicliques of Section 4.
Definition 2. Let a graph be represented as a set of bicliques B and a residual graph R. We call the matrix that represents the set of bicliques in B and the matrix of its residual graph. The matrix X representing G can then be written as .
Therefore, given graphs and , the multiplication of their matrices can be computed as

Figure 2: Illustration of the multiplication between and the set of bicliques in our biclique-based representation. Note edge (3, 5) appears twice in the output bicliques.
We will carry out the first multiplication using the algorithm of Arroyuelo et al. [7]; recall Figure 1. The other three components require new algorithms to multiply a general matrix by a set of bicliques, and two sets of bicliques, as we represent those as . Those are detailed next.
5.1. Matrix-to-Biclique Multiplication
To perform this multiplication, we compute the product between matrix and the bicliques of matrix , denoted as . For this purpose, we calculate the intersections between the colId array of and the set of each biclique . The procedure is as follows; see Figure 2 for an example.
-
For each biclique , we identify the intersections between the columns of matrix (in colId) and the rows of the biclique .
-
For each intersecting element colId[k] ∈ S_{yi}, we retrieve the row content from rowIdx[colPtr[k]..colPtr[k+1] - 1] of CSC(R_x) and the

Figure 3: Illustration of the multiplication of the biclique set with the matrix .
columns in of . Note that the product of the rows from and the columns from form indeed a biclique in the output.
-
Each intersection generates a new biclique, where the rows vary and the columns are always the same set . We collapse them all in one single biclique , where the sequence formed by concatenating all the rows from rowIdx of , extracted from the different intersecting elements colId[k].
-
Finally, the new bicliques undergo a deduplication stage on the sequence S to remove repeated rows.
5.2. Biclique-to-Matrix Multiplication
This operation is analogous to the previous one: we now use the CSR format for the matrix . We then intersect the array of each biclique with the rowId array of and, for each element in the intersection, form the new bicliques in a manner analogous to the matrix-to-biclique case. To be precise, we go through the following steps; see Figure 3.

Figure 4: The marks( ) table, associating each element of any with the sets that connect to it.
-
We compute the intersection between the array of each biclique and the rowId array of .
-
For each intersecting element rowId[k] ∈ C_{xi}, we retrieve the column content from colIdx[rowPtr[k]..rowPtr[k+1]−1] of CSR(R_y) and the rows in S_{xi} of b_{yi}.
-
The output biclique is . To form C, we concatenate in a sequence all the qualifying column values from colIdx of .
-
We deduplicate the repeated elements in C for the newly generated bicliques.
5.3. Biclique-to-Biclique Multiplication
To perform the biclique-to-biclique multiplication , we first compute the marks( ) table, shown in Figure 4, where each element v in any is listed in sorted order and associated with all the sets that connect to it. The multiplication then proceeds as follows; see Figure 5.
- For each biclique , we search each element of in the marks( ) table.
Biclique x Biclique

Figure 5: Illustration of the multiplication used to propagate adjacency information based on bicliques.
-
If the element is found in marks( ), we obtain its associated content (the corresponding sets). Note that this implies that biclique belongs to the output.
-
Thus, for every biclique that has at least one intersection, a new biclique is produced: we form the sequence C by combining the values obtained from marks( ).
-
Finally, duplicated elements in the new set C of each generated biclique are removed.
5.4. Matrix Input and Output Representation
There are various ways in which we can exploit our biclique-based multiplication algorithm. First, we can assume that the input matrices are already compressed with bicliques. Our algorithm produces the output of Eq. (1) in the form of a residual matrix in CSR format (for ) and as a set of bicliques (for , , and , as shown in this section). We can then represent the matrix in the same compressed format:
Note that, in this case, may contain some edges that already exist in , but the result is still correct.
In order to reduce space, and because the time to produce from is very low compared to that of multiplication, we generate and store only , producing on the fly, at multiplication time, when needed. This is in contrast with Arroyuelo et al. [7], who store both.
Representing the result in the form of bicliques plus a residual matrix has the important property of compositionality: the output of the multiplication is in the same format as the input, which allows operating it again directly. This enables a matrix algebra where matrices are always represented in this form; it is easy to incorporate other operations like transposition and sums in this format, with boosted efficiency.
Recompression. One possible drawback of this form of operating is that the biclique representation may be worse than what we could obtain by extracting bicliques again from Z. For example, bicliques where or are better integrated to : after generating Z in the form above, we can produce from its representation , and then find its bicliques as in Section 4 (in Section 6 we will show how to do this faster and better).
Recompression can be incorporated to the matrix algebra as an operation

Figure 6: The process of converting the output of to CSR format.
that improves the quality of the compression, and applied at any time one deems it convenient. A better representation as bicliques will also speed up further operations on Z. In order to apply it, we need to convert the representation from biclique form to CSR. This is described in Section 5.5.
Bicliques as a speedup. The speedups for biclique extraction we obtain in Section 6 enable the use of bicliques not for compression, but just as a device to speed up multiplication. In this case, we assume the matrices are input and output in CSR format. We extract bicliques from matrices X and Y before multiplying them, and after multiplication we convert the output to CSR form as described in Section 5.5.
5.5. Recovering the Matrix from the Bicliques
To obtain the matrix in CSR format from the bicliques computed in the operations described above, we again make use of the marks table. From it, we produce the CSR representation as follows: we concatenate the elements of the components associated with each row v in marks, deduplicate the concatenation, and those are the elements in colIdx corresponding to .
Figure 6 illustrates the process on the component ; we in fact merge in this way the bicliques generated by and as well. The result is finally merged (removing duplicates) with the CSR representation of the remaining component, .
6. Biclique Extraction with Adaptive Parameters
The original biclique extraction technique, described in Section 4, uses fixed parameters. We now introduce an adaptive parameter setting based on the input graph degree distribution, where some features adapt dynamically between iterations. The goal is to reduce the execution time of the biclique extraction and to improve the edge compression efficiency represented by the extracted bicliques.
To target bicliques with a large number of edges, the idea is to process first nodes with higher degrees, temporarily omitting those with fewer neighbors. This allows the algorithm to reduce the computation time in all its steps. We found that an effective way to define this pruning is by applying percentile-based filtering over the degree distribution. For instance, setting the minimum degree threshold at the 90th percentile restricts the search to the top 10% of nodes with the highest connectivity.
As an example, Figure 7 shows the degree distribution of the cnr-2000-hc graph [9, 19], segmented by percentiles. The yellow region highlights nodes within the 50th percentile, while the red region marks those in the 90th
Degree Distribution with Percentile Highlights

Figure 7: Out-degree distribution of the cnr-2000-hc graph grouped by percentiles, emphasizing dense regions suitable for biclique extraction.
percentile. This identifies the ranges of nodes that are most relevant for extracting largest bicliques, helping guide the initial parameterization of the algorithm.
Algorithm 1 presents the pseudocode for the iterative biclique extraction process, using percentiles as an adaptive tuning mechanism. The procedure begins with an initial traversal of the graph to build a degree distribution, which helps identify highly connected nodes. Based on this distribution, the parameter minAdjNodes, which filters out the small degree adjacency lists, is estimated using the 90th percentile. This initial filter favors the detection of large bicliques.
The algorithm then proceeds with the iterative extraction phase, following
Algorithm 1 Adaptive Biclique Extraction Process. Each step adjusts parameters based on intermediate statistics to balance extraction time and compression effectiveness.
Require: Graph G
Ensure: Residual graph , set of bicliques
1: Initialize: unordered_map<int, int> distribution
▷ Step 1: Build adjacency distribution
2: for all node do
3: distribution[gradeOf(v)] ← distribution[gradeOf(v)] + 1
4: end for
▷ Step 2: Initialize parameters
5: minAdjNodes ← getPercentile(90)
6: currIt ← 0
7: totalBicliques ← 0
8: threshold ← 0.8
▷ Step 3: Iterative extraction
9: while currIt < maxIt do
10: signatures ← computeMinHashes(minAdjNodes)
11: clusters ← clusterize(signatures)
12: bicliqueExtracted ← extractBicliques(clusters)
13:
14:
15: avgBicliques ← B_G.size() / currIt
▷ Step 4: Decide new parameters
16: if bicliquesExtracted.size() < avgBicliques · threshold then
17: minAdjNodes ← minAdjNodes · threshold
18: end if
19: currIt ← currIt + 1
20: end while
the original approach [11]. At the end of each iteration, the number of extracted bicliques is compared with the historical average, adjusted by a tolerance threshold (threshold = 0.8). If there is a reduced productivity, the minAdjNodes parameter is reduced by 20%, allowing the algorithm to explore nodes with lower degrees in subsequent rounds.
| Dataset | |V| | |E| | |E|/|V| |
|---|---|---|---|
| web-Stanford | 281,903 | 2,312,497 | 8.20 |
| cnr-2000-hc | 325,557 | 3,126,152 | 9.87 |
| wikipedia-link-lmo | 52,214 | 3,623,678 | 64.40 |
| web-Google | 875,713 | 5,105,039 | 5.83 |
| coPapersCiteseer | 434,102 | 32,073,436 | 73.88 |
| indochina-2011 | 7,414,866 | 194,109,311 | 26.17 |
| arabic-2005 | 22,744,080 | 639,999,458 | 28.13 |
Table 1: Main statistics of the graphs used in the experiments, including number of nodes, number of edges, and average degree.
This approach enables a segmented search for bicliques, which reduces the computational cost of extraction by processing fewer elements per iteration. Moreover, the selected nodes tend to share similar degrees, enhancing the structural coherence of the extracted bicliques.
7. Experimental Evaluation
We built on the C++ implementation of Arroyuelo et al. [7], extending the algorithm to support biclique operations. We measured time and space usage of biclique compression and execution time of multiplications, comparing our results under various scenarios with the version of Schoor's algorithm implemented by Arroyuelo et al., which we call Baseline. We also include a comparison with the -tree compressed representation by the same authors.
The datasets used are publicly available from various sources, such as The Laboratory of Web Algorithms (LAW), collected and used by Boldi and Vigna [9], the Stanford Network Analysis Platform (SNAP) [20], and the Network Repository [21]. Table 1 presents the main statistics for the chosen datasets, including the number of vertices , the number of edges , and the node degree average, .
All results were obtained by using sequential implementations, running on an AMD EPYC 9354 Linux server with 256 GB of main memory.
The source code of our approach is available in the Github repository https://github.com/nicolasaraya/BicliqueMultiplication.
7.1. Biclique Extraction and Compression
We first compare the space compression and running time performance between the adaptive (Section 6) and non-adaptive (the original implementation [11], see Section 4) versions of the biclique extractor algorithm. To perform the comparison, we define the compression ratio as the percentage of the space saved by compression (higher is better):
Table 2 compares the compression and execution time performances obtained using our adaptive biclique extraction method against the non-adaptive alternative using fixed parameters and ten iterations. We observe that adaptive outperforms non-adaptive extraction in both compression ratio and speed in almost all cases. It usually takes 45% of the time of the non-adaptive version (and as little as 29%), being slower in only one case, where it takes 162% of the time. In that case, however, the non-adaptive version is faster because it fails to compress, obtaining a compression ratio of just 2%, versus 41% of the adaptive version. The resulting compressed representation usually takes
| Dataset | Ratio (%) | BicEx (s) | bpe(B+R) | |||
|---|---|---|---|---|---|---|
| Non | Adaptive | Non | Adaptive | Non | Adaptive | |
| web-Stanford | 21.64 | 52.35 | 2.54 | 2.40 | 32.46 | 23.21 |
| cnr-2000-hc | 41.32 | 59.60 | 2.71 | 1.17 | 23.61 | 17.88 |
| wikipedia-link-lmo | 67.15 | 65.95 | 2.95 | 1.35 | 11.43 | 11.83 |
| web-Google | 2.01 | 40.98 | 8.40 | 13.58 | 40.59 | 28.88 |
| coPapersCiteseer | 49.94 | 64.47 | 47.38 | 13.69 | 16.89 | 12.29 |
| indochina-2011 | 73.96 | 78.33 | 173.12 | 89.73 | 10.18 | 8.85 |
| arabic-2005-hc | 70.75 | 74.13 | 951.66 | 441.95 | 11.17 | 10.18 |
Table 2: Comparison between biclique extraction with our adaptive and the previous non-adaptive parameter configurations. Column BicEx gives the running time in seconds of the biclique extraction process. Column bpe gives the bits per edge of the resulting representations. The best values are highlighted in bold.
70%-75% of the space required by the one obtained with the non-adaptive version, being larger in only one case, where it takes 103% of the space.
Figure 8 shows how compression ratios grow over time, along the successive iterations, in both adaptive and non-adaptive implementations. In all cases, the adaptive version achieves a higher cumulative compression ratio per second, indicating that dynamically adjusting the extraction parameters accelerates convergence while maintaining superior compression efficiency. The adaptive case shows the first iteration after each parameter adaptation using a star symbol; it can be seen that such iteration effectively improves compression without significantly worsening the execution times in most datasets.
Next, we compare the compression efficiency of our biclique representation (using adaptive construction) with other compression techniques. Table 3

web-Google
coPapersCiteseer
indochina-2004
arabic-2005-hc
Non-Adaptive
Adaptive
Iteration
Adaptive Iteration
Figure 8: Cumulative compression per second for adaptive and non-adaptive biclique extraction on each dataset.
shows the bpe (bits per edge) for the biclique-based representation, bpe( ), and compares it with bpe( ), the baseline graph representation used for matrix multiplication by Arroyuelo et al. [7], as well as their -tree implementation, bpe( ). We also include bpe( ), the compression obtained by RePair32 [10], and bpe( ), the Webgraph framework [9].
As observed, Webgraph achieves the best compression, followed by -tree and RePair32. Those outperform our technique in space, by a large margin in many cases. Among the representations for which matrix multiplication is supported directly, however, our biclique compression substantially reduces
| Dataset | bpe() | bpe() | bpe() | bpe() | bpe() |
|---|---|---|---|---|---|
| web-Stanford | 76.68 | 23.21 | 26.37 | 20.00 | 19.74 |
| cnr-2000-hc | 73.62 | 17.88 | 3.49 | 13.46 | 2.89 |
| wikipedia-link-lmo | 65.41 | 11.83 | 2.87 | 3.64 | 1.42 |
| web-Google | 79.66 | 28.88 | 33.57 | 24.66 | 23.88 |
| coPapersCiteseer | 65.54 | 12.29 | 3.24 | 4.24 | 1.63 |
| indochina-2011 | 68.17 | 8.85 | 2.40 | 5.52 | 1.45 |
| arabic-2005 | 68.08 | 10.18 | 2.74 | 5.72 | 1.84 |
Table 3: Bits per edge comparison between different compression methods: bpe() corresponds to the baseline representation, bpe() to our technique, bpe() to the -tree, bpe() to RePair32, and bpe() to WebGraph.
the space of the baseline across all datasets, using 13%–36% of its space (even if we improved the space of the baseline by storing only the CSR part, we would use 26%–72% of its space). The -tree also supports matrix multiplication, but as we will see, it can be orders of magnitude slower than our biclique-based representation.
7.2. Matrix Multiplication using Bicliques only for Operations
This section studies the usage scenario where the matrices are still stored in CSR format, which is then the input and output format of the multiplication algorithm. Our biclique representation is used exclusively to speed up multiplications, not to compress. Therefore, finding the bicliques is part of the multiplication process (and so, the extraction cost is accounted for).
Because matrices in our dataset are of different sizes, we will measure the time to compute on individual matrices in order to evaluate performance of multiplications of the form . We measure all execution times
| Dataset | Our approach (s) | Baseline (s) | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| BicEx | Merge | to CSR | Total | |||||||
| web-Stanford | 4.80 | 0.04 | 0.16 | 0.03 | 0.04 | 0.17 | 0.47 | 0.85 | 6.56 | 1.27 |
| cnr-2000-hc | 2.34 | 0.03 | 0.19 | 0.01 | 0.03 | 0.09 | 0.12 | 0.76 | 3.57 | 1.34 |
| wikipedia-link-lmo | 2.70 | 0.02 | 0.66 | 0.02 | 0.05 | 0.20 | 0.01 | 0.46 | 4.12 | 9.52 |
| web-Google | 27.16 | 0.22 | 0.58 | 0.14 | 0.18 | 0.56 | 1.83 | 2.28 | 32.95 | 2.43 |
| coPapersCiteseer | 27.38 | 0.19 | 4.39 | 2.35 | 2.50 | 12.13 | 2.85 | 7.09 | 58.88 | 91.99 |
| indochina-2011 | 179.46 | 1.29 | 8.68 | 0.78 | 1.62 | 11.34 | 7.33 | 51.35 | 261.85 | 8982.77 |
| arabic-2005 | 883.90 | 4.89 | 44.29 | 3.53 | 7.55 | 45.43 | 36.62 | 220.08 | 1246.29 | 2175.63 |
Table 4: Matrix multiplication using only bicliques while preserving the CSR representation. Times are reported in seconds. The total execution time includes biclique extraction (once per matrix), a CSC conversion for matrix , the four multiplication operations, the merge step to obtain the representation, and a final step to convert the result into CSR format. The execution time of the Baseline is also reported.
as if we multiplied two different matrices, for example we do not exploit the fact that we only need to extract bicliques from one matrix.
Table 4 presents the execution time of our method with the different steps required to perform the multiplication. Column BicEx shows the execution time of the biclique extraction for the two matrices, which in practice we measured as counting twice the execution time on matrix . Next, we give the time required to build the CSC format from the CSR of the residual matrix , needed to compute . Then, we show the multiplication time used for each of the four components, the time required to merge the results into a biclique-based representation, and finally the time to convert that to CSR form. Column Total adds up all these times and can be compared to the final column, which shows the multiplication time with the Baseline.
The results show that our approach can be much faster than the Baseline, achieving speedups between and 1.75 and 34.3 on the larger datasets, while
| Dataset | Baseline | -tree | Our approach | |||||
|---|---|---|---|---|---|---|---|---|
| bpe | time(s) | bpe | time(s) | bpe | Mult(s) | BicEx2(s) | Total(s) | |
| web-Stanford | 65.47 | 1.27 | 20.45 | 283.44 | 7.92 | 1.76 | 6.05 | 7.81 |
| cnr-2000-hc | 64.96 | 1.34 | 2.61 | 6.63 | 5.86 | 1.23 | 6.60 | 7.83 |
| wikipedia-link-lmo | 64.26 | 9.52 | 3.73 | 24.30 | 9.73 | 1.42 | 7.91 | 9.33 |
| web-Google | 66.63 | 2.43 | 27.99 | 1199.00 | 12.47 | 5.79 | 14.49 | 20.28 |
| coPapersCiteseer | 64.19 | 91.99 | 3.17 | 324.62 | 8.31 | 31.50 | 113.85 | 145.35 |
| indochina-2011 | 64.43 | 8982.77 | 2.47 | 4519.20 | 5.74 | 82.39 | 488.15 | 570.54 |
| arabic-2005 | 64.32 | 2175.64 | 2.68 | 3579.26 | 6.16 | 362.39 | 2435.97 | 2798.36 |
Table 5: Space in bpe and multiplication time in seconds using our method with the format for both input and output, with recompression. Column Mult reports the total time to multiply the biclique-based representations and produce the result in CSR form, as presented in Table 4. Column BicEx2 gives the additional time to apply biclique extraction on the result, and column Total gives the total time. For comparison purposes, we also include the bpe and multiplication times of the Baseline and the -tree.
the Baseline is typically much faster on the smaller datasets. Our technique then has a clear impact on the hardest multiplications, which take minutes to hours, while it loses, less relevantly in absolute terms, on easy multiplications that take seconds. Our improvements on the performance of biclique extraction is key to make this process worthy, as its cost is compensated by a much faster multiplication.
7.3. Matrix Multiplication using the Biclique Representation
We now consider the second usage scenario, where bicliques are used to represent matrices using less space, and therefore the multiplication algorithm uses our biclique-based representation for both input and output. We do not then carry out biclique extraction on the input matrices, as they al-
| Dataset | |||
|---|---|---|---|
| web-Stanford | 2,312,497 | 20,811,442 | 429,584,958 |
| cnr-2000-hc | 3,216,152 | 34,174,066 | 683,240,962 |
| wikipedia-link-lmo | 3,623,678 | 19,997,655 | 549,950,901 |
| web-Google | 5,105,039 | 29,710,164 | 585,573,462 |
| coPapersCiteseer | 32,073,436 | 264,584,716 | 12,248,543,674 |
| indochina-2011 | 194,109,311 | 1,952,630,542 | - |
| arabic-2005 | 639,999,458 | 8,323,612,632 | - |
Table 6: Number of edges for the graph representing , , and .
ready come in this format, but we recompress the output matrix, finding its bicliques from the CSR output. We compare the resulting space and execution time of our approach with those of the Baseline and the -tree.
Table 5 shows that our approach with recompression provides a great compression improvement on the output compared to the Baseline, using 9%–19% of the space (and 18%–38% if we improved the Baseline to store only the CSR part). On the larger matrices, where time performance matters most, our technique is competitive with the Baseline, being only 30%–60% slower (and 16 times faster in one case). On the smaller matrices, we are slower by a factor of up to 8. Our technique is, instead, almost always faster than the -tree, by up to 59 times; the -tree is faster only on one small matrix, by 18%. On the other hand, the -tree output is generally smaller than our representation by a factor of 2.3–2.6, though the situation is reversed in a couple of datasets.
Comparing columns Mult and BicEx2, we note that the need to recom-
| Dataset | Baseline | Recompression | No Recompression | |||
|---|---|---|---|---|---|---|
| bpe | time(s) | bpe | time(s) | bpe | time(s) | |
| web-Stanford | 65.47 | 1.27 | 7.92 | 7.81 | 11.03 | 0.91 |
| cnr-2000-hc | 64.96 | 1.34 | 5.86 | 7.83 | 8.22 | 0.47 |
| wikipedia-link-lmo | 64.26 | 9.52 | 9.73 | 9.33 | 11.74 | 0.96 |
| web-Google | 66.63 | 2.43 | 12.47 | 20.28 | 17.06 | 3.51 |
| coPapersCiteseer | 64.19 | 91.99 | 8.31 | 145.35 | 7.99 | 24.41 |
| indochina-2011 | 64.43 | 8982.77 | 5.74 | 570.54 | 6.15 | 31.04 |
| arabic-2005 | 64.32 | 2175.64 | 6.16 | 2798.36 | 7.47 | 142.31 |
Table 7: Comparison of space (in bpe) and multiplication time (in seconds) with and without recompression. Column Recompression reports the space and execution time of our method when multiplication is followed by biclique extraction on the output. Column No Recompression shows the performance when the result is directly left in the format produced by our biclique-based multiplication algorithm, without recompressing.
press the output makes our biclique-based multiplication considerably slower. Table 6 explains why it is much more costly to extract bicliques on the output than it was on the input matrices: they tend to be considerably larger in our case (i.e., proportional to the number of paths of length 2 in the represented graph). This motivates a third scenario, where we take the bicliques output by the multiplication algorithm directly as the output representation, without recompression.
7.4. Matrix Multiplication with Bicliques and no Recompression
We finally evaluate the usage scenario where we directly use the bicliques output by the multiplication as the biclique-based representation of the output. This yields a much faster multiplication algorithm, as bicliques are never extracted. Instead, a new issue appears: the bicliques may degrade (i.e., more and smaller bicliques, a larger residual matrix) when applying a multiplication, compared to those obtained by recompression. We measure those aspects. We note that, still, we are free to apply recompression at any time when the quality of some representation is deemed to have degraded.
Table 7 shows the space and execution time comparing the multiplication with and without recompression. It can be observed that the compressed space degrades in most cases by 7%-40% when recompression is not applied (curiously, recompression slightly worsens the space in one case). In exchange, multiplication is much faster with no recompression, by a factor of up to 20. Compared to the Baseline, this alternative uses only 10%-26% of the space (or 20%-52% if we improved the Baseline space) and is almost always faster, by a factor of up to 289 (it is slower only in one case, by 44%).
Our final experiment aims to measure how the degradation in the quality of the bicliques may affect the time performance of future operations on the matrix. For this sake, we square matrices X and then square the resulting , to obtain . We do this with and without an intermediate recompression. In the first case, we recompress before squaring it again, with the hope that this effort is compensated by the biclique-based multiplication finding bigger bicliques.
Table 8 presents the space and execution times with both strategies. We also include the Baseline and the -tree. Column No recompression includes the two multiplication operations and the total. Column Recompression also includes the recompression for (but not for ). As observed, the two alternatives of our approach are faster than using the Baseline (by a factor up
| Dataset | Baseline (s) | -tree (s) | No recompression (s) | Recompression (s) | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| bpe | bpe | Total | bpe | BicEx2 | Total | bpe | |||||||
| web-Stanford | 81.78 | 64.07 | 8,898.64 | 12.65 | 0.91 | 22.74 | 23.65 | 9.00 | 1.76 | 6.05 | 7.38 | 15.19 | 4.93 |
| cnr-2000-hc | 198.85 | 64.05 | 455.96 | 1.70 | 0.47 | 28.96 | 29.43 | 5.82 | 1.23 | 6.60 | 6.75 | 14.58 | 3.56 |
| wikipedia-link-lmo | 335.09 | 64.01 | 1,008.50 | 2.41 | 0.96 | 79.49 | 80.45 | 16.45 | 1.42 | 7.91 | 45.00 | 54.33 | 14.57 |
| web-Google | 87.32 | 64.14 | 19,879.91 | 19.14 | 3.51 | 52.88 | 56.39 | 15.14 | 5.79 | 14.49 | 16.79 | 37.07 | 8.05 |
| coPapersCiteseer | 13,398.54 | 64.00 | 26,775.85 | 2.40 | 24.41 | 2,948.08 | 2,972.49 | 7.23 | 31.50 | 113.85 | 1,039.51 | 1,184.86 | 6.63 |
Table 8: Comparison of execution times (in seconds) and space for computing with and without intermediate recompression.
to 13.6) and -tree (by a factor up to 586). On the other hand, recompressing makes the whole process almost twice as fast as not recompressing it, that is, the intermediate recompression pays off. In terms of compression efficiency, our approach is many orders of magnitude more efficient than the Baseline in all matrices (by a factor over 55 in a couple of matrices), and even smaller than the -tree in a couple of them.
The outcome of this experiment is better understood when considering that matrices tend to become considerably denser when multiplied. Table 6 shows the total number of edges of the input matrix , in , and in . It can be seen that the number of edges increases by an order of magnitude each time we square the matrix. The table omits the two largest matrices, as we could not compute due to memory limitations. Further, the fact that we outperformed the Baseline in space by a much wider margin suggests that matrices that are products of others are much more compressible via bicliques, which is not so surprising in the light of Schoor's algorithm.
8. Conclusions
We have presented a biclique-based approach for compressing and multiplying Boolean matrices, aimed at reducing both space usage and computational cost in large-scale graph operations. By exploiting dense bipartite substructures, our representation encodes sets of edges implicitly while maintaining compatibility with algebraic operations.
In order to obtain large bicliques efficiently, we improved our previous biclique extraction process with a percentile-guided adaptive mechanism that dynamically tunes its parameters based on the degree distribution of the input graph. This optimization significantly improved compression efficiency and reduced extraction time compared to our previous implementation.
On our representation, we extended the Schoor algorithm [6] used by Arroyuelo et al. [7], so as to operate directly on biclique-encoded matrices, decomposing the product into four subcomponents—matrix-matrix, matrix-biclique, biclique-matrix, and biclique-biclique multiplications. The compositional nature of this formulation allows the result to be represented as a new set of bicliques, thereby operating always on the compressed domain.
Experimental results on web and social graphs demonstrated that our method achieves up to 290 times faster multiplication while using up to 10 times less space than Arroyuelo et al.'s CSR/CSC representation. The biclique representation shows to provide even better compression on the matrices resulting from multiplications, and provides a promising foundation for scalable algebraic computations on massive sparse graphs.
Future work includes exploring parallel and GPU implementations of the biclique-based multiplication, integrating the method with graph query en-gines, and extending the model to weighted and dynamic graphs where biclique structures evolve over time. We also plan to explore whether transitive closure algorithms implemented on CSR/CSC [7] can be accelerated with the biclique-based representation, in order to complete a full Boolean algebra.
Acknowledgements
CH was funded by ANID Fondecyt Grant 11240971; GN was funded by ANID – Millennium Science Initiative Program – Code ICN17_002, and Fondecyt Grant 1-230755, ANID, Chile.
References
[1] J. Wu, Social Network Computing, 2025.
[2] A. Hogan, E. Blomqvist, M. Cochez, C. d'Amato, G. de Melo, C. Gutiérrez, S. Kirrane, J. L. Gayo, R. Navigli, S. Neumaier, A. N. Ngomo, A. Polleres, S. M. Rashid, A. Rula, L. Schmelzeisen, J. Sequeda, S. Staab, A. Zimmermann, Knowledge Graphs, Synthesis Lectures on Data, Semantics, and Knowledge, Morgan & Claypool Publishers, 2021.
[3] A. Hogan, The Web of Data, Springer, 2020.
[4] A. K. Watson, R. Lannes, J. S. Pathmanathan, R. Méheust, S. Karkar, P. Colson, E. Corel, P. Lopez, E. Bapteste, The methodology behind network thinking: graphs to analyze microbial complexity and evolution, Evolutionary genomics: Statistical and computational methods (2019) 271–308.
[5] T. Etzion, Sequences and the de Bruijn Graph: Properties, Constructions, and Applications, 2024.
[6] A. Schoor, Fast algorithm for sparse matrix multiplication, Information Processing Letters (1982) 87–89.
[7] D. Arroyuelo, A. Gómez-Brandón, G. Navarro, Evaluating regular path queries on compressed adjacency matrices, The VLDB Journal 34 (1) (2025) 2.
[8] N. Brisaboa, S. Ladra, G. Navarro, Compact representation of web graphs with extended functionality, Information Systems 39 (1) (2014) 152–174.
[9] P. Boldi, S. Vigna, The webgraph framework i: compression techniques, in: Proceedings of the 13th international conference on World Wide Web, 2004, pp. 595–602.
[10] P. Ferragina, G. Manzini, T. Gagie, D. Koppl, G. Navarro, M. Striani, F. Tosoni, et al., Improving matrix-vector multiplication via lossless grammar-compressed matrices, Proceedings of the VLDB Endowment 15 (10) (2022) 2175–2187.
[11] C. Hernández, G. Navarro, Compressed representations for web and social graphs, Knowledge and information systems (2014) 279–313.
[12] F. Glaria, C. Hernández, S. Ladra, G. Navarro, L. Salinas, Compact structure for sparse undirected graphs based on a clique graph partition, Information Sciences (2021) 485–499.
[13] A. P. Francisco, T. Gagie, D. Köppl, S. Ladra, G. Navarro, Graph compression for adjacency-matrix multiplication, SN Computer Science (2022) 193.
[14] A. Pinar, M. T. Heath, Improving performance of sparse matrix-vector multiplication, in: Proceedings of the 1999 ACM/IEEE conference on Supercomputing, 1999.
[15] N. J. Larsson, A. Moffat, Off-line dictionary-based compression, Proceedings of the IEEE 88 (11) (2000) 1722–1732.
[16] M. Nelson, S. Radhakrishnan, A. Chatterjee, C. N. Sekharan, Queryable compression on streaming social networks, in: 2017 IEEE International Conference on Big Data (Big Data), IEEE, 2017, pp. 988–993.
[17] M. Nelson, S. Radhakrishnan, C. N. Sekharan, Billion-scale matrix compression and multiplication with implications in data mining, in: 2019 IEEE 20th International Conference on Information Reuse and Integration for Data Science (IRI), IEEE, 2019, pp. 395–402.
[18] A. Z. Broder, M. Charikar, A. M. Frieze, M. Mitzenmacher, Min-wise independent permutations, in: Proceedings of the thirtieth annual ACM symposium on Theory of computing, 1998, pp. 327–336.
[19] P. Boldi, M. Rosa, M. Santini, S. Vigna, Layered label propagation: A multiresolution coordinate-free ordering for compressing social networks, in: S. Srinivasan, K. Ramamritham, A. Kumar, M. P. Ravindra, E. Bertino, R. Kumar (Eds.), Proceedings of the 20th international conference on World Wide Web, ACM Press, 2011, pp. 587–596.
[20] J. Leskovec, A. Krevl, SNAP Datasets: Stanford large network dataset collection, http://snap.stanford.edu/data (Jun. 2014).
[21] R. A. Rossi, N. K. Ahmed, The network data repository with interactive graph analytics and visualization, in: AAAI, 2015. URL https://networkrepository.com