원시데이터 수집 시스템
선정목록으로

Toward Greener Matrix Operations by Lossless Compressed Formats

관련 수소연료전지 · (5) 연료전지용 수분제어장치(가습기)

기본 정보

저자
  1. Francesco Tosoni — Computer Science Department, University of Pisa, Pisa, Italy|||Computer Science Department, University of Pisa, Polo Fibonacci, Building C, 3rd floor, L.go B. Pontecorvo 3, Pisa, PI, Italy
  2. Philip Bille — DTU Compute, Technical University of Denmark, Kongens Lyngby, Denmark|||DTU Compute, Technical University of Denmark, DK-2800 Kgs., Lyngby, Denmark
  3. Valerio Brunacci — Engineering Department, University of Perugia, Perugia, Italy|||Engineering Department, University of Perugia, Via G. Duranti 93, Perugia, PG, Italy
  4. Alessio De Angelis — Engineering Department, University of Perugia, Perugia, Italy|||Engineering Department, University of Perugia, Via G. Duranti 93, Perugia, PG, Italy
  5. Paolo Ferragina — Computer Science Department, University of Pisa, Pisa, Italy|||Computer Science Department, University of Pisa, Polo Fibonacci, Building C, 3rd floor, L.go B. Pontecorvo 3, Pisa, PI, Italy
  6. Giovanni Manzini — Computer Science Department, University of Pisa, Pisa, Italy|||Computer Science Department, University of Pisa, Polo Fibonacci, Building C, 3rd floor, L.go B. Pontecorvo 3, Pisa, PI, Italy
DOI
10.1109/access.2025.3555119
저널
IEEE Access
발행년도
2025
발행기관
Institute of Electrical and Electronics Engineers
피인용수
1
라이선스
cc-by
논문 유형
–
언어
–
원문 페이지
https://doi.org/10.1109/access.2025.3555119
토픽
Color Science and Applications
OpenAlex ID
W4408859510

평가 내용

관련도
관련
사업분야
수소연료전지 · (5) 연료전지용 수분제어장치(가습기)
부 분야
–
R&D 측면
–
확신도
–
근거 용어
–
판단 근거
임베딩 유사도 기반 평가로 '수소연료전지 > 연료전지용 수분제어장치(가습기)' 분야에 선정된 논문입니다.
R&D 활용 포인트
–
평가 입력
–

초록

Sparse matrix-vector multiplication (SpMV) is a fundamental operation in machine learning, scientific computing, and graph algorithms. In this paper, we investigate the space, time, and energy efficiency of SpMV using various compressed formats for large sparse matrices, focusing specifically on Boolean matrices and real-valued vectors. Through extensive analysis and experimentation on server and edge devices, we observed that different matrix compression formats entail distinct trade-offs among space efficiency, execution time, and energy consumption. Notably, selecting the appropriate compressed format can reduce energy consumption by an order of magnitude on both servers and single-board computers. Moreover, our experiments reveal that while data parallelism can improve execution speed and energy efficiency, optimizing both simultaneously poses interesting challenges. Specifically, we demonstrate that for certain compression schemes, the optimal degree of parallelism for minimizing execution time does not coincide with that for energy efficiency. This finding aligns with recent results in the literature, thus challenging the prevailing assumption of a straightforward linear correlation between execution time and energy usage. Overall, our findings advocate for software engineers to adopt compressed data structures as important instruments in the development of more energy-efficient software components, extending beyond SpMV.

본문 97,287자

본문 펼치기
## Toward Greener Matrix Operations by Lossless Compressed Formats FRANCESCO TOSONI <sup>1</sup>, PHILIP BILLE <sup>2</sup>, VALERIO BRUNACCI <sup>3</sup> ALESSIO DE ANGELIS <sup>3</sup>, PAOLO FERRAGINA <sup>4</sup>, GIOVANNI MANZINI <sup>1</sup>, 1Computer Science Department, University of Pisa, Polo Fibonacci, Building C, 3rd floor, L.go B. Pontecorvo 3, 56127 Pisa PI, Italy (e-mail: francesco.tosoni@di.unipi.it, giovanni.manzini@unipi.it) 2DTU Compute, Technical University of Denmark, DK-2800 Kgs. Lyngby, Denmark, (e-mail: phbi@dtu.dk) 3Engineering Department, University of Perugia, Via G. Duranti 93, 06125 Perugia PG, Italy (e-mail: alessio.deangelis@unipg.it, valerio.brunacci@dottorandi.unipg.it) 4EMbeDS Department, Sant’Anna School of Advanced Studies, Piazza Martiri della Libertà 33, 56127 Pisa PI, Italy (e-mail: paolo.ferragina@santannapisa.it) Corresponding author: Francesco Tosoni (e-mail: francesco.tosoni@di.unipi.it). This work was supported by the European Union – Horizon 2020 Program under the scheme ‘‘INFRAIA-01-2018-2019 – Integrating Activities for Advanced Communities’’, Grant Agreement n. 871042, ‘‘SoBigData++: European Integrated Infrastructure for Social Mining and Big Data Analytics’’, by the NextGenerationEU – National Recovery and Resilience Plan (Piano Nazionale di Ripresa e Resilienza, PNRR) – Project: ‘‘SoBigData.it - Strengthening the Italian RI for Social Mining and Big Data Analytics’’ – Prot. IR0000013 – Avviso n. 3264 del 28/12/2021, by the spoke ‘‘FutureHPC & BigData’’ of the ICSC – Centro Nazionale di Ricerca in High-Performance Computing, Big Data and Quantum Computing funded by European Union – NextGenerationEU – PNRR, by the Independent Research Fund Denmark, DFF-9131-00069B). ABSTRACT Sparse matrix-vector multiplication (SpMV) is a fundamental operation in machine learning, scientific computing, and graph algorithms. In this paper, we investigate the space, time, and energy efficiency of SpMV using various compressed formats for large sparse matrices, focusing specifically on Boolean matrices and real-valued vectors. Through extensive analysis and experiments conducted on server and edge devices, we found that different matrix compression formats offer distinct trade-offs among space usage, execution time, and energy consumption. Notably, by employing the appropriate compressed format, we can reduce energy consumption by an order of magnitude on both server and single-board computers. Furthermore, our experiments indicate that while data parallelism can enhance execution speed and energy efficiency, achieving simultaneous time and energy efficiency presents partially distinct challenges. Specifically, we show that for certain compression schemes, the optimal degree of parallelism for time does not align with that for energy, thereby challenging prevailing assumptions about a straightforward linear correlation between execution time and energy consumption. Our results have significant implications for software engineers in all domains where SpMV operations are prevalent. They also suggest that similar studies exploring the trade-offs between time, space, and energy for other compressed data structures can substantially contribute to designing more energy-efficient software components. INDEX TERMS green computing, lossless compression techniques, compressed matrix formats, matrix-tovector multiplications, computation-friendly compression, PageRank I. INTRODUCTION HE emergence of Machine Learning (ML) and, in particular, Deep Learning algorithms has brought about # T significant advancements in computer vision (e.g., image classification [1], [2]), natural language processing (e.g., text classification [3]–[5]), speech recognition, information retrieval, and more. These advancements have led to increased network complexity, more parameters, greater demands for training resources, and longer prediction latency. Moreover, with the generation of vast amounts of data that exceed Moore’s Law [6], [7], the storage and processing of this data for data science applications have become critical concerns. This is particularly evident in the context of Graph Databases (GraphDBs) [8], [9], which are emerging as the primary software architecture for applications requiring interconnected data modeling (i.e., data represented as graphs) <sup>1</sup> . Graphs are essential for network analytics and are increasingly vital in the context of large language models (LLMs) due to the advent of Retrieval-Augmented Generation, which enhances LLMs through the effective use of knowledge graphs [11]–[14]. Efficiently storing and processing large graphs in terms of time and space remains a signif 1The global Graph Database market was valued at $2.33 billion in 2023 and is projected to reach $14.58 billion by 2032 [10] icant challenge. For this reason, sustainability-oriented practices that leverage industrial big data to influence product innovation are gaining importance; the use of industrial big data mediates the relationship between sustainability orientation and product innovation [15]. Furthermore, Green Computing and Green Software Engineering have emerged as responses to sustainability challenges, prompting a paradigm shift that integrates and partially deviates from traditional design, use, and management of computer hardware and software. Recent studies [16] estimate that the ICT sector currently accounts for 2.1-3.9% of global greenhouse gas (GHG) emissions. Machine learning significantly contributes to these emissions [17]. Energy waste does not affect only data centers, but also small edge and IoT devices that rely on battery life as a critical requirement [18], [19]. Hence, the growing awareness of energy consumption has sparked interest in green computing in the context of AI-enabled IoT infrastructures (AIoT) too. By ‘‘greening data structures and algorithms,’’ software engineers aim to reduce resource utilization, minimize power consumption, and extend battery life through improved algorithm design. However, [20] observes that programmers often lack experience with software-induced energy consumption, though they increasingly need to consider it a primary constraint when designing their software. In this paper, we draw attention to space–time efficient and low-carbon footprint representations of large matrices on server machines and resource-constrained devices, such as single-board computers. This problem poses scalability challenges for storage, operation, and bandwidth, both in serverclient transmissions and local computations. For example, in ML applications although training costs can be one-time, or even free with pre-trained models, deploying and running their inference capabilities over an extended period often results in expensive matrix-based computations for clientside RAM and CPU of edge and IoT devices. Compressed data structures provide a natural solution to mitigate storage occupancy while enabling efficient data transmission and offering opportunities for faster processing. Indeed, computation-friendly compressed representations [21] allow for indexing, querying, processing, and manipulating data directly in their compressed format without requiring any prior decompression, thereby saving memory usage and speeding up computations at run time. However, despite the critical role of matrix-to-vector computations in scientific computing, efficient machine learning inference, graph analysis, and more, to our knowledge, the only study that examines the actual impact of compressed data structures on energy consumption is that of FuentesSepúlveda and Ladra [19], which focuses on compact integer representations. Given the above discussion, we believe that an analysis of compressed matrix representations from a green viewpoint may provide software engineers with a practical guide that can allow them to select the most energyefficient matrix format based on the time and space constraints of their problem. As a side outcome, with our paper, 2 we aim to advance the knowledge of the relationship between lossless compression and energy consumption. II. OUR CONTRIBUTION In this paper, we focus specifically on the space, time, and energy efficiency of matrix-to-vector multiplications using well-known compressed formats for large sparse binary matrices. Sparse matrix-vector multiplication (SpMV) is central to scientific computing applications, as it underpins the solution of sparse linear systems and sparse eigenvalue problems through iterative methods. Additionally, SpMV is essential for graph-analysis algorithms such as PageRank and centrality algorithms and is relevant for inference in binary machine learning models. The primary research questions we address in this paper are as follows: Q1 For matrix-vector multiplication, does compression lead to savings in space, time, and energy? Q2 Are time-optimized matrix formats the most energy efficient, and vice versa? Q3 In the context of matrix-vector multiplications, which runtime metrics (such as CPU cycles, number of instructions, and completion time) most significantly impact energy efficiency? In this study, we focus on the problem of efficient matrixto-vector multiplications, specifically when the matrix is sparse and Boolean, while the vector is real-valued. Computing the product of a binary adjacency matrix from a large graph with a real-valued vector is a crucial operation in various graph analytics tasks. Among these tasks, we consider the computation of the well-known PageRank score, which assesses the relevance of a Web page (see Section IV). This score has applications beyond the Web domain, and there are extensive datasets available for evaluating performance in real-world scenarios. We believe that the findings presented in this article will be of interest not only to the Network Analytics community but also to software engineers seeking efficient vector multiplications over binary and ternary matrices like the ones that occur in highly quantized large language models (LLMs). Indeed, binary and ternary LLMs [22]–[24] offer a favorable trade-off between space and accuracy, and can benefit from compressed binary matrix formats by deploying two matrices to represent the two non-zero values of the quantization. This would be particularly interesting in federated learning [25] because it would enable utilizing resource-constrained nodes such as smartphones or IoT devices, where battery life is a critical concern [26]. Further, the inference and training stages of Graph Neural Networks (GNNs) are often dominated by the time required to compute lengthy sequences of matrix multiplications involving the sparse graph adjacency matrix and its embeddings. Motivated by this challenge, the authors of [27] recently published preliminary results showcasing efficient matrix multiplication kernels based on new compressed formats for binary matrices. However, their work remains largely in the early stages, and its scalability has yet to be validated, as the authors tested their results solely on adjacency matrices derived from networks of scientific co-authors and citations, which are relatively small in scale. The largest graph they evaluated contains only 540,486 nodes. In contrast, this paper considers matrix formats capable of processing datasets with millions of nodes, even on resource-constrained devices like Raspberry Pis (for instance, our dataset indochina-2004 has 7,414,866 vertices). From a technical perspective, we address the problem of compressing Boolean sparse matrices for subsequent fast matrix-to-vector multiplications by extending the results in [28] by experimentally analyzing three distinct matrixcompression formats: the grammar-based methods described in [29], the _k_ <sup>2</sup> -tree [30], and Zuckerli [31], which is an enhanced version of WebGraph [32]. The appeal of these formats stems from their ability to achieve significant space reduction on disk by exploiting data patterns beyond mere sparsity, while also ensuring that time performance scales with the size of the compressed matrix representation. It is important to note that dense formats requiring quadratic space would impose prohibitive space and time demands, even for matrices containing millions of nodes. In this paper, we have adapted each compression format to support matrix-to-vector multiplication across multiple threads. For each dataset, we measured the running time and energy consumption of the matrix-to-vector multiplications by executing the PageRank algorithm [33]. We conducted our tests on two platforms: a multi-core Intel® Xeon® server utilizing up to 48 threads, with energy performance assessed via Intel RAPL [34], and a resource-constrained edge device (Raspberry Pi) using up to 8 threads, measuring energy consumption with a benchtop power meter. We summarize the main contributions of our paper as follows (additional details and contributions are provided in the next sections): _•_ We provide an implementation of a multithread matrixto-vector multiplication algorithm based on the recently introduced Zuckerli compression format which is a tool improving the WebGraph algorithm in terms of compression ratios, yet providing a resource usage for decompression comparable to WebGraph. _•_ Compared to [28], we evaluate a more recent and larger set of _computation-friendly_ matrix representations. Additionally, we assess the impact of compression on energy consumption, testing not only single-threaded versions as in [28] but also multi-thread implementations. _•_ Our analysis involves collecting metrics and comparing results on two different platforms: a multi-core Intel® Xeon® Gold machine and a single-board Raspberry Pi 4. For the Intel® Xeon®, we use the Intel RAPL software profiler to gather metrics, while for the Raspberry Pi 4, we utilize a power meter. _•_ We examine the energy performance of the PageRank algorithm on both platforms and find that a careful selec tion of the lossless compression format for the involved matrices can consistently yield energy savings of 1 to 2 orders of magnitude across all tested datasets and both platforms. _•_ Concerning question Q1, we observe that although Zuckerli and the _k_ <sup>2</sup> -tree are more space-efficient, they are generally slower and typically consume about an order of magnitude more energy than the grammar-based solutions presented in [29]. _•_ As for question Q2, we found that the simple model in which energy consumption grows linearly with completion time is not always accurate. Indeed, we plotted running time and energy consumption in terms of the number of threads and found that in some instances the optimal degree of parallelism for energy efficiency is lower than that for time efficiency, suggesting that it is more difficult to scale energy than to scale time. Hence, in some scenarios, software engineers should consider suboptimal time performance to attain energy-optimal executions, as our results suggest that slightly slower algorithms may result in greater energy savings. _•_ Regarding question Q3, our results indicate that the number of L1 and L3 cache operations is critical for time and energy efficiency in data compression algorithms. Poor utilization of the cache hierarchy can degrade instruction-per-clock-cycle throughput, resulting in increased latencies and energy inefficiencies. The remainder of the paper is structured as follows. In Section III we discuss related works. In Section IV we describe the PageRank algorithm and how we implemented it in our experiments. In Section V we discuss compressed matrix representations and we justify the choice we made for our experiments. Section VI describes our experimental setup, and Section VII illustrates and discusses the results of our experiments. Section VIII summarizes the lessons learned from our analysis and outlines suggestions for future work. III. RELATED WORK _A._ _GREEN SOFTWARE ENGINEERING_ As energy has become a leading design constraint for computing devices, hardware engineers and system designers are exploring new models and directions to reduce the energy consumption of their products. However, with green software engineering still in its infancy, most of the efforts in this field have been devoted to hardware-related issues (see, e.g., [35]), with little to no attention on green software [19], [36]. The work of [36] advocates for energy management as a guiding principle in application coding and algorithm design, demonstrating that energy-aware hardware and software can reduce energy consumption in legacy applications. They show that increased parallelism not only decreases running time but also reduces energy usage. Their study explores various algorithmic patterns in energy-efficient design, revealing that some patterns yield greater savings; for example, they emphasize the critical importance of parallelizing reads over writes. 3 The success of ChatGPT has further popularized ML algorithms, resulting in environmental consequences and rising financial expenses [37]. The GPT-3 model, with its 175 billion parameters, exemplifies this problem, as each training iteration costs millions of dollars [3], not to mention the computational costs associated with experimenting with different hyperparameters. Similarly, a 2023 estimate [38] from OpenAI’s CEO placed the training cost for GPT-4 at approximately 100 million dollars, indicating that the future of AI necessitates innovative and more sustainable approaches. [39] argued that the definition of Green Software in literature is rather fuzzy and chaotic, as one can find different terms such as green software, green by software, green in software, and the like. While ‘‘green by’’ solutions entail IT as a tool to meet sustainability criteria, ‘‘green in’’ techniques concentrate on software and hardware themselves. Green software refers to software for which energy performance can be measured and that promotes energy and resource savings compared to traditional, unoptimized software [40]. These energy-related algorithmic optimizations, under the more favorable scenarios, can also reduce the application time and space requirements, thereby improving user experience; or, at least, they attempt to minimize compromise to service. Oversimplified models for energy complexity, such as the one proposed by [41], expressed as _T_ + ( _PB_ ) _· I_ (where _T_ is the completion time, _I_ is the number of parallel I/Os, _P_ is the number of memory banks, and _B_ is the block size), measure energy consumption asymptotically but fail to capture the constants that reflect the dynamics of real-world machine architectures [36]. [42] has recently surveyed the experiences and beliefs of IT engineers and practitioners regarding current best practices in architecting for sustainability. They concluded that researchers and practitioners view business motivations and short-term thinking as significant obstacles to genuine sustainability implementation. Both groups also agree that key challenges include a lack of consensus on the importance of sustainability and an absence of knowledge regarding concrete measures that can be taken. Further, [43] has suggested that power-oriented source code optimizations often do not justify the average programmer’s time investment. While source-level power tuning may be effective for tiny embedded programs, it frequently proves challenging for larger production software. To address the lack of a reference model for assessing software sustainability and the absence of consensus on measurement setups, methods, and techniques for energy data analysis, [40] has published a reference model this year called the Green Software Measurement Model (GSMM) along with a glossary based on the ontology presented by [44]. This model, which encapsulates a decade of research by groups from four countries, encourages further contributions from researchers and practitioners within the (Green) Software Engineering community. The proposed model emphasizes the significance of power meter devices and advanced software profilers like 4 Intel RAPL for accurate energy profiling estimations. It also underscores the importance of carefully selecting metrics—including CPU and GPU usage, duration, mean power draw, energy consumption, and network traffic—to develop a comprehensive model for profiling an application’s energy usage. Measuring software-induced energy and resource consumption is essential for assessing and mitigating the environmental impact of software. Notable frameworks for measuring energy consumption include the Software Energy and Resource Efficiency Analysis (SERENA), developed at Umwelt-Campus Birkenfeld and based on the work of [45]; the Green Software Measurement Process (GSMP) [46]; the Sustainability Assessment Framework (SAF) Toolkit <sup>2</sup> ; the Green Metrics Tool <sup>3</sup> ; the Cloud Energy Usage Estimation Model based on the research of [47]; the Software Footprint <sup>4</sup> ; the Emission Estimation Framework from the Sustainable Digital Infrastructure Alliance (SDIA) based on [48]; and the Container Overhead Measurement Methodology introduced in [49]. We refer readers to the survey by [40] for a thorough description of these models and their respective application areas. Notwithstanding these substantial advancements, the pioneering work of [19] on green compacted data structures argues that among the previous work related to energy efficiency, there is little research within the core area of Algorithmics, with many contributions such as [50], [51] focussing on energy-saving mechanisms based on speed scaling or powerdown mechanisms, where a machine is scheduled to switch between a set of active states (standby, suspend, sleep, fulloff), each with its consumption rate. The increasing size of large language models (LLMs) has posed challenges for deployment and raised concerns about their environmental impact due to high energy consumption. Recent proposals, such as Bitnet [52], aim to introduce a 1bit Transformer architecture specifically designed for LLMs, which can greatly benefit from compact binary formats and optimizations for space, time, and energy in sparse matrixvector (SpMV) computations. Additionally, LLMs quantized to three values (-1, 0, +1), as demonstrated in [22], can also leverage efficient binary matrix formats and SpMV techniques. Ternary matrices can be represented using two distinct binary formats: one for the -1 values and another for the +1 values. The use of binary or ternary formats, as opposed to real-valued ones, allows the replacement of multiplications over FP32 with summations and subtractions between FP32, which are faster in modern computer architectures [24], [53]. In this paper, we address the challenge of energy conservation from the perspective of green algorithm engineering, focussing on the design of energy-efficient algorithms that minimize energy consumption. 2https://github _._ [com/S2-group/SAF-Toolkit](https://github.com/S2-group/SAF-Toolkit) 3https://github _._ [com/green-coding-solutions/green-metrics-tool](https://github.com/green-coding-solutions/green-metrics-tool) 4https://www _._ oeko _._ [de/blog/energieverbrauch-von-software-eine-](https://www.oeko.de/blog/energieverbrauch-von-software-eine-anleitung-zum-selbermessen/) [anleitung-zum-selbermessen/](https://www.oeko.de/blog/energieverbrauch-von-software-eine-anleitung-zum-selbermessen/) _B._ _PARALLEL PROGRAMMING_ It is well-known that parallel programming has great potential for effectively reducing power consumption. Most modern computer systems are based on CMOS (Complementary Metal-Oxide Semiconductor) technology, whose dynamic power consumption varies proportionally to the cube of the voltage. Let’s assume a certain software achieves a 1 _._ 5 _×_ speedup using two cores. A software engineer can exploit this speedup to reduce latency or power [54, §2.5.3]. Assuming the latency requirement is already met, reducing the clock rate by 1 _._ 5 _×_ can save significant energy. Denoting the energy consumption of the single-threaded application as _P_ 1 and the data-parallel one as _P_ 2, the following relation holds convergence reasons, PageRank introduces the _teleport_ step: When reaching a vertex, the random walker selects with some fixed probability (say 0 _<_ _α_ _<_ 1) whether it has to continue by traversing a graph edge or jump to a random vertex in the graph. In their original paper [33] Brin and Page suggest setting _α_ = 0 _._ 15. With the above notation, the PageRank vector giving the relevance of each page is computed by the unique limit of the sequence [56] _πt_ = _α ·⃗π_ 0 + (1 _−_ _α_ ) _·⃗πt−_ 1 _· M_ (2) In [33], the initial probability distribution _⃗π_ 0 is set to _⃗_ 1 _/n_ ; however, it can be any non-zero vector and still guarantee convergence to the same PageRank vector. _A._ _IMPLEMENTATION DETAILS_ In PageRank implementations, the iteration 2 is repeated until the difference between two consecutive estimates _|⃗πt −⃗πt−_ 1 _|_ goes below an assigned threshold. The convergence of the method is guaranteed by the mathematical properties of the iteration matrix. In practice, we do not explicitly build the matrix _M_ = _D_ <sup>_−_</sup> <sup>1</sup> _A_ but, instead, we operate with the adjacency matrix _A_ of the input graph. The diagonal matrix _D_ is represented by an array _O_ [1 _, n_ ], where the entry _O_ [ _u_ ] represents the out-degree _du_ of vertex _u_ . Formula 2 involves left products, but since most compressed matrix representations are row-oriented, meaning they represent matrices in row-major order, it is a standard practice [28] to transpose formula 2 so that the left matrixvector product becomes a right product involving _M_ <sup>_t_</sup> = _A_ <sup>_t_</sup> _D_ <sup>_−_</sup> <sup>1</sup> . Note that matrix. - _D_ <sup>_−_</sup> <sup>1�</sup> <sup>_t_</sup> = _D_ <sup>_−_</sup> <sup>1</sup>, since _D_ is a diagonal V. COMPRESSED MATRIX REPRESENTATIONS _A._ _WEBGRAPH AND ZUCKERLI_ Many (binary) graphs extracted from the Web contain redundancies and dependencies that can be exploited by proper compression tools to reduce the storage size of these graphs. The first ad-hoc compression method for Web-related graphs, WebGraph [32], was proposed over 20 years ago. It effectively compresses adjacency lists by leveraging the similarities between lists of close-by vertices within a graph. As an example, Web pages within the same domain often share outgoing links to a common set of destination pages. Therefore, such common links can be represented once in a list from which subsequent lists can be copied. WebGraph exploits this copying property to compress each adjacency list based on a reference list. Although it was originally implemented in Java, it has since been translated into C++ [57]; lately, WebGraphs’s original authors also published a Rust implementation [58]. Zuckerli [31] is a more recent compression method for Web graphs that applies advanced compression techniques and novel heuristics on top of WebGraph, further improving its compression. Zuckerli provides both a compressed representation based on the Asymmetrical Numeral Systems 5 _≈_ 0 _._ 6 _P_ 1 (1) �3 _P_ 2 = 2 1 _._ 5 - <u>1</u> where the factor of 2 is due to having two cores. Another common strategy to save energy with parallel computing is to complete the computation as quickly as possible, allowing all threads to be put into a low-power _sleep_ _mode_, which consumes much less energy [54, §2.5.3]. The authors of [43] show that idle or sleep states can yield up to 19% energy savings and can be easily combined with other energy-saving approaches, also suggesting that increasing parallelization from 1 to 16 threads can save energy for many applications, even the poorly scaling ones. This result is particularly critical for mobile devices, where parallelism can reduce the time the device is powered on (display and other components), yielding a better user experience and reduced energy consumption. To exploit the potential of parallel computing in green algorithm engineering, we implement and test data-parallel versions of all our code; cf. Section VI-E. IV. THE PAGERANK ALGORITHM We selected the PageRank algorithm [55, §21.2] as an example of an important algorithm involving a sparse and usually highly compressible matrix. The PageRank algorithm was first used by Google’s search engine to evaluate the relevance of Web pages, modeled as vertices in a Web graph. Given a directed graph _G_ = ( _V_ _, E_ ) modeling the Web with _n_ = _|V_ _|_ vertices (pages) and _m_ = _|E|_ edges (links), let _A_ be its adjacency matrix, where _Auv_ = 1 if and only if there is a link from vertex _u_ to vertex _v_ ; _Auv_ = 0 otherwise. The normalized adjacency matrix _M_ is defined as _M_ = _D_ <sup>_−_</sup> <sup>1</sup> _· A_, where _D_ is a diagonal matrix whose diagonal elements _du_ = _v_ <sup>_Auv_</sup> <sup>contain the out-degree of each vertex</sup> <sup>_u_</sup> <sup>.</sup> <sup>_M_</sup> <sup>is the so-</sup> called random-walk matrix, where a random walker at vertex _u_ jumps to a neighbor _v_ of _u_ with probability 1 _/du_ . The graph _G_ may have dangling vertices, namely vertices having no outward edges. To avoid a random walker getting stuck in such vertices, PageRank adds all possible outward edges to all graph vertices. This is equivalent to substituting all empty rows of _M_ with the vector _⃗_ 1 _/n_ . This modification ensures that _M_ is a _stochastic matrix_, meaning that for each _j_ =1 <sup>_Mij_</sup> <sup>=</sup> <sup>1.</sup> <sup>Moreover,</sup> <sup>for</sup> matrix row _i_, it holds that <sup>�</sup> <sup>_n_</sup> (ANS) [59] encoding for storage and one based on Huffman encoding [60, §12.1] [61, §16.3], allowing fast direct access to the individual adjacency lists of the compressed graph without decompressing it in its entirety. The authors of [28] observed that these graph representations provide a computation-friendly framework for efficient right matrix-to-vector multiplications. The main idea is to exploit the copy-property of adjacency lists between vertex _vi_ and its reference _vri_ so that it is easy to evaluate _vi_ _· x_ by simply copying the result ofcontributions of the differences _vri_ _· x_ betweenand then summing up thethe adjacency lists of _vi_ and _vri_ . We build upon this idea to carry out matrix-tovector multiplications on top of Zuckerli-compressed matri[ces. We used the code from Google’s GitHub repository https:](https://github.com/google/zuckerli) //github _._ [com/google/zuckerli and Zuckerli’s default compres-](https://github.com/google/zuckerli) sion settings. _B._ _K2-TREE_ The _k_ <sup>2</sup> -tree [30] [21, §9.2.1] is a compact data structure designed to compress adjacency matrices of size _n_ <sup>2</sup>, by exploiting the sparsity and clustering of 1’s. The data structure underneath the _k_ <sup>2</sup> -tree is a _k_ <sup>2</sup> -ary tree where each vertex represents a submatrix of the adjacency matrix. For simplicity, the size is zero-padded to the next power of _k_ <sup>2</sup> . The tree root represents the whole matrix and each of its children represents a submatrix of size _n_ <sup>2</sup> _/k_ <sup>2</sup> . If a submatrix is empty (i.e., it contains only 0’s), the corresponding vertex is represented by a bit set to 0. In all other cases, the corresponding vertex is represented by a bit set to 1. Once the first level is built, the procedure continues recursively only into the submatrices with 1’s, by splitting each of them into _k_ <sup>2</sup> smaller submatrices. Thus, the height of a _k_ <sup>2</sup> -tree is always 1 + log _k n_, independently of the specific distribution of 1’s and 0’s within the input matrix; the access to a single cell costs _O_ (log _k n_ ). Note that a submatrix is not split further when full of 0’s. Figure 1 depicts the _k_ <sup>2</sup> -tree ( _k_ = 2) for a 8 _×_ 8 binary matrix. The arrows in the figure are included just for the sake of presentation, but the actual implementation of the _k_ <sup>2</sup> -tree is pointer-free because it consists of a mere sequence of bits. The _k_ <sup>2</sup> -tree represents the submatrices in row-major order; lower levels of the _k_ <sup>2</sup> -tree correspond to smaller submatrices, with the root representing the original matrix and the leaves representing single cells. Recently, [62], [63] have shown that the _k_ <sup>2</sup> -tree allows for carrying out matrix-to-matrix sums and multiplications in the compressed domain, yielding the resulting matrix directly in its compressed _k_ <sup>2</sup> -tree representation and without the need of constructing rank data structures. In this paper, we are interested in right matrix-to-vector multiplications, for which we do not need rank support over the bit vectors representing the _k_ <sup>2</sup> -tree; indeed, a simple visit to each tree node performed in any order is enough to implement the multiplications underneath our PageRank calculations. For our experiments, we run the C++ implementation of the _k_ <sup>2</sup> -tree made available on the website of the University of A Coruña [64] at https://lbd _._ udc _._ [es/research/k2tree/.](https://lbd.udc.es/research/k2tree/) 6 Other implementations have been made available in the SDSL library [65] at https://github _._ [com/simongog/sdsl-lite/](https://github.com/simongog/sdsl-lite/blob/master/include/sdsl/k2_tree.hpp) [blob/master/include/sdsl/k2_tree](https://github.com/simongog/sdsl-lite/blob/master/include/sdsl/k2_tree.hpp) _._ hpp or, more recently, in the codebase of [63] at https://github _._ [com/adriangbrandon/rpq-](https://github.com/adriangbrandon/rpq-matrix/tree/main/lib/matrix_gn) [matrix/tree/main/lib/matrix_gn.](https://github.com/adriangbrandon/rpq-matrix/tree/main/lib/matrix_gn) We have experimented with all those and found that these latter two did _not_ outperform in space, time, and energy the one implemented at A Coruña on our tested datasets; thus we finally resolved to use the version of A Coruña in our experiments. We however modified this version by removing all _rank_ -related data structures, as we do not need them for the multiplications, thus using slightly less space than the implementation in [64]. _C._ _REPAIR COMPRESSED MATRICES_ The technique of matrix multiplications on RePair compressed matrices (mm-repair, for short) has been introduced in [29]; it compactly represents the non-zero entries of a matrix using a grammar that captures regularities between rows, reducing the representation size _and_ speeding-up matrix operations. Given a matrix _M_, the scheme firstly produces a representation consisting of a dictionary _V_ of distinct values and a sequence _S_ containing column-value pairs, as shown in Figure 2. _S_ is obtained by scanning the matrix _M_ row-by-row: each non-zero entry _mij_ in _M_ is represented in _S_ by the pair _⟨ℓ,j⟩_, where _ℓ_ is the index of the value _mij_ in _V_ . At the end of each row, a unique delimiter $ is appended to _S_ . Note that the above scheme works for any real-valued matrix _M_, though in this paper the input matrices are binary; thus, the dictionary _V_ only contains the value 1. The sequence _S_ is then compressed using RePair [66] that computes a grammar representing _S_ . RePair’s output consists of the rules set _R_ and a final sequence _C_ of non-terminals interleaved with the row delimiter $. For our example matrix _M_, the set _R_ (eight rules of the form _Ni_ _→_ _AiBi_ ) and the sequence _C_ are shown in Figure 3 with a green background. The representation of _M_ thus consists of the triplet ( _R, C, V_ ). We now quickly review how this representation supports right and left matrix-to-vector multiplications, without the need for decompressing the entire matrix, taking time _O_ ( _|R|_ + _|C|_ ) and using _O_ ( _|R|_ ) additional space. For the underlying theory and a thorough explanation of this scheme, the reader is referred to the original article [29]. For right multiplications _y_ = _Mx_, we perform a single scan over the rules _R_ of the grammar from the first grammar rule up to the last one and evaluate the contribution of each rule given the values of the vector _x_ . To evaluate a terminal symbol _⟨ℓ,j⟩_, we perform the product eval _x_ ( _⟨ℓ,j⟩_ ) = _V_ [ _ℓ_ ] _·x_ [ _j_ ]. For each nonterminal symbol _Ni_ appearing on the left-hand side of rule _Ni_ _→_ _AiBi_, we evaluate the sum eval _x_ ( _Ni_ ) = eval _x_ ( _Ai_ ) + eval _x_ ( _Bi_ ). We store the results of the evaluated nonterminals in an auxiliary array _W_ (dashed in Figure 3) whose size is Θ( _|R|_ ). The components of the resulting vector _y_ are eventually determined by evaluating the nonterminals appearing in _C_ . Figure 3 illustrates the procedure to rightmultiply _M_ by the vector _x_ = (2 _._ 0 _,_ 0 _._ 0 _,_ 2 _._ 0 _,_ 4 _._ 0), with the 1 1 1 1 1 (a) ``` 1101 0110 0010 0100 ``` (b) ``` 0100 0100 ``` 1 ``` 1001 0011 1000 ``` FIGURE 1: A 8x8 binary matrix (a) and the corresponding _k_ <sup>2</sup> -tree (b). ``` 1 2 3 4 ``` 4.1 5.3 0 5.3 4.1 0 2.0 4.1 0 5.3 2.0 5.3 4.1 5.3 2.0 4.1 4.1 5.3 2.0 5.3 (a)         (b) _M_ =         _S_ <sup>=</sup> _⟨_ 2 _,_ 1 _⟩⟨_ 3 _,_ 2 _⟩⟨_ 3 _,_ 4 _⟩_ $ _⟨_ 2 _,_ 1 _⟩⟨_ 1 _,_ 3 _⟩⟨_ 2 _,_ 4 _⟩_ $ ``` 1 2 3 ``` _V_ = ( 2.0 4.1 5.3 ) _⟨_ 3 _,_ 2 _⟩⟨_ 1 _,_ 3 _⟩⟨_ 3 _,_ 4 _⟩_ $ _⟨_ 2 _,_ 1 _⟩⟨_ 3 _,_ 2 _⟩⟨_ 1 _,_ 3 _⟩⟨_ 2 _,_ 4 _⟩_ $ _⟨_ 2 _,_ 1 _⟩⟨_ 3 _,_ 2 _⟩⟨_ 1 _,_ 3 _⟩⟨_ 3 _,_ 4 _⟩_ $ FIGURE 2: A matrix _M_ (a) and the corresponding ( _V_ _, S_ ) representation (b). values _W_ in the blue arrow corresponding to the evaluations of terminals and nonterminals of the grammar. To carry out a left multiplication _y_ <sup>_t_</sup> = _z_ <sup>_t_</sup> _M_, we follow a dual procedure scanning the rules backward. The left-hand side of Figure 3 schematizes the left multiplication _z_ <sup>_T_</sup> _·_ _M_, with _z_ <sup>_T_</sup> = (1 _._ 0 _,_ 0 _._ 0 _,_ 1 _._ 0 _,_ 2 _._ 0 _,_ 1 _._ 0). To begin with, if a nonterminal _Ni_ appears in position _j_ of _C_, we initialize _W_ [ _i_ ] = _z_ [ _j_ ]. Then we scan the rules bottom-up and for each rule _Ni_ _→_ _AiBi_ we increase the entries corresponding to _Ai_ and _Bi_ by the value of _W_ [ _i_ ]. Eventually, for each non-terminal symbol _⟨ℓ,j⟩_ appearing on the right-hand side of the _i_ th rule, we increase the zero-initialized component _y_ [ _ℓ_ ] of the product vector _y_ by the quantity _V_ [ _j_ ] _· W_ [ _i_ ]. Experiments in [29] have shown that _R_ and _C_ can be further compressed resulting in more compact representations that require the on-the-fly decompression of _R_ and _C_ . In this paper, we have experimented with the following three variants: Re32: _R_ and _C_ are no further compressed and are repre sented as 32-bit integers; this is the fastest variant. Reiv: _R_ and _C_ are represented as packed arrays, with entries of 1+log2 _N_ max bits ( _N_ max being the largest value in _R_ or _C_ ). In our implementation, we used the class int_vector from the sdsl-lite library [65]. Reans: _R_ is represented with a packed array and _C_ is represented with the ans-fold entropy encoder from [59]; this is the variant achieving the maximum compression. _D._ _OTHER COMPRESSED MATRIX FORMATS_ RePair-compressed matrices can be regarded as a generalization of the Compressed Linear Algebra (CLA) system [67] which uses simpler compression schemes. We did not test CLA since the experiments in [29] have shown that matrix multiplication with RePair-based algorithms is faster and uses much less memory than CLA, especially for highly compressible matrices. Another matrix compression scheme that supports matrixvector multiplication in time proportional to the compressed graph size is the bicliques representation [68]. A biclique is a pair of vertex sets _⟨S, T_ _⟩_ such that every vertex in _S_ is connected to every vertex in _T_ . Thus a list of _|S|_ + _|T_ _|_ vertex id’s is sufficient to encode all _|S|_ _·_ _|T_ _|_ edges. The edges not belonging to a biclique are compressed separately, for example employing a _k_ <sup>2</sup> -tree. With a proper algorithm for extracting bicliques, the resulting representation can be very space efficient for Web and social graphs, and it can be adapted to support matrix-vector multiplication [28]. We did not test this approach since only a proof-of-concept implementation is available. Another recently introduced compressed representation of binary matrices is the Two-Dimensional Block Tree (2DBT) [69] that combines the idea of recursive subdivisions of the _k_ <sup>2</sup> -tree with copying redundant portions of the input, a feature introduced by the Block Tree [70]. At its core, the 2DBT is an enhanced _k_ <sup>2</sup> -tree that includes an option to represent submatrices containing a single 1 in constant space and an option to store a submatrix (called _target_ ) as a copy of a previous submatrix of the same size (called _source_ ). As for 7 4 _._ 0 5 _._ 0 4 _._ 0 2 _._ 0 3 _._ 0 4 _._ 0 2 _._ 0 2 _._ 0 1 _._ 0 0 _._ 0 1 _._ 0 2 _._ 0 1 _._ 0 _⟨_ 2 _,_ 1 _⟩_ _⟨_ 3 _,_ 2 _⟩_ _⟨_ 1 _,_ 3 _⟩_ _⟨_ 2 _,_ 4 _⟩_ _⟨_ 3 _,_ 4 _⟩_ _N_ 1 _→⟨_ 2 _,_ 1 _⟩⟨_ 3 _,_ 2 _⟩_ _N_ 2 _→⟨_ 1 _,_ 3 _⟩⟨_ 2 _,_ 4 _⟩_ _N_ 3 _→⟨_ 1 _,_ 3 _⟩⟨_ 3 _,_ 4 _⟩_ _N_ 4 _→_ _N_ 1 _⟨_ 3 _,_ 4 _⟩_ _N_ 5 _→⟨_ 2 _,_ 1 _⟩N_ 2 _N_ 6 _→⟨_ 3 _,_ 2 _⟩N_ 3 _N_ 7 _→_ _N_ 1 _N_ 2 _N_ 8 _→_ _N_ 1 _N_ 3 8 _._ 2 0 _._ 0 4 _._ 0 16 _._ 4 21 _._ 2 8 _._ 2 20 _._ 4 25 _._ 2 29 _._ 4 28 _._ 6 25 _._ 2 28 _._ 6 33 _._ 4 _C_ <sup>=</sup> _N_ 4$ _N_ 5$ _N_ 6$ _N_ 7$ _N_ 8$ FIGURE 3: The MMR-compressed _M_ of Figure 2. the space, the 2DBT has the potential to outperform the _k_ <sup>2</sup> tree; however, the problem of matrix-vector multiplication with this matrix representation has not been considered to date. Indeed, the design of a multiplication algorithm running in time proportional to the size of the 2DBT compressed representation appears to be a non-trivial problem. For this reason, we resolved not to test 2DBT in our experiments. VI. EXPERIMENTAL SETUP _A._ _TRANSPARENCY AND REPRODUCIBILITY_ The entire codebase to reproduce the experiments of our paper is made available at https://gitlab _._ [com/ftosoni/green-lossless-](https://gitlab.com/ftosoni/green-lossless-spmv) [spmv.](https://gitlab.com/ftosoni/green-lossless-spmv) _B._ _DATASETS_ TABLE 1: Web graph datasets Dataset #vertices #edges Web graph? eu-2005 862 664 19 235 140 ✓ hollywood-2009 1 139 905 57 515 616 ✗ in-2004 1 382 908 16 917 053 ✓ ljournal-2008 5 363 260 79 023 142 ✗ indochina-2004 7 414 866 194 109 311 ✓ uk-2002 18 520 486 298 113 762 ✓ arabic-2005 22 744 080 639 999 458 ✓ uk-2005 39 459 925 936 364 282 ✓ it-2004 41 291 594 1 150 725 436 ✓ We used different real datasets from WebGraph framework [71], [72], available from https://sparse _._ [tamu](https://sparse.tamu.edu/LAW) _._ edu/LAW; Ta 8 ble 1 reports their specifications. As shown in the last column, most graphs are Web graphs, in that they derive from crawlings of one or more Web domains. The vertices in these graphs follow the lexicographical order of their reversed URL. It has been empirically observed this helps compression since adjacent rows usually have very similar 0/1 patterns. Though the PageRank algorithm has been designed for Web graphs, we have also included two social network graphs to measure the effectiveness of the compression algorithms in different settings. hollywood-2009 is a graph of movie actors. Vertices are actors, and two actors are joined by an edge whenever they appear in a movie together: this is the only symmetric graph in the collection. ljournal-2008 is a directed graph described in [73] and representing friendships in the social network LiveJournal. In this social network, the notion of friendship is asymmetric, and thus the graph is directed. _C._ _COMPUTER ARCHITECTURE_ We compiled and executed our codes on a Non-Uniform Memory Access (NUMA) server machine equipped with 2 sockets, each having 14 Intel® Xeon® Gold 6132 CPU @ 2.60GHz, for a total of 28 physical cores. The logical cores are 56 due to Intel® Hyper-Threading. The machine is equipped with 12 memory modules of DDR4 RAM, each of them having a capacity of 32 GB for a total of 384 GB of installed memory. The memory modules work at a velocity of 2666 MT/s. The machine runs Ubuntu 22.04.3 Long-term support (LTS) in 64-bit mode. Each of the 28 cores has L1d (896 KiB), L1i (896 KiB), and L2 (28 MiB) caches. Further, each of the two sockets has an L3 cache, whose size is 38.5 MiB. As for the cache associativity of L1 and L2 caches, which have become a major source of energy consumption [74], our L1d and L1i caches are 8-way set associative; the L2 caches are 16-way set associative; and the L3 caches are 11-way set associative. We repeated the experiment on a resource-constrained single-board computer: a Raspberry Pi 4 model B, equipped with four ARM Cortex-A72 CPUs clocked at 1.5GHz. Each of the four cores has its own L1d and L1i cache memories (128+192 KiB); the single shared L2 cache has a size of 1 MB. L1d, L1i, and L2 cache memories are 2-, 3- and 16way set associative. The device has 4 GB of Low Power Double Data Rate 4 Synchronous Dynamic Random-Access Memory (LPDDR4 SDRAM). The machine runs a 64-bit Ubuntu Server 24.04 LTS. For the experiment on this device, we used the datasets with less than 10 <sup>7</sup> vertices (cf. Table 1), namely eu-2005, hollywood-2009, in-2004, ljournal-2008, and indochina-2004. _D._ _CODE SETUP_ As a preprocessing step for our experiments, we extracted the adjacency matrix _A_ from each dataset, transposed it, and compressed it via Zuckerli, the _k_ <sup>2</sup> -tree and mm-repair (see Section V). We also precomputed and stored on disk the array _O_ [1 _, n_ ] of the out-degree for each vertex. For each TABLE 2: Disk occupancy dataset re_32 re_iv re_ans _k_ <sup>2</sup> -tree Zuckerli gzip xz eu-2005 9.56 7.58 6.76 4.07 2.26 2.05 0.46 hollywood-2009 14.17 11.26 10.52 7.22 4.22 2.18 0.87 in-2004 11.38 8.98 7.26 2.92 1.31 1.93 0.39 ljournal-2008 26.99 21.34 19.42 14.27 9.69 2.71 1.52 indochina-2004 5.86 4.93 4.09 2.41 0.79 1.87 0.27 uk-2002 9.34 8.23 6.67 3.12 1.29 1.94 0.40 arabic-2005 6.20 5.49 4.64 2.75 0.96 1.89 0.32 uk-2005 6.79 6.12 5.03 2.72 0.96 1.90 0.34 it-2004 6.16 5.56 4.64 2.76 0.97 1.89 0.32 compression format and each input matrix, we executed 100 iterations of PageRank. All tested codes were written in C/C++ and compiled via the flag -O3, which enables the highest level of optimization that the compiler can perform, including function inlining, loop unrolling, and Single Instruction Multiple Data (SIMD) instructions. The authors of [43] showed that GCC’s -O3 option offers significant energy savings, as -O3 optimized software consumes less than 43% of -O0 optimized. _E._ _DATA PARALLELISM_ In light of the motivations presented in Section III-B, we implemented and tested a data-parallel solution for all the tested matrix formats. We divided each matrix into as many row blocks as the number of threads. We compressed each block using the tested matrix formats and then ran a data-parallel PageRank on top of the compressed blocks. We followed this approach since right matrix-to-vector multiplications are _embarrassingly_ _parallel_, meaning they do not require any specific synchronization data structure beyond a simple barrier to ensure each thread has completed its assigned job. For each algorithm, we forked and joined different threads in C/C++ using standard mechanisms based on POSIX Threads (Pthreads). _F._ _POWER MEASUREMENT_ As in [19], for the Intel® Xeon®, we measured the power consumption of our server machine during PageRank calculations by using the Intel RAPL (Running Average Power Limit) interface [75]. RAPL works by aggregating the values of several specialized Model Specific Registers (MSRs) to estimate the energy consumption at the core level (all cores in a processor), package level (all cores, memory controller, last-level cache, and other components), and DRAM memory level. Depending on the processor model (in our case, Intel® Xeon®), one may have access to the energy estimation at the core and package levels, which is the case in our experiments. Consistent with [19], we present the energy estimation at the package level. Previous studies on energy consumption [34], [76] have demonstrated that RAPL provides reasonably accurate measurements. RAPL is central to the Scaphandre measurement and visualization tool <sup>5</sup> and is also utilized by 5https://web _._ archive _._ [org/web/20230623133912/https://01](https://web.archive.org/web/20230623133912/https://01.org/blogs/2014/running-average-power-limit-–-rapl) _._ org/blogs/ [2014/running-average-power-limit-âĂŞ-rapl](https://web.archive.org/web/20230623133912/https://01.org/blogs/2014/running-average-power-limit-–-rapl) CodeCarbon <sup>6</sup> and the Experiment-Impact Tracker [77]. Additionally, it is integrated into Green Lab [78] and the Green Metrics Tool (GMT), developed by Green Coding Berlin, as cited in [40]. We used the Linux profiler perf (version 5.15.149) to obtain the Intel RAPL energy estimations. perf also allows us to measure additional metrics, such as CPU cycles, cache hits and misses of the L1 and last-level caches, and the number of instructions. In our experiments with the single-board CPU, we measured the current drawn during PageRank computations by connecting a Fluke 8845A benchtop multimeter in series with the USB-C power cable of the board. The multimeter was configured to a range of 10 A, with a resolution of 4½ digits, and a sampling frequency of 3 Hz. Taking into account the frequency spectrum of the current signal, we believe that this sampling rate is adequate for accurately reconstructing the signal with high fidelity. _G._ _COLLECTED METRICS_ Table 2 tabulates the disk occupancy for the single-threaded matrix formats as bits per edge; the two rightmost columns report, for the sake of comparison, the space on disk for the same matrix compressed using gzip and xz in their default setting: we compressed using either a 32-bit representation of the edge descriptions for each graph, consisting of sourceId-destinationId pairs. One can see that, in terms of disk occupancy, re_32 - re_iv - re_ans - _k_ <sup>2</sup> -tree Zuckerli. gzip is sometimes better and other times worse than Zuckerli, and xz is the most succinct representation. However, we stress the fact that experiments on matrix-vector multiplications in [29] showed that gzip is at least an order of magnitude slower than algorithm re_32; we did not test multiplications based on on-the-fly decompression for xzcompressed matrices since xz is even slower in decompression than gzip. For these reasons, we did not test Pagerank on gzip- or xz-compressed matrices. In all our experiments we measured the peak memory usage (PMU) for PageRank executions using the command-line time utility and we report it using again the number of bits per edge, as in Table 2. The PMU will be consistently larger than the disk usage reported in Table 2 for two factors: the first one is that the execution of the algorithm requires additional 6https://github _._ [com/mlco2/codecarbon](https://github.com/mlco2/codecarbon) 9 150 100 50 0 1 _,_ 000 500 0 4 _,_ 000 2 _,_ 000 0 eu-2005 10 15 20 25 30 35 ljournal-2008 20 30 40 50 arabic-2005 8 10 12 14 bits per edge (bpe) in-2004 15 20 25 30 35 uk-2002 10 15 20 25 it-2004 8 10 12 14 bits per edge (bpe) 400 200 0 1 _,_ 000 500 0 6 _,_ 000 4 _,_ 000 2 _,_ 000 0 hollywood-2009 10 15 20 25 indochina-2004 8 10 12 14 16 uk-2005 10 12 14 16 bits per edge (bpe) 100 50 0 2 _,_ 000 1 _,_ 000 0 6 _,_ 000 4 _,_ 000 2 _,_ 000 0 zuckerli _?_ <sup>2</sup> -tree re32 reiv reans FIGURE 4: Bits per edge (x-axis) and elapsed times (y-axis) for 100 iterations of PageRank on the Intel® Xeon® Gold for different numbers of threads. temporary data structures, and the second one is that splitting the matrix into blocks, to support multithread multiplication, usually reduces the overall compression. VII. RESULTS AND DISCUSSION _A._ _EXPERIMENTS ON THE INTEL XEON SERVER_ Figure 4 shows the total elapsed time for 100 iterations of PageRank as a function of the peak memory usage (PMU) in bits per edge. We use markers to differentiate algorithms. Each subfigure represents a different dataset and shows nine data points for each algorithm representing executions with 1, 2, 4, 8, 16, 24, 32, 40, and 48 threads. We observe that Zuckerli is generally the most compressed but the slowest solution, while re_32 is the fastest, albeit more space-consuming. When using a single thread, the _k_ <sup>2</sup> -tree is often more than 3 _×_ faster than Zuckerli; for the datasets eu-2005, in-2004, and uk-2005, the _k_ <sup>2</sup> 10 tree outperforms Zuckerli across all degrees of parallelism, resulting in approximately 3 _×_ more lightweight in space. For the remaining six datasets, the single-threaded _k_ <sup>2</sup> -tree requires 2 _×_ more disk space than Zuckerli which, however, degrades significantly faster with increasing parallelism. We believe this is due to Zuckerli’s more complex compression strategy, which involves a sophisticated method for selecting the reference list to represent each adjacency list. Indeed, as the degree of parallelism increases, the dimension of the adjacency-matrix row block assigned to each single thread decreases, leading to a reduction in the number of candidate reference lists for each adjacency list. The single-threaded grammar-based solutions re_32, re_iv, and re_ans provide faster alternatives, but they are approximately 1 _._ 5 _×_ more space-consuming than Zuckerli and the _k_ <sup>2</sup> -tree. Recall that the grammar-based compressors can in principle handle any input matrix, that is, they are not 10 <sup>2</sup> 10 <sup>1</sup> 10 <sup>3</sup> 10 <sup>2</sup> 10 <sup>1</sup> 10 <sup>3</sup> 10 <sup>2</sup> <u>in-2004</u> 10 <sup>4</sup> 10 <sup>3</sup> 10 <sup>2</sup> <u>12</u> <u>4</u> <u>8</u> <u>16</u> <u>24</u> <u>32</u> <u>40</u> <u>48</u> parallelism degree <u>uk-2002</u> 10 <sup>5</sup> 10 <sup>4</sup> <u>12</u> <u>4</u> <u>8</u> <u>16</u> <u>24</u> <u>32</u> <u>40</u> <u>48</u> parallelism degree <u>it-2004</u> 10 <sup>6</sup> 10 <sup>5</sup> 10 <sup>4</sup> <u>12</u> <u>4</u> <u>8</u> <u>16</u> <u>24</u> <u>32</u> <u>40</u> <u>48</u> parallelism degree Zuckerli _?_ <sup>2</sup> -tree reans reiv re32 10 <sup>2</sup> 10 <sup>1</sup> 10 <sup>0</sup> 10 <sup>3</sup> 10 <sup>2</sup> 10 <sup>1</sup> 10 <sup>3</sup> 10 <sup>2</sup> <u>eu-2005</u> 10 <sup>4</sup> 10 <sup>3</sup> 10 <sup>2</sup> <u>12</u> <u>4</u> <u>8</u> <u>16</u> <u>24</u> <u>32</u> <u>40</u> <u>48</u> parallelism degree <u>ljournal-2008</u> 10 <sup>5</sup> 10 <sup>4</sup> <u>12</u> <u>4</u> <u>8</u> <u>16</u> <u>24</u> <u>32</u> <u>40</u> <u>48</u> parallelism degree <u>arabic-2005</u> 10 <sup>5</sup> 10 <sup>4</sup> hollywood-2009 10 <sup>5</sup> 10 <sup>4</sup> 10 <sup>3</sup> <u>12</u> <u>4</u> <u>8</u> <u>16</u> <u>24</u> <u>32</u> <u>40</u> <u>48</u> parallelism degree <u>indochina-2004</u> 10 <sup>5</sup> 10 <sup>4</sup> 10 <sup>3</sup> <u>12</u> <u>4</u> <u>8</u> <u>16</u> <u>24</u> <u>32</u> <u>40</u> <u>48</u> parallelism degree uk-2005 10 <sup>6</sup> 10 <sup>5</sup> 10 <sup>4</sup> <u>12</u> <u>4</u> <u>8</u> <u>16</u> <u>24</u> <u>32</u> <u>40</u> <u>48</u> parallelism degree 10 <sup>2</sup> 10 <sup>1</sup> 10 <sup>0</sup> 10 <sup>3</sup> 10 <sup>2</sup> 10 <sup>1</sup> 10 <sup>4</sup> 10 <sup>3</sup> 10 <sup>2</sup> 10 <sup>1</sup> <u>12</u> <u>4</u> <u>8</u> <u>16</u> <u>24</u> <u>32</u> <u>40</u> <u>48</u> parallelism degree FIGURE 5: Time performance in seconds (dashed line; left y-axis) and energy usage in Joules (solid line; right y-axis) on the Intel® Xeon® as a function of the number of threads (x-axis). specialized to binary matrices such as Zuckerli and the _k_ <sup>2</sup> tree. In addition, the grammar-based algorithms also support efficient left matrix-to-vector multiplication, which though not needed in our PageRank implementation, is essential for instance in conjugate gradient methods [29]. Among the grammar-based algorithms, re_ans is often the most space-efficient. However, as the number of threads increases, its space requirements increase significantly compared to re_32 and re_iv, which are more robust and less sensitive to increases in thread count. In our green computing scenario, we are particularly interested in the energy consumption of the different algorithms. Figure 5 compares the time (dashed lines) and energy (solid lines) performances of PageRank computations, on a semilogarithmic scale, as a function of the number of threads. As anticipated, performance improves with increasing degrees of parallelism until the optimal level is reached. Beyond this point, no further speedup occurs, and the algorithms may even experience slower execution times. We immediately observe that increasing the number of threads beyond the optimal parallelism degree for time often results in worse energy efficiency. In examining the energy performances reported in the same graph, it becomes clear that energy does not scale as well as time. Energy savings are generally more limited than time savings, and the optimal parallelism degree for energy is usually lower than that for time. This trend is consistently 11 evident, particularly for the slower algorithms, namely Zuckerli and the _k_ <sup>2</sup> -tree. For instance, for hollywood-2009, time performance keeps slightly improving up to at least 40 threads, while energy consumption does not decrease beyond 16 threads. In the cases of in-2004 and Zuckerli, we find an optimal parallelism degree for the time performances for 24 threads, while energy consumption does not decline past 8 threads. This observation challenges the traditional rule of thumb that energy optimization strategies are equivalent to time optimization strategies. Rather, our experiments suggest that software developers of multi-threaded scientific computing should adopt a multicriteria approach, taking into account both time and energy performance. For example, they could select the fastest solution that meets specific energy consumption constraints. To gain a clearer understanding of the performance of various algorithms, Figure 6 illustrates the cycles-per-instruction throughput, as reported by the perf profiler, in relation to the degree of parallelism. A lower number of cycles per instruction indicates higher instruction throughput and, consequently, enhanced energy efficiency per unit of time for the tested algorithms. Among these, Zuckerli and the _k_ <sup>2</sup> tree exhibit the fewest cycles per instruction. However, it is important to note that these two formats have higher overall energy requirements; their more compact nature necessitates more instructions, resulting in longer completion times and increased energy consumption. We believe that the lower cycles per instruction observed are due to the greater memory requirements of grammar-based solutions, which lead to more cache accesses, potentially causing pipeline stalls and increased latencies at the hardware level. Interestingly, the throughputs of Zuckerli and, in particular, the _k_ <sup>2</sup> -tree tend to decline as the number of threads increases. In contrast, for the grammar-based approaches, the number of cycles required for each instruction initially follows a monotonically decreasing trend up to a parallelism degree of 8, followed by an increase up to 24 threads, and then decreases again. Figure 7 illustrates the number of accesses to L1 data caches (L1D) for each matrix format as a function of the degree of parallelism. The total height of each bar represents the overall number of operations in the L1D cache, calculated by summing the number of load cache misses (red), load cache hits (green), and store operations (blue). The x-axis denotes the degree of parallelism, with each group of five bars corresponding to the five tested compression algorithms, presented in the following left-to-right order: Zuckerli, _k_ <sup>2</sup> tree, re_ans, re_iv, and re_32. More succinct formats, such as Zuckerli, require fewer cache loads, resulting in fewer cache misses. The number of cache operations for Zuckerli increases with the degree of parallelism. In contrast, re_iv and re_32 often exhibit non-monotonic behaviors; for example, in the hollywood-2009 dataset, the number of operations for re_32 decreases when scaling from 1 to 2 threads, but then 12 increases again at least up to 32 threads. Similarly, for the hollywood-2009 dataset, the number of operations for re_iv and re_ans decreases initially, reaching a minimum at 4 threads, after which they rise again. The number of operations for the _k_ <sup>2</sup> -tree also follows a non-monotonic pattern, decreasing up to 24 threads. Similarly, Figure 8 shows the number of accesses to the L3 caches. In this case, we observe for most datasets and formats a reduction in the number of accesses as the degree of parallelism increases. As noted in [19], the efficiency of cache accesses can help explain instruction throughput. Algorithms that make better use of cache hierarchies —specifically those that predominantly reside in L1 caches— exhibit higher instruction throughput compared to those that heavily rely on L3 caches. For instance, in the PageRank computations performed on the _k_ <sup>2</sup> -tree for the dataset ljournal-2008, we observe that the number of L3 cache accesses increases monotonically up to 32 threads and then decreases, mirroring the behavior shown in Figure 6. For the same dataset, when analyzing Zuckerli, we observe a decrease in L3 cache accesses, followed by an increase after 16 threads, a subsequent decline at 32 and 40 threads, and a final increase at a parallelism degree of 48. This pattern closely resembles the instruction throughput depicted in Figure 6. This relationship between L3 accesses and cycles per instruction appears also in other datasets, particularly for Zuckerli, which is the slowest algorithm. Furthermore, we notice that the overall decrease in L3 accesses for Zuckerli often corresponds to an increase in L1D accesses, as shown in Figure 7. This suggests that Zuckerli achieves higher instruction throughput by utilizing L1 caches more effectively than L3 caches. _B._ _EXPERIMENTS ON THE RASPBERRY PI_ To validate our results, we repeated the PageRank computations on an ARM-based Raspberry Pi (see the specifics in Section VI-C). Due to the limitations of this architecture, we only considered the five smallest graphs and ran the algorithms with only 1, 2, 4, and 8 threads. In addition, since we noticed in Figure 4 that re_iv and re_ans exhibit similar behaviors, we included only re_ans in this set of experiments. Figure 9 illustrates the space–time performances on the Raspberry Pi. We observe that time and space are not always monotonic when scaling from 4 to 8 threads, as PMU and completion time increase, notably for Zuckerli. In three out of five datasets, Zuckerly is the most compact, while in the remaining two datasets, the _k_ <sup>2</sup> -tree demonstrates superior compactness. Regarding time performance, the ranking positions the grammar-based solutions re_32 and re_ans as the fastest, followed by the _k_ <sup>2</sup> -tree, with Zuckerly trailing behind. The grammar-based solutions achieve speeds at least 2 _×_ faster than the _k_ <sup>2</sup> -tree, albeit at the cost of significantly increased memory usage. 1 _._ 5 1 0 _._ 5 1 _._ 5 1 0 _._ 5 2 1 _._ 5 1 0 _._ 5 1 _._ 2 1 0 _._ 8 0 _._ 6 2 1 _._ 5 1 eu-2005 124 8 16 24 32 40 48 ljournal-2008 in-2004 124 8 16 24 32 40 48 uk-2002 124 8 16 24 32 40 48 it-2004 124 8 16 24 32 40 48 parallelism degree hollywood-2009 124 8 16 24 32 40 48 indochina-2004 124 8 16 24 32 40 48 uk-2005 124 8 16 24 32 40 48 parallelism degree 1 0 _._ 8 0 _._ 6 2 1 _._ 5 1 0 _._ 5 2 1 _._ 5 1 0 _._ 5 0 _._ 5 124 8 16 24 32 40 48 arabic-2005 2 1 _._ 5 1 0 _._ 5 124 8 16 24 32 40 48 parallelism degree zuckerli _?_ <sup>2</sup> -tree re32 reiv reans FIGURE 6: Number of cycles per instruction (y-axis) as a function of the parallelism degree (xaxis) for 100 iterations of PageRank on the Intel® Xeon® Gold. In comparing Figure 4 with Figure 9, we observe that on the Raspberry PI, even the single-threaded version of the _k_ <sup>2</sup> -tree has faster completion time than all Zuckerli parameterizations across all datasets: on the Intel® Xeon® for hollywood-2009 and ljournal-2008 Zuckerli with 4 threads resulted in faster computations than the single thread _k_ <sup>2</sup> -tree. Figure 10 shows time and energy usage as a function of the number of threads. As we mentioned in Section VI-F since RAPL data is not available on the Raspberry Pi, the energy consumption was estimated by measuring the input current during the computation. This substantially different measurement technique yields results that align well with those for the Intel® Xeon®, considering that we used at most 8 threads since the Raspberry has only 4 cores. Since the time-energy behavior in Figure 10 substantially confirms those of Figure 5, we omit reporting the metrics we captured for L1d caches for the Raspberry Pi (keep in mind that the Raspberry Pi does not have any L3 caches). Even for the Raspberry Pi, we observe a convex trend, particularly with Zuckerli. In this case, allocating additional threads (8 threads, exceeding the 4 available cores) prolongs completion time and increases resource utilization, resulting in greater energy inefficiency. In contrast, the data for Zuckerli on the Intel® Xeon® machine in Figure 5 exhibit a less pronounced convex trend when scaling to high levels of parallelism. We believe that, in the server environment, when approaching the optimal parallelism degree, the increased energy required to operate with more threads offsets the benefit of slightly faster execution gained from the time speedup. Overall our results suggest that the qualitative behavior observed on the Intel® Xeon® server can be extended to 13 ·10 <sup>12</sup> hollywood-2009 in-2004 eu-2005 4 3 2 1 0 ·10 <sup>12</sup> 2 1 _._ 5 1 0 _._ 5 0 1 0 _._ 5 0 4 2 0 ·10 <sup>12</sup> 1 2 4 8 16 24 32 40 48 1 2 4 8 16 24 32 40 48 1 2 4 8 16 24 32 40 48 ·10 <sup>13</sup> 1 _._ 5 1 0 _._ 5 0 ·10 <sup>13</sup> uk-2002 ·10 <sup>13</sup> ljournal-2008 indochina-2004 1 2 4 8 16 24 32 40 48 1 2 4 8 16 24 32 40 48 2 1 0 3 2 1 0 8 6 4 2 0 1 2 4 8 16 24 32 40 48 8 ·10 <sup>13</sup> 6 4 2 0 ·10 <sup>13</sup> it-2004 uk-2005 ·10 <sup>13</sup> arabic-2005 1 2 4 8 16 24 32 40 48 1 2 4 8 16 24 32 40 48 1 2 4 8 16 24 32 40 48 FIGURE 7: Accesses to L1d cache memories on the Intel® Xeon® Gold (y-axis) as a function of the parallelism degree (x-axis). resource-constrained edge devices. VIII. CONCLUSION AND FUTURE WORK We have tested the running time, disk occupancy, memory usage, and energy consumption of three different algorithms for binary SpMVs, using them for computing the PageRank of large Web graphs and social networks. The main lessons we learned from our study can be summarized as follows. _•_ By employing an appropriate compressed representation, we can effectively tackle problems involving large datasets, even on resource-constrained devices. _•_ Different algorithms exhibit different space-time tradeoffs, which can be significantly influenced by the number of available threads. 14 _•_ For PageRank computations, the _k_ <sup>2</sup> -tree appears to be the safe middle-ground choice: it is nearly as fast as grammar-based compressors and almost as spaceefficient as Zukerli. Additionally, it shows the least deterioration in compression ratio as the number of threads increases. _•_ The choice of compressed representation should take into account the type of input data. All our representations were considerably less effective on the two social network graphs. However, the results for gzip and xz indicate that even those matrices are significantly compressible, suggesting that other compressed representations, such as those mentioned in Section V-D, should be considered. ·10 <sup>8</sup> eu-2005 2 1 _._ 5 1 0 _._ 5 0 in-2004 hollywood-2009 6 4 2 0 ·10 <sup>9</sup> ·10 <sup>8</sup> 4 2 0 6 4 2 0 1 0 _._ 5 0 1 2 4 8 16 24 32 40 48 1 2 4 8 16 24 32 40 48 1 2 4 8 16 24 32 40 48 ·10 <sup>9</sup> 4 3 2 1 0 8 ·10 <sup>9</sup> 6 4 2 uk-2002 indochina-2004 ·10 <sup>9</sup> ljournal-2008 1 2 4 8 16 24 32 40 48 1 2 4 8 16 24 32 40 48 0 2 1 0 1 2 4 8 16 24 32 40 48 ·10 <sup>10</sup> it-2004 uk-2005 ·10 <sup>10</sup> arabic-2005 2 1 _._ 5 1 0 _._ 5 0 ·10 <sup>10</sup> 1 2 4 8 16 24 32 40 48 1 2 4 8 16 24 32 40 48 1 2 4 8 16 24 32 40 48 FIGURE 8: Number of accesses to L3 cache memories on the Intel® Xeon® Gold (y-axis) as a function of the parallelism degree (x-axis). _•_ Energy consumption is not solely proportional to running time, therefore it should be measured independently in critical scenarios. This is especially evident when considering the number of threads: our experiments show that the optimal number of threads for minimizing energy usage may differ from that for optimizing running time. We believe that further research in this area could lead to new theoretical challenges regarding the optimization of energy and the implementation of multicriteria time-energy solutions. _•_ The experiments demonstrate that by carefully selecting the compressed representation, energy usage can be reduced by one or two orders of magnitude. This reduction is observed in both server scenarios and when using a single-board Raspberry Pi. _•_ Regarding question Q3, our results presented in Figure 7 and Figure 8 indicate that an increase in L1 and L3 cache operations impacts the cycles per instruction rate shown in Figure 6. This, in turn, affects overall time and energy performance, providing evidence that inadequate utilization of the cache hierarchy can degrade instruction-perclock-cycle throughput, leading to increased latencies and energy inefficiencies. For future work, we plan to explore additional lossless compression formats for matrices and vectors and investigate applications beyond PageRank. We believe that in-depth research in this area can uncover new theoretical challenges related to optimizing the energy-time tradeoff, providing valuable insights for software engineers seeking to reduce carbon footprints and extend the battery life of their solutions. 15 in-2004 15 20 25 30 bits per edge (bpe) 600 400 200 0 4 _,_ 000 2 _,_ 000 0 eu-2005 15 20 25 ljournal-2008 20 25 30 35 40 bits per edge (bpe) zuckerli _?_ <sup>2</sup> -tree re32 reans 2 _,_ 000 1 _,_ 000 0 4 _,_ 000 2 _,_ 000 0 hollywood-2009 10 15 20 indochina-2004 8 10 12 14 bits per edge (bpe) 600 400 200 0 FIGURE 9: Bits per edge (x-axis) and elapsed times (y-axis) for 100 iterations of PageRank on the Raspberry Pi, for 1, 2, 4, and 8 threads. We also intend to study cross-platform energy-efficient implementations of other major compressed data structures, such as the FM-index, rank and select support structures, suffix arrays, and succinct tree topologies. This work will demonstrate the potential of data compression to reduce carbon footprints across diverse platforms and applications. In the context of ML optimization, we propose exploring combinations of lossless tools with state-of-the-art lossy compression strategies. This approach aims to strike a balance between space and accuracy, allowing us to leverage the strengths of both methods and evaluate their effectiveness. REFERENCES [1] K. He, X. Zhang, S. Ren, and J. Sun, ‘‘Deep residual learning for image recognition,’’ in _2016_ _IEEE_ _Conference_ _on_ _Computer_ _Vision_ _and_ _Pattern_ _Recognition (CVPR)_, 2016, pp. 770–778. [2] C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D. Anguelov, D. Erhan, V. Vanhoucke, and A. Rabinovich, ‘‘Going deeper with convolutions,’’ in _2015_ _IEEE_ _Conference_ _on_ _Computer_ _Vision_ _and_ _Pattern_ _Recognition_ _(CVPR)_, 2015, pp. 1–9. [3] T. B. Brown, B. Mann, N. Ryder, M. Subbiah, J. Kaplan, P. Dhariwal, A. Neelakantan, P. Shyam, G. Sastry, A. Askell, S. Agarwal, A. HerbertVoss, G. Krueger, T. Henighan, R. Child, A. Ramesh, D. M. Ziegler, J. Wu, C. Winter, C. Hesse, M. Chen, E. Sigler, M. Litwin, S. Gray, B. Chess, J. Clark, C. Berner, S. McCandlish, A. Radford, I. Sutskever, and D. Amodei, ‘‘Language models are few-shot learners,’’ in _Proceedings_ _of_ _the_ _34th_ _International_ _Conference_ _on_ _Neural_ _Information_ _Processing_ _Systems_, ser. NIPS’20. Red Hook, NY, USA: Curran Associates Inc., 2020. [4] A. Joulin, E. Grave, P. Bojanowski, and T. Mikolov, ‘‘Bag of tricks for efficient text classification,’’ in _Proc._ _15th_ _Conference_ _of_ _the_ _European_ _Chapter of the Association for Computational Linguistics (EACL)_, M. La 16 pata, P. Blunsom, and A. Koller, Eds. Association for Computational Linguistics, 2017, pp. 427–431. [5] J. Devlin, M.-W. Chang, K. Lee, and K. Toutanova, ‘‘BERT: Pre-training of deep bidirectional transformers for language understanding,’’ in _Proc._ _2019_ _Conference_ _of_ _the_ _North_ _American_ _Chapter_ _of_ _the_ _Association_ _for_ _Computational_ _Linguistics:_ _Human_ _Language_ _Technologies,_ _Volume_ _1_ _(Long_ _and_ _Short_ _Papers)_ . Minneapolis, Minnesota: Association for Computational Linguistics, Jun. 2019, pp. 4171–4186. [Online]. Available: [https://aclanthology](https://aclanthology.org/N19-1423) _._ org/N19-1423 [6] G. Navarro, ‘‘Indexing highly repetitive string collections, part i: Repeti tiveness measures,’’ _ACM Comput. Surv._, vol. 54, no. 2, mar 2021. [7] ——, ‘‘Indexing highly repetitive string collections, part II: compressed indexes,’’ _ACM Computing Surveys_, vol. 54, no. 2, 2020. [8] R. Angles and C. Gutierrez, ‘‘Survey of graph database models,’’ _ACM_ _Comput._ _Surv._, vol. 40, no. 1, pp. 1:1–1:39, 2008. [Online]. Available: https://doi _._ org/10 _._ [1145/1322432](https://doi.org/10.1145/1322432.1322433) _._ 1322433 [9] W. Liang, P. D. Meo, Y. Tang, and J. Zhu, ‘‘A survey of multi modal knowledge graphs: Technologies and trends,’’ _ACM_ _Comput._ _Surv._, vol. 56, no. 11, pp. 273:1–273:41, 2024. [Online]. Available: https://doi _._ [org/10](https://doi.org/10.1145/3656579) _._ 1145/3656579 [10] ‘‘Graph database market size projections,’’ [https://finance](https://finance.yahoo.com/news/graph-database-market-size-projected-142500719.html) _._ yahoo _._ com/ [news/graph-database-market-size-projected-142500719](https://finance.yahoo.com/news/graph-database-market-size-projected-142500719.html) _._ html, 2024, retrieved on 2024-09-06. [11] S. Ji, S. Pan, E. Cambria, P. Marttinen, and P. S. Yu, ‘‘A survey on knowledge graphs: Representation, acquisition, and applications,’’ _IEEE_ _Transactions_ _on_ _Neural_ _Networks_ _and_ _Learning_ _Systems_, vol. 33, no. 2, p. 494–514, Feb. 2022. [Online]. Available: http://dx _._ doi _[.](http://dx.doi.org/10.1109/TNNLS.2021.3070843)_ org/10 _._ 1109/ TNNLS _._ [2021](http://dx.doi.org/10.1109/TNNLS.2021.3070843) _._ 3070843 [12] C. Peng, F. Xia, M. Naseriparsa, and F. Osborne, ‘‘Knowledge graphs: Opportunities and challenges,’’ _Artif._ _Intell._ _Rev._, vol. 56, no. 11, pp. 13 071–13 102, 2023. [Online]. Available: https://doi _._ [org/10](https://doi.org/10.1007/s10462-023-10465-9) _._ 1007/ [s10462-023-10465-9](https://doi.org/10.1007/s10462-023-10465-9) [13] S. Ji, S. Pan, E. Cambria, P. Marttinen, and P. S. Yu, ‘‘A survey on knowledge graphs: Representation, acquisition, and applications,’’ _IEEE_ _Transactions_ _on_ _Neural_ _Networks_ _and_ _Learning_ _Systems_, vol. 33, no. 2, pp. 494–514, 2022. [14] D. Edge, H. Trinh, N. Cheng, J. Bradley, A. Chao, A. Mody, S. Truitt, and <u>in-2004</u> 10 <sup>2</sup> 10 <sup>1</sup> 10 <sup>3</sup> 10 <sup>2</sup> 10 <sup>3</sup> 10 <sup>2</sup> Zuckerli _?_ <sup>2</sup> -tree reans re32 <u>hollywood-2009</u> <u>1</u> <u>2</u> <u>4</u> <u>8</u> parallelism degree 10 <sup>4</sup> 10 <sup>3</sup> 10 <sup>2</sup> 10 <sup>1</sup> <u>eu-2005</u> <u>1</u> <u>2</u> <u>4</u> <u>8</u> parallelism degree 10 <sup>3</sup> 10 <sup>2</sup> <u>1</u> <u>2</u> <u>4</u> <u>8</u> parallelism degree <u>indochina-2004</u> <u>1</u> <u>2</u> <u>4</u> <u>8</u> parallelism degree 10 <sup>4</sup> 10 <sup>3</sup> 10 <sup>3</sup> <sup>_._</sup> <sup>5</sup> 10 <sup>3</sup> 10 <sup>2</sup> <sup>_._</sup> <sup>5</sup> <u>ljournal-2008</u> <u>1</u> <u>2</u> <u>4</u> <u>8</u> parallelism degree 10 <sup>4</sup> 10 <sup>3</sup> 10 <sup>3</sup> 10 <sup>2</sup> FIGURE 10: Time performance in seconds (dashed line; left y-axis) and energy requirements in Joules (solid line; right y-axis) on the Raspberry Pi 4 as a function of the number of threads (xaxis). J. Larson, ‘‘From local to global: A graph RAG approach to query-focused summarization,’’ _CoRR_, vol. abs/2404.16130, 2024. [Online]. Available: https://doi _._ org/10 _._ [48550/arXiv](https://doi.org/10.48550/arXiv.2404.16130) _._ 2404 _._ 16130 [15] J. Kunecová, A. Bikfalvi, and P. Marques, ‘‘Sustainability orientation, industrial big data and product innovation: Evidence from the european manufacturing sector,’’ _Computers_ _&_ _Industrial_ _Engineering_, vol. 191, p. 110163, 2024. [Online]. Available: https://www _._ [sciencedirect](https://www.sciencedirect.com/science/article/pii/S0360835224002845) _._ com/ [science/article/pii/S0360835224002845](https://www.sciencedirect.com/science/article/pii/S0360835224002845) [16] C. Freitag, M. Berners-Lee, K. Widdicks, B. Knowles, G. S. Blair, and A. Friday, ‘‘The real climate and transformative impact of ict: A critique of estimates, trends, and regulations,’’ _Patterns_, vol. 2, no. 9, p. 100340, 2021. [Online]. Available: https://www _._ [sciencedirect](https://www.sciencedirect.com/science/article/pii/S2666389921001884) _._ com/science/article/ [pii/S2666389921001884](https://www.sciencedirect.com/science/article/pii/S2666389921001884) [17] R. Verdecchia, J. Sallou, and L. Cruz, ‘‘A systematic review of green AI,’’ _WIREs Data. Mining. Knowl. Discov._, vol. 13, no. 4, 2023. [18] E. Baldini, S. Chessa, and A. Brogi, ‘‘Estimating the environmental impact of green iot deployments,’’ _Sensors_, vol. 23, no. 3, 2023. [Online]. Available: https://www _._ mdpi _._ [com/1424-8220/23/3/1537](https://www.mdpi.com/1424-8220/23/3/1537) [19] J. Fuentes-Sepúlveda and S. Ladra, ‘‘Energy consumption in compact integer vectors: A study case,’’ _IEEE Access_, vol. 7, pp. 155 625–155 636, 2019. [20] C. Pang, A. Hindle, B. Adams, and A. E. Hassan, ‘‘What do programmers know about software energy consumption?’’ _IEEE Software_, vol. 33, no. 3, pp. 83–89, 2016. [21] G. Navarro, _Compact Data Structures: A Practical Approach_ . Cambridge University Press, 2016. [22] S. Ma, H. Wang, L. Ma, L. Wang, W. Wang, S. Huang, L. Dong, R. Wang, J. Xue, and F. Wei, ‘‘The era of 1-bit llms: All large language models are in 1.58 bits,’’ 2024. [23] J. Woo, K. Jung, and S. Mukhopadhyay, ‘‘Efficient hardware design of dnn for rf signal modulation recognition employing ternary weights,’’ _IEEE_ _Access_, vol. 12, pp. 80 165–80 175, 2024. [24] S. Zhu, L. H. K. Duong, H. Chen, D. Liu, and W. Liu, ‘‘Fat: An in memory accelerator with fast addition for ternary weight neural networks,’’ _IEEE Transactions on Computer-Aided Design of Integrated Circuits and_ _Systems_, vol. 42, no. 3, pp. 781–794, 2023. [25] Y. Liu, K. Chen, and L. Zhu, ‘‘Efficient federated learning algorithm using sparse ternary compression based on layer variation classification,’’ _Computer_ _Networks_, vol. 247, p. 110471, 2024. [Online]. Available: https://www _._ sciencedirect _._ [com/science/article/pii/S1389128624003037](https://www.sciencedirect.com/science/article/pii/S1389128624003037) [26] Z. Xu, L. Li, and W. Zou, ‘‘Exploring federated learning on battery powered devices,’’ in _Proceedings_ _of_ _the_ _ACM_ _Turing_ _Celebration_ _Conference_ _-_ _China_, ser. ACM TURC ’19. New York, NY, USA: Association for Computing Machinery, 2019. [Online]. Available: [https:](https://doi.org/10.1145/3321408.3323080) //doi _._ org/10 _._ [1145/3321408](https://doi.org/10.1145/3321408.3323080) _._ 3323080 [27] J. N. F. Alves, S. Moustafa, S. Benkner, A. P. Francisco, W. N. Gansterer, and L. M. S. Russo, ‘‘Accelerating graph neural networks with a novel matrix compression format,’’ 2024. [Online]. Available: https://arxiv _._ [org/abs/2409](https://arxiv.org/abs/2409.02208) _._ 02208 [28] A. P. Francisco, T. Gagie, D. Köppl, S. Ladra, and G. Navarro, ‘‘Graph compression for adjacency-matrix multiplication,’’ _SN Computer Science_, vol. 3, no. 3, p. 193, Mar 2022. [29] P. Ferragina, G. Manzini, T. Gagie, D. Köppl, G. Navarro, M. Striani, and F. Tosoni, ‘‘Improving matrix-vector multiplication via lossless grammar-compressed matrices,’’ _Proc._ _VLDB_ _Endow._, vol. 15, no. 10, pp. 2175–2187, 2022. [Online]. Available: https://www _._ [vldb](https://www.vldb.org/pvldb/vol15/p2175-tosoni.pdf) _._ org/pvldb/ [vol15/p2175-tosoni](https://www.vldb.org/pvldb/vol15/p2175-tosoni.pdf) _._ pdf [30] N. R. Brisaboa, S. Ladra, and G. Navarro, ‘‘Compact representation of web graphs with extended functionality,’’ _Inf. Syst._, vol. 39, pp. 152–174, 2014. [31] L. Versari, I. Comsa, A. Conte, and R. Grossi, ‘‘Zuckerli: A new com pressed representation for graphs,’’ _IEEE_ _Access_, vol. 8, pp. 219 233– 219 243, 2020. [32] P. Mohapatra and H. Chen, ‘‘Webgraph: a framework for managing and improving performance of dynamic web content,’’ _IEEE_ _J._ _Sel._ _Areas_ _Commun._, vol. 20, no. 7, pp. 1414–1425, 2002. [33] L. Page, S. Brin, R. Motwani, and T. Winograd, ‘‘The pagerank citation 17 ranking: Bringing order to the web,’’ in _The_ _Web_ _Conference_, 1999. [Online]. Available: https://api _._ [semanticscholar](https://api.semanticscholar.org/CorpusID:1508503) _._ org/CorpusID:1508503 [34] K. N. Khan, M. Hirki, T. Niemi, J. K. Nurminen, and Z. Ou, ‘‘Rapl in action: Experiences in using rapl for power measurements,’’ _ACM_ _Trans._ _Model._ _Perform._ _Eval._ _Comput._ _Syst._, vol. 3, no. 2, mar 2018. [Online]. Available: https://doi _._ [org/10](https://doi.org/10.1145/3177754) _._ 1145/3177754 [35] J. L. Sullivan, L. Gaines, and E. Systems, ‘‘A review of battery life-cycle analysis : state of knowledge and critical needs.’’ 12 2010. [Online]. Available: https://www _._ osti _._ [gov/biblio/1000659](https://www.osti.gov/biblio/1000659) [36] S. Roy, A. Rudra, and A. Verma, ‘‘Energy aware algorithmic engineering,’’ in _2014_ _IEEE_ _22nd_ _International_ _Symposium_ _on_ _Modelling,_ _Analysis_ _&_ _Simulation of Computer and Telecommunication Systems_, 2014, pp. 321– 330. [37] J. Koetsier, ‘‘Chatgpt burns millions every day. can computer scientists make ai one million times more efficient?’’ Feb 2023. [Online]. Available: https://www _._ forbes _._ [com/sites/johnkoetsier/2023/02/10/chatgpt-burns-](https://www.forbes.com/sites/johnkoetsier/2023/02/10/chatgpt-burns-millions-every-day-can-computer-scientists-make-ai-one-million-times-more-efficient/?sh=67c3d8256944) [millions-every-day-can-computer-scientists-make-ai-one-million-times-](https://www.forbes.com/sites/johnkoetsier/2023/02/10/chatgpt-burns-millions-every-day-can-computer-scientists-make-ai-one-million-times-more-efficient/?sh=67c3d8256944) [more-efficient/?sh=67c3d8256944](https://www.forbes.com/sites/johnkoetsier/2023/02/10/chatgpt-burns-millions-every-day-can-computer-scientists-make-ai-one-million-times-more-efficient/?sh=67c3d8256944) [38] W. Knight, ‘‘Openai’s ceo says the age of giant ai models is already over,’’ _WIRED_, April 2023, accessed: 2024-0915. [Online]. Available: https://www _._ wired _._ [com/story/openai-ceo-sam-](https://www.wired.com/story/openai-ceo-sam-altman-the-age-of-giant-ai-models-is-already-over/) [altman-the-age-of-giant-ai-models-is-already-over/](https://www.wired.com/story/openai-ceo-sam-altman-the-age-of-giant-ai-models-is-already-over/) [39] C. Calero and M. Piattini, ‘‘Puzzling out software sustainability,’’ _Sustainable_ _Computing:_ _Informatics_ _and_ _Systems_, vol. 16, pp. 117–124, 2017. [Online]. Available: https://www _._ [sciencedirect](https://www.sciencedirect.com/science/article/pii/S2210537916301676) _._ com/science/article/ [pii/S2210537916301676](https://www.sciencedirect.com/science/article/pii/S2210537916301676) [40] A. Guldner, R. Bender, C. Calero, G. S. Fernando, M. Funke, J. Gröger, L. M. Hilty, J. Hörnschemeyer, G.-D. Hoffmann, D. Junger, T. Kennes, S. Kreten, P. Lago, F. Mai, I. Malavolta, J. Murach, K. Obergöker, B. Schmidt, A. Tarara, J. P. De Veaugh-Geiss, S. Weber, M. Westing, V. Wohlgemuth, and S. Naumann, ‘‘Development and evaluation of a reference measurement model for assessing the resource and energy efficiency of software products and components—green software measurement model (gsmm),’’ _Future_ _Generation_ _Computer_ _Systems_, vol. 155, pp. 402–418, 2024. [Online]. Available: https://www _._ sciencedirect _._ [com/science/article/pii/S0167739X24000384](https://www.sciencedirect.com/science/article/pii/S0167739X24000384) [41] S. Roy, A. Rudra, and A. Verma, ‘‘An energy complexity model for algorithms,’’ in _Proceedings_ _of_ _the_ _4th_ _Conference_ _on_ _Innovations_ _in_ _Theoretical_ _Computer_ _Science_, ser. ITCS ’13. New York, NY, USA: Association for Computing Machinery, 2013, p. 283–304. [Online]. Available: https://doi _._ org/10 _._ [1145/2422436](https://doi.org/10.1145/2422436.2422470) _._ 2422470 [42] P. Lago, D. Greefhorst, and E. Woods, ‘‘Architecting for sustainability,’’ in _EnviroInfo 2022_, ser. Lecture Notes in Informatics (LNI), Proceedings - Series of the Gesellschaft fur Informatik (GI), V. Wohlgemuth, S. Naumann, H.-K. Arndt, G. Behrens, and M. Hob, Eds. Gesellschaft fur Informatik (GI), 2022, pp. 199–209, publisher Copyright: © 2022 Gesellschaft fur Informatik (GI). All rights reserved.; 36th International Conference on Informatics for Environmental Protection: Environmental Information and Communication Technologies, EnviroInfo 2022 ; Conference date: 26-092022 Through 28-09-2022. [43] M. Kambadur and M. A. Kim, ‘‘An experimental survey of energy management across the stack,’’ _SIGPLAN Not._, vol. 49, no. 10, p. 329–344, oct 2014. [Online]. Available: https://doi _._ org/10 _._ [1145/2714064](https://doi.org/10.1145/2714064.2660196) _._ 2660196 [44] J. Mancebo, C. Calero, F. Garcia, M. A. Moraga, and I. Garcia-Rodriguez de Guzman, ‘‘Feetings: Framework for energy efficiency testing to improve environmental goal of the software,’’ _Sustainable_ _Computing:_ _Informatics_ _and_ _Systems_, vol. 30, p. 100558, 2021. [Online]. Available: https://www _._ sciencedirect _._ [com/science/article/pii/S2210537921000494](https://www.sciencedirect.com/science/article/pii/S2210537921000494) [45] E. Kern, L. M. Hilty, A. Guldner, Y. V. Maksimov, A. Filler, J. Gröger, and S. Naumann, ‘‘Sustainable software products—towards assessment criteria for resource and energy efficiency,’’ _Future Generation Computer_ _Systems_, vol. 86, pp. 199–210, 2018. [Online]. Available: [https://](https://www.sciencedirect.com/science/article/pii/S0167739X17314188) www _._ sciencedirect _._ [com/science/article/pii/S0167739X17314188](https://www.sciencedirect.com/science/article/pii/S0167739X17314188) [46] J. Mancebo, F. García, and C. Calero, ‘‘A process for analysing the energy efficiency of software,’’ _Information_ _and_ _Software_ _Technology_, vol. 134, p. 106560, 2021. [Online]. Available: https://www _._ [sciencedirect](https://www.sciencedirect.com/science/article/pii/S0950584921000446) _._ com/ [science/article/pii/S0950584921000446](https://www.sciencedirect.com/science/article/pii/S0950584921000446) [47] N. Rteil, R. Bashroush, R. Kenny, and A. Wynne, ‘‘Interact: It infrastructure energy and cost analyzer tool for data centers,’’ _Sustainable_ _Computing:_ _Informatics_ _and_ _Systems_, vol. 33, p. 100618, 2022. [Online]. Available: https://www _._ sciencedirect _._ [com/science/article/pii/S2210537921001062](https://www.sciencedirect.com/science/article/pii/S2210537921001062) [48] T. Kennes, ‘‘Measuring it carbon footprint: What is the current status actually?’’ 2023. [Online]. Available: https://arxiv _._ [org/abs/2306](https://arxiv.org/abs/2306.10049) _._ 10049 18 [49] S. Kreten, ‘‘Modellbildung und umsetzung von methoden zur energieef fizienten nutzung von containertechnologien,’’ doctoralthesis, Universität Trier, 2022. [50] S. Albers, ‘‘Energy-efficient algorithms,’’ _Commun._ _ACM_, vol. 53, no. 5, pp. 86–96, 2010. [51] S. Irani and K. R. Pruhs, ‘‘Algorithmic problems in power management,’’ _SIGACT_ _News_, vol. 36, no. 2, p. 63–76, jun 2005. [Online]. Available: https://doi _._ org/10 _._ [1145/1067309](https://doi.org/10.1145/1067309.1067324) _._ 1067324 [52] H. Wang, S. Ma, L. Dong, S. Huang, H. Wang, L. Ma, F. Yang, R. Wang, Y. Wu, and F. Wei, ‘‘Bitnet: Scaling 1-bit transformers for large language models,’’ 2023. [Online]. Available: https://arxiv _._ [org/abs/2310](https://arxiv.org/abs/2310.11453) _._ 11453 [53] G. Menghani, ‘‘Efficient deep learning: A survey on making deep learning models smaller, faster, and better,’’ _ACM_ _Comput._ _Surv._, vol. 55, no. 12, mar 2023. [54] M. McCool, J. Reinders, and A. Robison, _Structured_ _Parallel_ _Program-_ _ming:_ _Patterns_ _for_ _Efficient_ _Computation_, 1st ed. San Francisco, CA, USA: Morgan Kaufmann Publishers Inc., 2012. [55] C. D. Manning, P. Raghavan, and H. Schütze, _Introduction to Information_ _Retrieval_ . Cambridge University Press, 2008. [56] P. Boldi, M. Santini, and S. Vigna, ‘‘Pagerank as a function of the damping factor,’’ in _Proceedings of the 14th International Conference on_ _World_ _Wide_ _Web_, ser. WWW ’05. New York, NY, USA: Association for Computing Machinery, 2005, p. 557–566. [Online]. Available: https://doi _._ org/10 _._ [1145/1060745](https://doi.org/10.1145/1060745.1060827) _._ 1060827 [57] ‘‘WebGraph++,’’ https://cnets _._ indiana _._ [edu/groups/nan/webgraph/,](https://cnets.indiana.edu/groups/nan/webgraph/) [On line; accessed 10-Mar-2024]. [58] T. Fontana, S. Vigna, and S. Zacchiroli, ‘‘WebGraph: The Next Generation (Is in Rust),’’ in _ACM Web Conference 2024_, Singapore, Singapore, May 2024. [Online]. Available: https://hal _._ [science/hal-04494627](https://hal.science/hal-04494627) [59] A. Moffat and M. Petri, ‘‘Large-alphabet semi-static entropy coding via asymmetric numeral systems,’’ _ACM_ _Trans._ _Inf._ _Syst._, vol. 38, no. 4, pp. 33:1–33:33, 2020. [60] P. Ferragina, _Pearls_ _of_ _Algorithm_ _Engineering_ . Cambridge University Press, 2023. [61] T. H. Cormen, C. E. Leiserson, R. L. Rivest, and C. Stein, _Introduction to_ _Algorithms, Third Edition_, 3rd ed. The MIT Press, 2009. [62] N. R. Brisaboa, G. de Bernardo, G. Gutiérrez, S. Ladra, M. R. Penabad, and B. A. Troncoso, ‘‘Efficient set operations over k2-trees,’’ in _2015 Data_ _Compression Conference, DCC 2015, Snowbird, UT, USA, April 7-9, 2015_, A. Bilgin, M. W. Marcellin, J. Serra-Sagristà, and J. A. Storer, Eds. IEEE, 2015, pp. 373–382. [63] D. Arroyuelo, A. Gómez-Brandón, and G. Navarro, ‘‘Evaluating regular path queries on compressed adjacency matrices,’’ in _String Processing and_ _Information Retrieval - 30th International Symposium, SPIRE 2023, Pisa,_ _Italy, September 26-28, 2023, Proceedings_, ser. Lecture Notes in Computer Science, F. M. Nardini, N. Pisanti, and R. Venturini, Eds., vol. 14240. Springer, 2023, pp. 35–48. [64] N. Brisaboa, S. Ladra, and G. Navarro, ‘‘Compact representation of web graphs with extended functionality,’’ _Information_ _Systems_, vol. 39, no. 1, pp. 152–174, 2014. [65] S. Gog, T. Beller, A. Moffat, and M. Petri, ‘‘From theory to practice: Plug and play with succinct data structures,’’ in _Experimental Algorithms_ _- 13th International Symposium, SEA 2014, Copenhagen, Denmark, June_ _29_ _-_ _July_ _1,_ _2014._ _Proceedings_, ser. Lecture Notes in Computer Science, J. Gudmundsson and J. Katajainen, Eds., vol. 8504. Springer, 2014, pp. 326–337. [66] J. Larsson and A. Moffat, ‘‘Off-line dictionary-based compression,’’ _Pro-_ _ceedings of the IEEE_, vol. 88, no. 11, pp. 1722–1732, 2000. [67] A. Elgohary, M. Boehm, P. J. Haas, F. R. Reiss, and B. Reinwald, ‘‘Com pressed linear algebra for large-scale machine learning,’’ _The VLDB Jour-_ _nal_, vol. 27, no. 5, pp. 719–744, Oct 2018. [68] C. Hernández and G. Navarro, ‘‘Compressed representations for web and social graphs,’’ _Knowl._ _Inf._ _Syst._, vol. 40, no. 2, p. 279–313, aug 2014. [Online]. Available: https://doi _._ org/10 _._ [1007/s10115-013-0648-4](https://doi.org/10.1007/s10115-013-0648-4) [69] N. R. Brisaboa, T. Gagie, A. Gómez-Brandón, and G. Navarro, ‘‘Two dimensional block trees,’’ _Comput._ _J._, vol. 67, no. 1, pp. 391–406, 2024. [Online]. Available: https://doi _._ org/10 _._ [1093/comjnl/bxac182](https://doi.org/10.1093/comjnl/bxac182) [70] D. Belazzougui, M. Cáceres, T. Gagie, P. Gawrychowski, J. Kärkkäinen, G. Navarro, A. O. Pereira, S. J. Puglisi, and Y. Tabei, ‘‘Block trees,’’ _J._ _Comput._ _Syst._ _Sci._, vol. 117, pp. 1–22, 2021. [Online]. Available: https://doi _._ org/10 _._ [1016/j](https://doi.org/10.1016/j.jcss.2020.11.002) _._ jcss _._ 2020 _._ 11 _._ 002 [71] P. Boldi and S. Vigna, ‘‘The WebGraph framework I: Compression tech niques,’’ in _Proc. of the Thirteenth International World Wide Web Confer-_ _ence (WWW 2004)_ . Manhattan, USA: ACM Press, 2004, pp. 595–601. [72] P. Boldi, M. Rosa, M. Santini, and S. Vigna, ‘‘Layered label propaga tion: A multiresolution coordinate-free ordering for compressing social networks,’’ in _Proceedings of the 20th international conference on World_ _Wide Web_ . ACM Press, 2011. [73] F. Chierichetti, R. Kumar, S. Lattanzi, M. Mitzenmacher, A. Panconesi, and P. Raghavan, ‘‘On compressing social networks,’’ in _Proceedings_ _of_ _the_ _15th_ _ACM_ _SIGKDD_ _International_ _Conference_ _on_ _Knowledge_ _Discovery_ _and_ _Data_ _Mining_, ser. KDD ’09. New York, NY, USA: Association for Computing Machinery, 2009, p. 219–228. [Online]. Available: https://doi _._ org/10 _._ [1145/1557019](https://doi.org/10.1145/1557019.1557049) _._ 1557049 [74] P. Carazo, R. Apolloni, F. Castro, D. Chaver, L. Pinuel, and F. Tirado, ‘‘Re ducing cache hierarchy energy consumption by predicting forwarding and disabling associative sets,’’ _Journal_ _of_ _Circuits,_ _Systems_ _and_ _Computers_, vol. 21, no. 07, p. 1250057, 2012. [75] _Intel_ ® _64_ _and_ _IA-32_ _Architectures_ _Software_ _Developer’s_ _Manual_ _Volume_ _3B:_ _System_ _Programming_ _Guide,_ _Part_ _2_, Intel Corporation, 2024, order Number: 253669-060US. [Online]. Available: https://www _._ intel _._ [com/content/www/us/en/content-details/819715/intel-](https://www.intel.com/content/www/us/en/content-details/819715/intel-64-and-ia-32-architectures-software-developer-s-manual-volume-3b-system-programming-guide-part-2.html) [64-and-ia-32-architectures-software-developer-s-manual-volume-3b-](https://www.intel.com/content/www/us/en/content-details/819715/intel-64-and-ia-32-architectures-software-developer-s-manual-volume-3b-system-programming-guide-part-2.html) [system-programming-guide-part-2](https://www.intel.com/content/www/us/en/content-details/819715/intel-64-and-ia-32-architectures-software-developer-s-manual-volume-3b-system-programming-guide-part-2.html) _._ html [76] S. Jana, O. Hernandez, S. Poole, C.-H. Hsu, and B. M. Chapman, ‘‘An alyzing the energy and power consumption of remote memory accesses in the openshmem model,’’ in _OpenSHMEM_ _and_ _Related_ _Technologies._ _Experiences,_ _Implementations,_ _and_ _Tools_, S. Poole, O. Hernandez, and P. Shamis, Eds. Cham: Springer International Publishing, 2014, pp. 59– 73. [77] P. Henderson, J. Hu, J. Romoff, E. Brunskill, D. Jurafsky, and J. Pineau, ‘‘Towards the systematic reporting of the energy and carbon footprints of machine learning,’’ _Journal_ _of_ _Machine_ _Learning_ _Research_, vol. 21, no. 248, pp. 1–43, 2020. [78] G. Procaccianti, P. Lago, A. Vetrò, D. M. Fernández, and R. Wieringa, ‘‘The green lab: Experimentation in software energy efficiency,’’ in _2015_ _IEEE/ACM 37th IEEE International Conference on Software Engineering_, vol. 2, 2015, pp. 941–942. 19

섹션 본문 99문단 · 58,722자

(제목 없음)

1Sparse matrix-vector multiplication (SpMV) is a fundamental operation in machine learning, scientific computing, and graph algorithms.In this paper, we investigate the space, time, and energy efficiency of SpMV using various compressed formats for large sparse matrices, focusing specifically on Boolean matrices and real-valued vectors.Through extensive analysis and experiments conducted on server and edge devices, we found that different matrix compression formats offer distinct trade-offs among space usage, execution time, and energy consumption.Notably, by employing the appropriate compressed format, we can reduce energy consumption by an order of magnitude on both server and single-board computers.Furthermore, our experiments indicate that while data parallelism can enhance execution speed and energy efficiency, achieving simultaneous time and energy efficiency presents partially distinct challenges.Specifically, we show that for certain compression schemes, the optimal degree of parallelism for time does not align with that for energy, thereby challenging prevailing assumptions about a straightforward linear correlation between execution time and energy consumption.Our results have significant implications for software engineers in all domains where SpMV operations are prevalent.They also suggest that similar studies exploring the trade-offs between time, space, and energy for other compressed data structures can substantially contribute to designing more energy-efficient software components.INDEX TERMS green computing, lossless compression techniques, compressed matrix formats, matrix-tovector multiplications, computation-friendly compression, PageRank

I. INTRODUCTION

2T HE emergence of Machine Learning (ML) and, in par- ticular, Deep Learning algorithms has brought about significant advancements in computer vision (e.g., image classification [1], [2]), natural language processing (e.g., text classification [3]- [5]), speech recognition, information retrieval, and more.These advancements have led to increased network complexity, more parameters, greater demands for training resources, and longer prediction latency.

3Moreover, with the generation of vast amounts of data that exceed Moore's Law [6], [7], the storage and processing of this data for data science applications have become critical concerns.This is particularly evident in the context of Graph Databases (GraphDBs) [8], [9], which are emerging as the primary software architecture for applications requiring interconnected data modeling (i.e., data represented as graphs) 1 .Graphs are essential for network analytics and are increasingly vital in the context of large language models (LLMs) due to the advent of Retrieval-Augmented Generation, which enhances LLMs through the effective use of knowledge graphs [11]- [14].Efficiently storing and processing large graphs in terms of time and space remains a signif-icant challenge.

4For this reason, sustainability-oriented practices that leverage industrial big data to influence product innovation are gaining importance; the use of industrial big data mediates the relationship between sustainability orientation and product innovation [15].Furthermore, Green Computing and Green Software Engineering have emerged as responses to sustainability challenges, prompting a paradigm shift that integrates and partially deviates from traditional design, use, and management of computer hardware and software.Recent studies [16] estimate that the ICT sector currently accounts for 2.1-3.9% of global greenhouse gas (GHG) emissions.Machine learning significantly contributes to these emissions [17].Energy waste does not affect only data centers, but also small edge and IoT devices that rely on battery life as a critical requirement [18], [19].Hence, the growing awareness of energy consumption has sparked interest in green computing in the context of AI-enabled IoT infrastructures (AIoT) too.By ''greening data structures and algorithms,'' software engineers aim to reduce resource utilization, minimize power consumption, and extend battery life through improved algorithm design.However, [20] observes that programmers often lack experience with software-induced energy consumption, though they increasingly need to consider it a primary constraint when designing their software.

5In this paper, we draw attention to space-time efficient and low-carbon footprint representations of large matrices on server machines and resource-constrained devices, such as single-board computers.This problem poses scalability challenges for storage, operation, and bandwidth, both in serverclient transmissions and local computations.For example, in ML applications although training costs can be one-time, or even free with pre-trained models, deploying and running their inference capabilities over an extended period often results in expensive matrix-based computations for clientside RAM and CPU of edge and IoT devices.

6Compressed data structures provide a natural solution to mitigate storage occupancy while enabling efficient data transmission and offering opportunities for faster processing.Indeed, computation-friendly compressed representations [21] allow for indexing, querying, processing, and manipulating data directly in their compressed format without requiring any prior decompression, thereby saving memory usage and speeding up computations at run time.

7However, despite the critical role of matrix-to-vector computations in scientific computing, efficient machine learning inference, graph analysis, and more, to our knowledge, the only study that examines the actual impact of compressed data structures on energy consumption is that of Fuentes-Sepúlveda and Ladra [19], which focuses on compact integer representations.Given the above discussion, we believe that an analysis of compressed matrix representations from a green viewpoint may provide software engineers with a practical guide that can allow them to select the most energyefficient matrix format based on the time and space constraints of their problem.As a side outcome, with our paper, we aim to advance the knowledge of the relationship between lossless compression and energy consumption.

II. OUR CONTRIBUTION

8In this paper, we focus specifically on the space, time, and energy efficiency of matrix-to-vector multiplications using well-known compressed formats for large sparse binary matrices.Sparse matrix-vector multiplication (SpMV) is central to scientific computing applications, as it underpins the solution of sparse linear systems and sparse eigenvalue problems through iterative methods.Additionally, SpMV is essential for graph-analysis algorithms such as PageRank and centrality algorithms and is relevant for inference in binary machine learning models.

9The primary research questions we address in this paper are as follows: Q1 For matrix-vector multiplication, does compression lead to savings in space, time, and energy?Q2 Are time-optimized matrix formats the most energyefficient, and vice versa?Q3 In the context of matrix-vector multiplications, which runtime metrics (such as CPU cycles, number of instructions, and completion time) most significantly impact energy efficiency?In this study, we focus on the problem of efficient matrixto-vector multiplications, specifically when the matrix is sparse and Boolean, while the vector is real-valued.Computing the product of a binary adjacency matrix from a large graph with a real-valued vector is a crucial operation in various graph analytics tasks.Among these tasks, we consider the computation of the well-known PageRank score, which assesses the relevance of a Web page (see Section IV).This score has applications beyond the Web domain, and there are extensive datasets available for evaluating performance in real-world scenarios.

10We believe that the findings presented in this article will be of interest not only to the Network Analytics community but also to software engineers seeking efficient vector multiplications over binary and ternary matrices like the ones that occur in highly quantized large language models (LLMs).Indeed, binary and ternary LLMs [22]- [24] offer a favorable trade-off between space and accuracy, and can benefit from compressed binary matrix formats by deploying two matrices to represent the two non-zero values of the quantization.This would be particularly interesting in federated learning [25] because it would enable utilizing resource-constrained nodes such as smartphones or IoT devices, where battery life is a critical concern [26].

11Further, the inference and training stages of Graph Neural Networks (GNNs) are often dominated by the time required to compute lengthy sequences of matrix multiplications involving the sparse graph adjacency matrix and its embeddings.Motivated by this challenge, the authors of [27] recently published preliminary results showcasing efficient matrix multiplication kernels based on new compressed formats for binary matrices.However, their work remains largely in the early stages, and its scalability has yet to be validated, as the authors tested their results solely on adjacency matrices derived from networks of scientific co-authors and citations, which are relatively small in scale.The largest graph they evaluated contains only 540,486 nodes.In contrast, this paper considers matrix formats capable of processing datasets with millions of nodes, even on resource-constrained devices like Raspberry Pis (for instance, our dataset indochina-2004 has 7,414,866 vertices).

12From a technical perspective, we address the problem of compressing Boolean sparse matrices for subsequent fast matrix-to-vector multiplications by extending the results in [28] by experimentally analyzing three distinct matrixcompression formats: the grammar-based methods described in [29], the k 2 -tree [30], and Zuckerli [31], which is an enhanced version of WebGraph [32].The appeal of these formats stems from their ability to achieve significant space reduction on disk by exploiting data patterns beyond mere sparsity, while also ensuring that time performance scales with the size of the compressed matrix representation.It is important to note that dense formats requiring quadratic space would impose prohibitive space and time demands, even for matrices containing millions of nodes.

13In this paper, we have adapted each compression format to support matrix-to-vector multiplication across multiple threads.For each dataset, we measured the running time and energy consumption of the matrix-to-vector multiplications by executing the PageRank algorithm [33].We conducted our tests on two platforms: a multi-core Intel® Xeon® server utilizing up to 48 threads, with energy performance assessed via Intel RAPL [34], and a resource-constrained edge device (Raspberry Pi) using up to 8 threads, measuring energy consumption with a benchtop power meter.

14We summarize the main contributions of our paper as follows (additional details and contributions are provided in the next sections):

15• We provide an implementation of a multithread matrixto-vector multiplication algorithm based on the recently introduced Zuckerli compression format which is a tool improving the WebGraph algorithm in terms of compression ratios, yet providing a resource usage for decompression comparable to WebGraph.• Compared to [28], we evaluate a more recent and larger set of computation-friendly matrix representations.Additionally, we assess the impact of compression on energy consumption, testing not only single-threaded versions as in [28] but also multi-thread implementations.• Our analysis involves collecting metrics and comparing results on two different platforms: a multi-core Intel® Xeon® Gold machine and a single-board Raspberry Pi 4. For the Intel® Xeon®, we use the Intel RAPL software profiler to gather metrics, while for the Raspberry Pi 4, we utilize a power meter.• We examine the energy performance of the PageRank algorithm on both platforms and find that a careful selec-tion of the lossless compression format for the involved matrices can consistently yield energy savings of 1 to 2 orders of magnitude across all tested datasets and both platforms.

16• Concerning question Q1, we observe that although Zuckerli and the k 2 -tree are more space-efficient, they are generally slower and typically consume about an order of magnitude more energy than the grammar-based solutions presented in [29].• As for question Q2, we found that the simple model in which energy consumption grows linearly with completion time is not always accurate.Indeed, we plotted running time and energy consumption in terms of the number of threads and found that in some instances the optimal degree of parallelism for energy efficiency is lower than that for time efficiency, suggesting that it is more difficult to scale energy than to scale time.Hence, in some scenarios, software engineers should consider suboptimal time performance to attain energy-optimal executions, as our results suggest that slightly slower algorithms may result in greater energy savings.The remainder of the paper is structured as follows.In Section III we discuss related works.In Section IV we describe the PageRank algorithm and how we implemented it in our experiments.In Section V we discuss compressed matrix representations and we justify the choice we made for our experiments.Section VI describes our experimental setup, and Section VII illustrates and discusses the results of our experiments.Section VIII summarizes the lessons learned from our analysis and outlines suggestions for future work.

III. RELATED WORK A. GREEN SOFTWARE ENGINEERING

17As energy has become a leading design constraint for computing devices, hardware engineers and system designers are exploring new models and directions to reduce the energy consumption of their products.However, with green software engineering still in its infancy, most of the efforts in this field have been devoted to hardware-related issues (see, e.g., [35]), with little to no attention on green software [19], [36].

18The work of [36] advocates for energy management as a guiding principle in application coding and algorithm design, demonstrating that energy-aware hardware and software can reduce energy consumption in legacy applications.They show that increased parallelism not only decreases running time but also reduces energy usage.Their study explores various algorithmic patterns in energy-efficient design, revealing that some patterns yield greater savings; for example, they emphasize the critical importance of parallelizing reads over writes.

19The success of ChatGPT has further popularized ML algorithms, resulting in environmental consequences and rising financial expenses [37].The GPT-3 model, with its 175 billion parameters, exemplifies this problem, as each training iteration costs millions of dollars [3], not to mention the computational costs associated with experimenting with different hyperparameters.Similarly, a 2023 estimate [38] from OpenAI's CEO placed the training cost for GPT-4 at approximately 100 million dollars, indicating that the future of AI necessitates innovative and more sustainable approaches.[39] argued that the definition of Green Software in literature is rather fuzzy and chaotic, as one can find different terms such as green software, green by software, green in software, and the like.While ''green by'' solutions entail IT as a tool to meet sustainability criteria, ''green in'' techniques concentrate on software and hardware themselves.Green software refers to software for which energy performance can be measured and that promotes energy and resource savings compared to traditional, unoptimized software [40].These energy-related algorithmic optimizations, under the more favorable scenarios, can also reduce the application time and space requirements, thereby improving user experience; or, at least, they attempt to minimize compromise to service.

20Oversimplified models for energy complexity, such as the one proposed by [41], expressed as T + (PB) • I (where T is the completion time, I is the number of parallel I/Os, P is the number of memory banks, and B is the block size), measure energy consumption asymptotically but fail to capture the constants that reflect the dynamics of real-world machine architectures [36].

21[42] has recently surveyed the experiences and beliefs of IT engineers and practitioners regarding current best practices in architecting for sustainability.They concluded that researchers and practitioners view business motivations and short-term thinking as significant obstacles to genuine sustainability implementation.Both groups also agree that key challenges include a lack of consensus on the importance of sustainability and an absence of knowledge regarding concrete measures that can be taken.Further, [43] has suggested that power-oriented source code optimizations often do not justify the average programmer's time investment.While source-level power tuning may be effective for tiny embedded programs, it frequently proves challenging for larger production software.

22To address the lack of a reference model for assessing software sustainability and the absence of consensus on measurement setups, methods, and techniques for energy data analysis, [40] has published a reference model this year called the Green Software Measurement Model (GSMM) along with a glossary based on the ontology presented by [44].This model, which encapsulates a decade of research by groups from four countries, encourages further contributions from researchers and practitioners within the (Green) Software Engineering community.

23The proposed model emphasizes the significance of power meter devices and advanced software profilers like Intel RAPL for accurate energy profiling estimations.It also underscores the importance of carefully selecting metrics-including CPU and GPU usage, duration, mean power draw, energy consumption, and network traffic-to develop a comprehensive model for profiling an application's energy usage.

24Measuring software-induced energy and resource consumption is essential for assessing and mitigating the environmental impact of software.Notable frameworks for measuring energy consumption include the Software Energy and Resource Efficiency Analysis (SERENA), developed at Umwelt-Campus Birkenfeld and based on the work of [45]; the Green Software Measurement Process (GSMP) [46]; the Sustainability Assessment Framework (SAF) Toolkit2 ; the Green Metrics Tool3 ; the Cloud Energy Usage Estimation Model based on the research of [47]; the Software Footprint 4 ; the Emission Estimation Framework from the Sustainable Digital Infrastructure Alliance (SDIA) based on [48]; and the Container Overhead Measurement Methodology introduced in [49].We refer readers to the survey by [40] for a thorough description of these models and their respective application areas.

25Notwithstanding these substantial advancements, the pioneering work of [19] on green compacted data structures argues that among the previous work related to energy efficiency, there is little research within the core area of Algorithmics, with many contributions such as [50], [51] focussing on energy-saving mechanisms based on speed scaling or powerdown mechanisms, where a machine is scheduled to switch between a set of active states (standby, suspend, sleep, fulloff), each with its consumption rate.

26The increasing size of large language models (LLMs) has posed challenges for deployment and raised concerns about their environmental impact due to high energy consumption.Recent proposals, such as Bitnet [52], aim to introduce a 1bit Transformer architecture specifically designed for LLMs, which can greatly benefit from compact binary formats and optimizations for space, time, and energy in sparse matrixvector (SpMV) computations.Additionally, LLMs quantized to three values (-1, 0, +1), as demonstrated in [22], can also leverage efficient binary matrix formats and SpMV techniques.Ternary matrices can be represented using two distinct binary formats: one for the -1 values and another for the +1 values.The use of binary or ternary formats, as opposed to real-valued ones, allows the replacement of multiplications over FP32 with summations and subtractions between FP32, which are faster in modern computer architectures [24], [53].

27In this paper, we address the challenge of energy conservation from the perspective of green algorithm engineering, focussing on the design of energy-efficient algorithms that minimize energy consumption.

B. PARALLEL PROGRAMMING

28It is well-known that parallel programming has great potential for effectively reducing power consumption.Most modern computer systems are based on CMOS (Complementary Metal-Oxide Semiconductor) technology, whose dynamic power consumption varies proportionally to the cube of the voltage.Let's assume a certain software achieves a 1.5× speedup using two cores.A software engineer can exploit this speedup to reduce latency or power [54, §2.5.3].Assuming the latency requirement is already met, reducing the clock rate by 1.5× can save significant energy.Denoting the energy consumption of the single-threaded application as P 1 and the data-parallel one as P 2 , the following relation holds

29where the factor of 2 is due to having two cores.Another common strategy to save energy with parallel computing is to complete the computation as quickly as possible, allowing all threads to be put into a low-power sleep mode, which consumes much less energy [54, §2.5.3].The authors of [43] show that idle or sleep states can yield up to 19% energy savings and can be easily combined with other energy-saving approaches, also suggesting that increasing parallelization from 1 to 16 threads can save energy for many applications, even the poorly scaling ones.This result is particularly critical for mobile devices, where parallelism can reduce the time the device is powered on (display and other components), yielding a better user experience and reduced energy consumption.

30To exploit the potential of parallel computing in green algorithm engineering, we implement and test data-parallel versions of all our code; cf.Section VI-E.

IV. THE PAGERANK ALGORITHM

31We selected the PageRank algorithm [55, §21.2] as an example of an important algorithm involving a sparse and usually highly compressible matrix.The PageRank algorithm was first used by Google's search engine to evaluate the relevance of Web pages, modeled as vertices in a Web graph.

32Given a directed graph G = (V , E) modeling the Web with n = |V | vertices (pages) and m = |E| edges (links), let A be its adjacency matrix, where A uv = 1 if and only if there is a link from vertex u to vertex v; A uv = 0 otherwise.The normalized adjacency matrix M is defined as

33where D is a diagonal matrix whose diagonal elements d u = v A uv contain the out-degree of each vertex u.M is the socalled random-walk matrix, where a random walker at vertex u jumps to a neighbor v of u with probability 1/d u .

34The graph G may have dangling vertices, namely vertices having no outward edges.To avoid a random walker getting stuck in such vertices, PageRank adds all possible outward edges to all graph vertices.This is equivalent to substituting all empty rows of M with the vector ⃗ 1/n.This modification ensures that M is a stochastic matrix, meaning that for each matrix row i, it holds that n j=1 M ij = 1.Moreover, for convergence reasons, PageRank introduces the teleport step: When reaching a vertex, the random walker selects with some fixed probability (say 0 < α < 1) whether it has to continue by traversing a graph edge or jump to a random vertex in the graph.In their original paper [33] Brin and Page suggest setting α = 0.15.With the above notation, the PageRank vector giving the relevance of each page is computed by the unique limit of the sequence [56]

35In [33], the initial probability distribution ⃗ π 0 is set to ⃗ 1/n; however, it can be any non-zero vector and still guarantee convergence to the same PageRank vector.

A. IMPLEMENTATION DETAILS

36In PageRank implementations, the iteration 2 is repeated until the difference between two consecutive estimates |⃗ π t − ⃗ π t−1 | goes below an assigned threshold.The convergence of the method is guaranteed by the mathematical properties of the iteration matrix.In practice, we do not explicitly build the matrix M = D −1 A but, instead, we operate with the adjacency matrix A of the input graph.The diagonal matrix D is represented by an array O [1, n], where the entry O[u] represents the out-degree d u of vertex u.Formula 2 involves left products, but since most compressed matrix representations are row-oriented, meaning they represent matrices in row-major order, it is a standard practice [28] to transpose formula 2 so that the left matrixvector product becomes a right product involving M t = A t D −1 .Note that D −1 t = D −1 , since D is a diagonal matrix.

V. COMPRESSED MATRIX REPRESENTATIONS A. WEBGRAPH AND ZUCKERLI

37Many (binary) graphs extracted from the Web contain redundancies and dependencies that can be exploited by proper compression tools to reduce the storage size of these graphs.The first ad-hoc compression method for Web-related graphs, WebGraph [32], was proposed over 20 years ago.It effectively compresses adjacency lists by leveraging the similarities between lists of close-by vertices within a graph.As an example, Web pages within the same domain often share outgoing links to a common set of destination pages.Therefore, such common links can be represented once in a list from which subsequent lists can be copied.WebGraph exploits this copying property to compress each adjacency list based on a reference list.Although it was originally implemented in Java, it has since been translated into C++ [57]; lately, WebGraphs's original authors also published a Rust implementation [58].

38Zuckerli [31] is a more recent compression method for Web graphs that applies advanced compression techniques and novel heuristics on top of WebGraph, further improving its compression.Zuckerli provides both a compressed representation based on the Asymmetrical Numeral Systems (ANS) [59] encoding for storage and one based on Huffman encoding [60, §12.1] [61, §16.3], allowing fast direct access to the individual adjacency lists of the compressed graph without decompressing it in its entirety.

39The authors of [28] observed that these graph representations provide a computation-friendly framework for efficient right matrix-to-vector multiplications.The main idea is to exploit the copy-property of adjacency lists between vertex v i and its reference v ri so that it is easy to evaluate v i • x by simply copying the result of v ri • x and then summing up the contributions of the differences between the adjacency lists of v i and v ri .We build upon this idea to carry out matrix-tovector multiplications on top of Zuckerli-compressed matrices.We used the code from Google's GitHub repository https: //github.com/google/zuckerliand Zuckerli's default compression settings.

B. K2-TREE

40The k 2 -tree [30] [21, §9.2.1] is a compact data structure designed to compress adjacency matrices of size n 2 , by exploiting the sparsity and clustering of 1's.The data structure underneath the k 2 -tree is a k 2 -ary tree where each vertex represents a submatrix of the adjacency matrix.For simplicity, the size is zero-padded to the next power of k 2 .The tree root represents the whole matrix and each of its children represents a submatrix of size n 2 /k 2 .If a submatrix is empty (i.e., it contains only 0's), the corresponding vertex is represented by a bit set to 0. In all other cases, the corresponding vertex is represented by a bit set to 1. Once the first level is built, the procedure continues recursively only into the submatrices with 1's, by splitting each of them into k 2 smaller submatrices.Thus, the height of a k 2 -tree is always 1 + log k n, independently of the specific distribution of 1's and 0's within the input matrix; the access to a single cell costs O (log k n).Note that a submatrix is not split further when full of 0's.

41Figure 1 depicts the k 2 -tree (k = 2) for a 8 × 8 binary matrix.The arrows in the figure are included just for the sake of presentation, but the actual implementation of the k 2 -tree is pointer-free because it consists of a mere sequence of bits.The k 2 -tree represents the submatrices in row-major order; lower levels of the k 2 -tree correspond to smaller submatrices, with the root representing the original matrix and the leaves representing single cells.

42Recently, [62], [63] have shown that the k 2 -tree allows for carrying out matrix-to-matrix sums and multiplications in the compressed domain, yielding the resulting matrix directly in its compressed k 2 -tree representation and without the need of constructing rank data structures.In this paper, we are interested in right matrix-to-vector multiplications, for which we do not need rank support over the bit vectors representing the k 2 -tree; indeed, a simple visit to each tree node performed in any order is enough to implement the multiplications underneath our PageRank calculations.

43For our experiments, we run the C++ implementation of the k 2 -tree made available on the website of the University of A Coruña [64] at https://lbd.udc.es/research/k2tree/.

44Other implementations have been made available in the SDSL library [65] at https://github.com/simongog/sdsl-lite/blob/master/include/sdsl/k2_tree.hppor, more recently, in the codebase of [63] at https://github.com/adriangbrandon/rpqmatrix/tree/main/lib/matrix_gn.We have experimented with all those and found that these latter two did not outperform in space, time, and energy the one implemented at A Coruña on our tested datasets; thus we finally resolved to use the version of A Coruña in our experiments.We however modified this version by removing all rank-related data structures, as we do not need them for the multiplications, thus using slightly less space than the implementation in [64].

C. REPAIR COMPRESSED MATRICES

45The technique of matrix multiplications on RePair compressed matrices (mm-repair, for short) has been introduced in [29]; it compactly represents the non-zero entries of a matrix using a grammar that captures regularities between rows, reducing the representation size and speeding-up matrix operations.

46Given a matrix M , the scheme firstly produces a representation consisting of a dictionary V of distinct values and a sequence S containing column-value pairs, as shown in Figure 2. S is obtained by scanning the matrix M row-by-row: each non-zero entry m ij in M is represented in S by the pair ⟨ℓ,j⟩, where ℓ is the index of the value m ij in V .At the end of each row, a unique delimiter $ is appended to S. Note that the above scheme works for any real-valued matrix M , though in this paper the input matrices are binary; thus, the dictionary V only contains the value 1.

47The sequence S is then compressed using RePair [66] that computes a grammar representing S. RePair's output consists of the rules set R and a final sequence C of non-terminals interleaved with the row delimiter $.For our example matrix M , the set R (eight rules of the form N i → A i B i ) and the sequence C are shown in Figure 3 with a green background.The representation of M thus consists of the triplet (R, C, V ).We now quickly review how this representation supports right and left matrix-to-vector multiplications, without the need for decompressing the entire matrix, taking time O(|R|+|C|) and using O(|R|) additional space.For the underlying theory and a thorough explanation of this scheme, the reader is referred to the original article [29].

48For right multiplications y = Mx, we perform a single scan over the rules R of the grammar from the first grammar rule up to the last one and evaluate the contribution of each rule given the values of the vector x.To evaluate a terminal symbol ⟨ℓ,j⟩, we perform the product eval x (⟨ℓ,j⟩

49For each nonterminal symbol N i appearing on the left-hand side of rule N i → A i B i , we evaluate the sum eval x (N i ) = eval x (A i ) + eval x (B i ).We store the results of the evaluated nonterminals in an auxiliary array W (dashed in Figure 3) whose size is Θ(|R|).The components of the resulting vector y are eventually determined by evaluating the nonterminals appearing in C. Figure 3 illustrates the procedure to rightmultiply M by the vector x = (2.0,0.0, 2.0, 4.0), with the

50V = ( 2.0 4.1 5.

513 ) values W in the blue arrow corresponding to the evaluations of terminals and nonterminals of the grammar.

52To carry out a left multiplication y t = z t M , we follow a dual procedure scanning the rules backward.The left-hand side of Figure 3 schematizes the left multiplication z T • M , with z T = (1.0,0.0, 1.0, 2.0, 1.0).To begin with, if a nonterminal N i appears in position j of C, we initialize

53Then we scan the rules bottom-up and for each rule N i → A i B i we increase the entries corresponding to A i and B i by the value of W [i]. Eventually, for each non-terminal symbol ⟨ℓ,j⟩ appearing on the right-hand side of the ith rule, we increase the zero-initialized component y[ℓ] of the product vector y by the quantity

54Experiments in [29] have shown that R and C can be further compressed resulting in more compact representations that require the on-the-fly decompression of R and C. In this paper, we have experimented with the following three variants:

55Re32: R and C are no further compressed and are represented as 32-bit integers; this is the fastest variant.Reiv: R and C are represented as packed arrays, with entries of 1+log 2 N max bits (N max being the largest value in R or C).In our implementation, we used the class int_vector from the sdsl-lite library [65].Reans:R is represented with a packed array and C is represented with the ans-fold entropy encoder from [59]; this is the variant achieving the maximum compression.

D. OTHER COMPRESSED MATRIX FORMATS

56RePair-compressed matrices can be regarded as a generalization of the Compressed Linear Algebra (CLA) system [67] which uses simpler compression schemes.We did not test CLA since the experiments in [29] have shown that matrix multiplication with RePair-based algorithms is faster and uses much less memory than CLA, especially for highly compressible matrices.

57Another matrix compression scheme that supports matrixvector multiplication in time proportional to the compressed graph size is the bicliques representation [68].A biclique is a pair of vertex sets ⟨S, T ⟩ such that every vertex in S is connected to every vertex in T .Thus a list of |S| + |T | vertex id's is sufficient to encode all |S| • |T | edges.The edges not belonging to a biclique are compressed separately, for example employing a k 2 -tree.With a proper algorithm for extracting bicliques, the resulting representation can be very space efficient for Web and social graphs, and it can be adapted to support matrix-vector multiplication [28].We did not test this approach since only a proof-of-concept implementation is available.

58Another recently introduced compressed representation of binary matrices is the Two-Dimensional Block Tree (2DBT) [69] that combines the idea of recursive subdivisions of the k 2 -tree with copying redundant portions of the input, a feature introduced by the Block Tree [70].At its core, the 2DBT is an enhanced k 2 -tree that includes an option to represent submatrices containing a single 1 in constant space and an option to store a submatrix (called target) as a copy of a previous submatrix of the same size (called source).As for

59the space, the 2DBT has the potential to outperform the k 2tree; however, the problem of matrix-vector multiplication with this matrix representation has not been considered to date.Indeed, the design of a multiplication algorithm running in time proportional to the size of the 2DBT compressed representation appears to be a non-trivial problem.For this reason, we resolved not to test 2DBT in our experiments.

VI. EXPERIMENTAL SETUP A. TRANSPARENCY AND REPRODUCIBILITY

60The entire codebase to reproduce the experiments of our paper is made available at https://gitlab.com/ftosoni/green-losslessspmv.We used different real datasets from WebGraph framework [71], [72], available from https://sparse.tamu.edu/LAW;Ta-ble 1 reports their specifications.As shown in the last column, most graphs are Web graphs, in that they derive from crawlings of one or more Web domains.The vertices in these graphs follow the lexicographical order of their reversed URL.It has been empirically observed this helps compression since adjacent rows usually have very similar 0/1 patterns.Though the PageRank algorithm has been designed for Web graphs, we have also included two social network graphs to measure the effectiveness of the compression algorithms in different settings.hollywood-2009 is a graph of movie actors.Vertices are actors, and two actors are joined by an edge whenever they appear in a movie together: this is the only symmetric graph in the collection.ljournal-2008 is a directed graph described in [73] and representing friendships in the social network LiveJournal.In this social network, the notion of friendship is asymmetric, and thus the graph is directed.

C. COMPUTER ARCHITECTURE

61We compiled and executed our codes on a Non-Uniform Memory Access (NUMA) server machine equipped with 2 sockets, each having 14 Intel® Xeon® Gold 6132 CPU @ 2.60GHz, for a total of 28 physical cores.The logical cores are 56 due to Intel® Hyper-Threading.The machine is equipped with 12 memory modules of DDR4 RAM, each of them having a capacity of 32 GB for a total of 384 GB of installed memory.The memory modules work at a velocity of 2666 MT/s.The machine runs Ubuntu 22.04.3Long-term support (LTS) in 64-bit mode.Each of the 28 cores has L1d (896 KiB), L1i (896 KiB), and L2 (28 MiB) caches.Further, each of the two sockets has an L3 cache, whose size is 38.5 MiB.As for the cache associativity of L1 and L2 caches, which have become a major source of energy consumption [74], our L1d and L1i caches are 8-way set associative; the L2 caches are 16-way set associative; and the L3 caches are 11-way set associative.

62We repeated the experiment on a resource-constrained single-board computer: a Raspberry Pi 4 model B, equipped with four ARM Cortex-A72 CPUs clocked at 1.5GHz.Each of the four cores has its own L1d and L1i cache memories (128+192 KiB); the single shared L2 cache has a size of 1 MB.L1d, L1i, and L2 cache memories are 2-, 3-and 16way set associative.The device has 4 GB of Low Power Double Data Rate 4 Synchronous Dynamic Random-Access Memory (LPDDR4 SDRAM).The machine runs a 64-bit Ubuntu Server 24.04 LTS.For the experiment on this device, we used the datasets with less than 10 7 vertices (cf.Table 1), namely eu-2005, hollywood-2009, in-2004, ljournal-2008, and indochina-2004.

D. CODE SETUP

63As a preprocessing step for our experiments, we extracted the adjacency matrix A from each dataset, transposed it, and compressed it via Zuckerli, the k 2 -tree and mm-repair (see Section V).We also precomputed and stored on disk the array O [1, n] of the out-degree for each vertex.For each All tested codes were written in C/C++ and compiled via the flag -O3, which enables the highest level of optimization that the compiler can perform, including function inlining, loop unrolling, and Single Instruction Multiple Data (SIMD) instructions.The authors of [43] showed that GCC's -O3 option offers significant energy savings, as -O3 optimized software consumes less than 43% of -O0 optimized.

E. DATA PARALLELISM

64In light of the motivations presented in Section III-B, we implemented and tested a data-parallel solution for all the tested matrix formats.We divided each matrix into as many row blocks as the number of threads.We compressed each block using the tested matrix formats and then ran a data-parallel PageRank on top of the compressed blocks.We followed this approach since right matrix-to-vector multiplications are embarrassingly parallel, meaning they do not require any specific synchronization data structure beyond a simple barrier to ensure each thread has completed its assigned job.For each algorithm, we forked and joined different threads in C/C++ using standard mechanisms based on POSIX Threads (Pthreads).

F. POWER MEASUREMENT

65As in [19], for the Intel® Xeon®, we measured the power consumption of our server machine during PageRank calculations by using the Intel RAPL (Running Average Power Limit) interface [75].RAPL works by aggregating the values of several specialized Model Specific Registers (MSRs) to estimate the energy consumption at the core level (all cores in a processor), package level (all cores, memory controller, last-level cache, and other components), and DRAM memory level.Depending on the processor model (in our case, Intel® Xeon®), one may have access to the energy estimation at the core and package levels, which is the case in our experiments.

66Consistent with [19], we present the energy estimation at the package level.Previous studies on energy consumption [34], [76] have demonstrated that RAPL provides reasonably accurate measurements.RAPL is central to the Scaphandre measurement and visualization tool 5 and is also utilized by CodeCarbon 6 and the Experiment-Impact Tracker [77].Additionally, it is integrated into Green Lab [78] and the Green Metrics Tool (GMT), developed by Green Coding Berlin, as cited in [40].

67We used the Linux profiler perf (version 5.15.149) to obtain the Intel RAPL energy estimations.perf also allows us to measure additional metrics, such as CPU cycles, cache hits and misses of the L1 and last-level caches, and the number of instructions.

68In our experiments with the single-board CPU, we measured the current drawn during PageRank computations by connecting a Fluke 8845A benchtop multimeter in series with the USB-C power cable of the board.The multimeter was configured to a range of 10 A, with a resolution of 4½ digits, and a sampling frequency of 3 Hz.Taking into account the frequency spectrum of the current signal, we believe that this sampling rate is adequate for accurately reconstructing the signal with high fidelity.

G. COLLECTED METRICS

69Table 2 tabulates the disk occupancy for the single-threaded matrix formats as bits per edge; the two rightmost columns report, for the sake of comparison, the space on disk for the same matrix compressed using gzip and xz in their default setting: we compressed using either a 32-bit representation of the edge descriptions for each graph, consisting of sourceId-destinationId pairs.One can see that, in terms of disk occupancy, re_32 > re_iv > re_ans > k 2 -tree > Zuckerli.gzip is sometimes better and other times worse than Zuckerli, and xz is the most succinct representation.However, we stress the fact that experiments on matrix-vector multiplications in [29] showed that gzip is at least an order of magnitude slower than algorithm re_32; we did not test multiplications based on on-the-fly decompression for xzcompressed matrices since xz is even slower in decompression than gzip.For these reasons, we did not test Pagerank on gzip-or xz-compressed matrices.

70In all our experiments we measured the peak memory usage (PMU) for PageRank executions using the command-line time utility and we report it using again the number of bits per edge, as in Table 2.The PMU will be consistently larger than the disk usage reported in Table 2 for two factors: the first one is that the execution of the algorithm requires additional temporary data structures, and the second one is that splitting the matrix into blocks, to support multithread multiplication, usually reduces the overall compression.

A. EXPERIMENTS ON THE INTEL XEON SERVER

71Figure 4 shows the total elapsed time for 100 iterations of PageRank as a function of the peak memory usage (PMU) in bits per edge.We use markers to differentiate algorithms.Each subfigure represents a different dataset and shows nine data points for each algorithm representing executions with 1, 2, 4, 8, 16, 24, 32, 40, and 48 threads.We observe that Zuckerli is generally the most compressed but the slowest solution, while re_32 is the fastest, albeit more space-consuming.When using a single thread, the k 2 -tree is often more than 3× faster than Zuckerli; for the datasets eu-2005, in-2004, and uk-2005, the k 2 -tree outperforms Zuckerli across all degrees of parallelism, resulting in approximately 3× more lightweight in space.For the remaining six datasets, the single-threaded k 2 -tree requires 2× more disk space than Zuckerli which, however, degrades significantly faster with increasing parallelism.We believe this is due to Zuckerli's more complex compression strategy, which involves a sophisticated method for selecting the reference list to represent each adjacency list.Indeed, as the degree of parallelism increases, the dimension of the adjacency-matrix row block assigned to each single thread decreases, leading to a reduction in the number of candidate reference lists for each adjacency list.

72The single-threaded grammar-based solutions re_32, re_iv, and re_ans provide faster alternatives, but they are approximately 1.5× more space-consuming than Zuckerli and the k 2 -tree.Recall that the grammar-based compressors can in principle handle any input matrix, that is, they are not specialized to binary matrices such as Zuckerli and the k 2tree.In addition, the grammar-based algorithms also support efficient left matrix-to-vector multiplication, which though not needed in our PageRank implementation, is essential for instance in conjugate gradient methods [29].Among the grammar-based algorithms, re_ans is often the most space-efficient.However, as the number of threads increases, its space requirements increase significantly compared to re_32 and re_iv, which are more robust and less sensitive to increases in thread count.

73In our green computing scenario, we are particularly interested in the energy consumption of the different algorithms.Figure 5 compares the time (dashed lines) and energy (solid lines) performances of PageRank computations, on a semilogarithmic scale, as a function of the number of threads.As anticipated, performance improves with increasing degrees of parallelism until the optimal level is reached.Beyond this point, no further speedup occurs, and the algorithms may even experience slower execution times.We immediately observe that increasing the number of threads beyond the optimal parallelism degree for time often results in worse energy efficiency.In examining the energy performances reported in the same graph, it becomes clear that energy does not scale as well as time.Energy savings are generally more limited than time savings, and the optimal parallelism degree for energy is usually lower than that for time.This trend is consistently evident, particularly for the slower algorithms, namely Zuckerli and the k 2 -tree.For instance, for hollywood-2009, time performance keeps slightly improving up to at least 40 threads, while energy consumption does not decrease beyond 16 threads.In the cases of in-2004 and Zuckerli, we find an optimal parallelism degree for the time performances for 24 threads, while energy consumption does not decline past 8 threads.

74This observation challenges the traditional rule of thumb that energy optimization strategies are equivalent to time optimization strategies.Rather, our experiments suggest that software developers of multi-threaded scientific computing should adopt a multicriteria approach, taking into account both time and energy performance.For example, they could select the fastest solution that meets specific energy consumption constraints.

75To gain a clearer understanding of the performance of various algorithms, Figure 6 illustrates the cycles-per-instruction throughput, as reported by the perf profiler, in relation to the degree of parallelism.A lower number of cycles per instruction indicates higher instruction throughput and, consequently, enhanced energy efficiency per unit of time for the tested algorithms.Among these, Zuckerli and the k 2tree exhibit the fewest cycles per instruction.However, it is important to note that these two formats have higher overall energy requirements; their more compact nature necessitates more instructions, resulting in longer completion times and increased energy consumption.We believe that the lower cycles per instruction observed are due to the greater memory requirements of grammar-based solutions, which lead to more cache accesses, potentially causing pipeline stalls and increased latencies at the hardware level.

76Interestingly, the throughputs of Zuckerli and, in particular, the k 2 -tree tend to decline as the number of threads increases.In contrast, for the grammar-based approaches, the number of cycles required for each instruction initially follows a monotonically decreasing trend up to a parallelism degree of 8, followed by an increase up to 24 threads, and then decreases again.

77Figure 7 illustrates the number of accesses to L1 data caches (L1D) for each matrix format as a function of the degree of parallelism.The total height of each bar represents the overall number of operations in the L1D cache, calculated by summing the number of load cache misses (red), load cache hits (green), and store operations (blue).The x-axis denotes the degree of parallelism, with each group of five bars corresponding to the five tested compression algorithms, presented in the following left-to-right order: Zuckerli, k 2tree, re_ans, re_iv, and re_32.

78More succinct formats, such as Zuckerli, require fewer cache loads, resulting in fewer cache misses.The number of cache operations for Zuckerli increases with the degree of parallelism.In contrast, re_iv and re_32 often exhibit non-monotonic behaviors; for example, in the hollywood-2009 dataset, the number of operations for re_32 decreases when scaling from 1 to 2 threads, but then increases again at least up to 32 threads.Similarly, for the hollywood-2009 dataset, the number of operations for re_iv and re_ans decreases initially, reaching a minimum at 4 threads, after which they rise again.The number of operations for the k 2 -tree also follows a non-monotonic pattern, decreasing up to 24 threads.

79Similarly, Figure 8 shows the number of accesses to the L3 caches.In this case, we observe for most datasets and formats a reduction in the number of accesses as the degree of parallelism increases.

80As noted in [19], the efficiency of cache accesses can help explain instruction throughput.Algorithms that make better use of cache hierarchies -specifically those that predominantly reside in L1 caches-exhibit higher instruction throughput compared to those that heavily rely on L3 caches.For instance, in the PageRank computations performed on the k 2 -tree for the dataset ljournal-2008, we observe that the number of L3 cache accesses increases monotonically up to 32 threads and then decreases, mirroring the behavior shown in Figure 6.For the same dataset, when analyzing Zuckerli, we observe a decrease in L3 cache accesses, followed by an increase after 16 threads, a subsequent decline at 32 and 40 threads, and a final increase at a parallelism degree of 48.This pattern closely resembles the instruction throughput depicted in Figure 6.

81This relationship between L3 accesses and cycles per instruction appears also in other datasets, particularly for Zuckerli, which is the slowest algorithm.Furthermore, we notice that the overall decrease in L3 accesses for Zuckerli often corresponds to an increase in L1D accesses, as shown in Figure 7.This suggests that Zuckerli achieves higher instruction throughput by utilizing L1 caches more effectively than L3 caches.

B. EXPERIMENTS ON THE RASPBERRY PI

82To validate our results, we repeated the PageRank computations on an ARM-based Raspberry Pi (see the specifics in Section VI-C).Due to the limitations of this architecture, we only considered the five smallest graphs and ran the algorithms with only 1, 2, 4, and 8 threads.In addition, since we noticed in Figure 4 that re_iv and re_ans exhibit similar behaviors, we included only re_ans in this set of experiments.

83Figure 9 illustrates the space-time performances on the Raspberry Pi.We observe that time and space are not always monotonic when scaling from 4 to 8 threads, as PMU and completion time increase, notably for Zuckerli.In three out of five datasets, Zuckerly is the most compact, while in the remaining two datasets, the k 2 -tree demonstrates superior compactness.Regarding time performance, the ranking positions the grammar-based solutions re_32 and re_ans as the fastest, followed by the k 2 -tree, with Zuckerly trailing behind.The grammar-based solutions achieve speeds at least 2× faster than the k 2 -tree, albeit at the cost of significantly increased memory usage.In comparing Figure 4 with Figure 9, we observe that on the Raspberry PI, even the single-threaded version of the k 2 -tree has faster completion time than all Zuckerli parameterizations across all datasets: on the Intel® Xeon® for hollywood-2009 and ljournal-2008 Zuckerli with 4 threads resulted in faster computations than the single thread k 2 -tree.

84Figure 10 shows time and energy usage as a function of the number of threads.As we mentioned in Section VI-F since RAPL data is not available on the Raspberry Pi, the energy consumption was estimated by measuring the input current during the computation.This substantially different measurement technique yields results that align well with those for the Intel® Xeon®, considering that we used at most 8 threads since the Raspberry has only 4 cores.Since the time-energy behavior in Figure 10 substantially confirms those of Figure 5, we omit reporting the metrics we captured for L1d caches for the Raspberry Pi (keep in mind that the Raspberry Pi does not have any L3 caches).

85Even for the Raspberry Pi, we observe a convex trend, particularly with Zuckerli.In this case, allocating additional threads (8 threads, exceeding the 4 available cores) prolongs completion time and increases resource utilization, resulting in greater energy inefficiency.In contrast, the data for Zuckerli on the Intel® Xeon® machine in Figure 5 exhibit a less pronounced convex trend when scaling to high levels of parallelism.We believe that, in the server environment, when approaching the optimal parallelism degree, the increased energy required to operate with more threads offsets the benefit of slightly faster execution gained from the time speedup.Overall our results suggest that the qualitative behavior observed on the Intel® Xeon® server can be extended to resource-constrained edge devices.

VIII. CONCLUSION AND FUTURE WORK

86We have tested the running time, disk occupancy, memory usage, and energy consumption of three different algorithms for binary SpMVs, using them for computing the PageRank of large Web graphs and social networks.The main lessons we learned from our study can be summarized as follows.

87• By employing an appropriate compressed representation, we can effectively tackle problems involving large datasets, even on resource-constrained devices.• Different algorithms exhibit different space-time tradeoffs, which can be significantly influenced by the number of available threads.

88• For PageRank computations, the k 2 -tree appears to be the safe middle-ground choice: it is nearly as fast as grammar-based compressors and almost as spaceefficient as Zukerli.Additionally, it shows the least deterioration in compression ratio as the number of threads increases.• Energy consumption is not solely proportional to running time, therefore it should be measured independently in critical scenarios.This is especially evident when considering the number of threads: our experiments show that the optimal number of threads for minimizing energy usage may differ from that for optimizing running time.We believe that further research in this area could lead to new theoretical challenges regarding the optimization of energy and the implementation of multicriteria time-energy solutions.

89• The experiments demonstrate that by carefully selecting the compressed representation, energy usage can be reduced by one or two orders of magnitude.This reduction is observed in both server scenarios and when using a single-board Raspberry Pi.

90• Regarding question Q3, our results presented in Figure 7 and Figure 8 indicate that an increase in L1 and L3 cache operations impacts the cycles per instruction rate shown in Figure 6.This, in turn, affects overall time and energy performance, providing evidence that inadequate utilization of the cache hierarchy can degrade instruction-perclock-cycle throughput, leading to increased latencies and energy inefficiencies.

91For future work, we plan to explore additional lossless compression formats for matrices and vectors and investigate applications beyond PageRank.We believe that in-depth research in this area can uncover new theoretical challenges related to optimizing the energy-time tradeoff, providing valuable insights for software engineers seeking to reduce carbon footprints and extend the battery life of their solutions.We also intend to study cross-platform energy-efficient implementations of other major compressed data structures, such as the FM-index, rank and select support structures, suffix arrays, and succinct tree topologies.This work will demonstrate the potential of data compression to reduce carbon footprints across diverse platforms and applications.

92In the context of ML optimization, we propose exploring combinations of lossless tools with state-of-the-art lossy compression strategies.This approach aims to strike a balance between space and accuracy, allowing us to leverage the strengths of both methods and evaluate their effectiveness.

FIGURE 1 :

93FIGURE 1: A 8x8 binary matrix (a) and the corresponding k 2 -tree (b).

FIGURE 2 :

94FIGURE 2: A matrix M (a) and the corresponding (V , S) representation (b).

1 FIGURE 5 :

95FIGURE 5: Time performance in seconds (dashed line; left y-axis) and energy usage in Joules (solid line; right y-axis) on the Intel® Xeon® as a function of the number of threads (x-axis).

1 FIGURE 6 :

96FIGURE 6: Number of cycles per instruction (y-axis) as a function of the parallelism degree (xaxis) for 100 iterations of PageRank on the Intel® Xeon® Gold.

1 FIGURE 9 :

97FIGURE 9: Bits per edge (x-axis) and elapsed times (y-axis) for 100 iterations of PageRank on the Raspberry Pi, for 1, 2, 4, and 8 threads.

1 FIGURE 10 :

98FIGURE 10: Time performance in seconds (dashed line; left y-axis) and energy requirements in Joules (solid line; right y-axis) on the Raspberry Pi 4 as a function of the number of threads (xaxis).

•

99The choice of compressed representation should take into account the type of input data.All our representations were considerably less effective on the two social network graphs.However, the results for gzip and xz indicate that even those matrices are significantly compressible, suggesting that other compressed representations, such as those mentioned in Section V-D, should be considered.Number of accesses to L3 cache memories on the Intel® Xeon® Gold (y-axis) as a function of the parallelism degree (x-axis).

참고문헌 71건

  1. From Theory to Practice: Plug and Play with Succinct Data Structures Lecture notes in computer science · Springer Science+Business Media · 2014 10.1007/978-3-319-07959-2_28
  2. RAPL 2010 10.1145/1840845.1840883
  3. The webgraph framework I 2004 10.1145/988672.988752
  4. Compact representation of Web graphs with extended functionality Information Systems · Elsevier BV · 2013 10.1016/j.is.2013.08.003
  5. On compressing social networks 2009 10.1145/1557019.1557049
  6. REDUCING CACHE HIERARCHY ENERGY CONSUMPTION BY PREDICTING FORWARDING AND DISABLING ASSOCIATIVE SETS Journal of Circuits Systems and Computers · World Scientific · 2012 10.1142/s0218126612500570
  7. PowerMon: Fine-grained and integrated power monitoring for commodity computer systems 2010 10.1109/secon.2010.5453824
  8. PowerInsight - A commodity power measurement capability 2013 10.1109/igcc.2013.6604485
  9. Power-Management Architecture of the Intel Microarchitecture Code-Named Sandy Bridge IEEE Micro · Institute of Electrical and Electronics Engineers · 2012 10.1109/mm.2012.12
  10. Layered label propagation 2011 10.1145/1963405.1963488
  11. Energy Aware Algorithmic Engineering 2014 10.1109/mascots.2014.47
  12. An energy complexity model for algorithms 2013 10.1145/2422436.2422470
  13. Going deeper with convolutions 2015 10.1109/cvpr.2015.7298594
  14. Survey of graph database models ACM Computing Surveys · Association for Computing Machinery · 2008 10.1145/1322432.1322433
  15. Efficient Set Operations over k2-Trees Data Compression Conference · 2015 10.1109/dcc.2015.9
  16. PageRank as a function of the damping factor 2005 10.1145/1060745.1060827
  17. PowerPack: Energy Profiling and Analysis of High-Performance Systems and Applications IEEE Transactions on Parallel and Distributed Systems · Institute of Electrical and Electronics Engineers · 2009 10.1109/tpds.2009.76
  18. Compressed representations for web and social graphs Knowledge and Information Systems · Springer Science+Business Media · 2013 10.1007/s10115-013-0648-4
  19. Deep Residual Learning for Image Recognition 2016 10.1109/cvpr.2016.90
  20. What Do Programmers Know about Software Energy Consumption? IEEE Software · IEEE Computer Society · 2015 10.1109/ms.2015.83
  21. Model-Based Optimization of EULAG Kernel on Intel Xeon Phi Through Load Imbalancing IEEE Transactions on Parallel and Distributed Systems · Institute of Electrical and Electronics Engineers · 2016 10.1109/tpds.2016.2599527
  22. Off-line dictionary-based compression Proceedings of the IEEE · Institute of Electrical and Electronics Engineers · 2000 10.1109/5.892708
  23. A Survey of Power and Energy Predictive Models in HPC Systems and Applications ACM Computing Surveys · Association for Computing Machinery · 2017 10.1145/3078811
  24. Scalable and queryable compressed storage structure for raster data Information Systems · Elsevier BV · 2017 10.1016/j.is.2017.10.007
  25. Two-Dimensional Block Trees The Computer Journal · Oxford University Press · 2022 10.1093/comjnl/bxac182
  26. RAPL in Action ACM Transactions on Modeling and Performance Evaluation of Computing Systems · Association for Computing Machinery · 2018 10.1145/3177754
  27. Sustainable software products—Towards assessment criteria for resource and energy efficiency Future Generation Computer Systems · Elsevier BV · 2018 10.1016/j.future.2018.02.044
  28. Rapid and accurate energy models through calibration with IPMI and RAPL Concurrency and Computation Practice and Experience · Wiley · 2019 10.1002/cpe.5124
  29. A Comparative Study of Methods for Measurement of Energy of Computing Energies · Multidisciplinary Digital Publishing Institute · 2019 10.3390/en12112204
  30. Bag of Tricks for Efficient Text Classification 2017 10.18653/v1/e17-2068
  31. Exploring federated learning on battery-powered devices Proceedings of the ACM Turing Celebration Conference - China · 2019 10.1145/3321408.3323080
  32. Extending general compact querieable representations to GIS applications Information Sciences · Elsevier BV · 2019 10.1016/j.ins.2019.08.007
  33. Energy Consumption in Compact Integer Vectors: A Study Case IEEE Access · Institute of Electrical and Electronics Engineers · 2019 10.1109/access.2019.2949655
  34. A Survey on Knowledge Graphs: Representation, Acquisition, and Applications IEEE Transactions on Neural Networks and Learning Systems · Institute of Electrical and Electronics Engineers · 2021 10.1109/tnnls.2021.3070843
  35. Multicore processor computing is not energy proportional: An opportunity for bi-objective optimization for energy and performance Applied Energy · Elsevier BV · 2020 10.1016/j.apenergy.2020.114957
  36. Accurate Energy Modelling of Hybrid Parallel Applications on Modern Heterogeneous Computing Platforms Using System-Level Measurements IEEE Access · Institute of Electrical and Electronics Engineers · 2020 10.1109/access.2020.2994953
  37. Large-Alphabet Semi-Static Entropy Coding Via Asymmetric Numeral Systems ACM transactions on office information systems · Association for Computing Machinery · 2020 10.1145/3397175
  38. Dynamic Modeling of Battery Energy Storage and Applications in Transmission Systems IEEE Transactions on Smart Grid · Institute of Electrical and Electronics Engineers · 2020 10.1109/tsg.2020.3016298
  39. A Preliminary Study of the Energy Impact of Software in Raspberry Pi devices 2020 10.1109/wetice49692.2020.00052
  40. Zuckerli: A New Compressed Representation for Graphs CINECA IRIS Institutial research information system (University of Pisa) · University of Pisa · 2020 10.1109/access.2020.3040673
  41. Improving the accuracy of energy predictive models for multicore CPUs by combining utilization and performance events model variables Journal of Parallel and Distributed Computing · Elsevier BV · 2021 10.1016/j.jpdc.2021.01.007
  42. FEETINGS: Framework for Energy Efficiency Testing to Improve Environmental Goal of the Software Sustainable Computing Informatics and Systems · Elsevier BV · 2021 10.1016/j.suscom.2021.100558
  43. A process for analysing the energy efficiency of software Information and Software Technology · Elsevier BV · 2021 10.1016/j.infsof.2021.106560
  44. Indexing Highly Repetitive String Collections, Part I ACM Computing Surveys · Association for Computing Machinery · 2021 10.1145/3434399
  45. Efficient Deep Learning: A Survey on Making Deep Learning Models Smaller, Faster, and Better ACM Computing Surveys · Association for Computing Machinery · 2023 10.1145/3578938
  46. Interact: IT infrastructure energy and cost analyzer tool for data centers Sustainable Computing Informatics and Systems · Elsevier BV · 2021 10.1016/j.suscom.2021.100618
  47. Introduction to Information Retrieval Cambridge University Press eBooks · Cambridge University Press · 2008 10.1017/cbo9780511809071
  48. Energy Efficient Servers Apress eBooks · Apress · 2015 10.1007/978-1-4302-6638-9
  49. Block trees Journal of Computer and System Sciences · Elsevier BV · 2020 10.1016/j.jcss.2020.11.002
  50. Graph Compression for Adjacency-Matrix Multiplication SN Computer Science · Springer Nature · 2022 10.1007/s42979-022-01084-2
  51. FAT: An In-Memory Accelerator With Fast Addition for Ternary Weight Neural Networks IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems · Institute of Electrical and Electronics Engineers · 2022 10.1109/tcad.2022.3184276
  52. Compressed linear algebra for large-scale machine learning The VLDB Journal · Springer Science+Business Media · 2017 10.1007/s00778-017-0478-1
  53. An experimental survey of energy management across the stack ACM SIGPLAN Notices · Association for Computing Machinery · 2014 10.1145/2714064.2660196
  54. Compact Data Structures 2016 10.1017/cbo9781316588284
  55. On Energy Nonproportionality of CPUs and GPUs 2022 IEEE International Parallel and Distributed Processing Symposium Workshops (IPDPSW) · 2022 10.1109/ipdpsw55747.2022.00015
  56. The real climate and transformative impact of ICT: A critique of estimates, trends, and regulations Patterns · Elsevier BV · 2022 10.1016/j.patter.2022.100576
  57. Improving matrix-vector multiplication via lossless grammar-compressed matrices Proceedings of the VLDB Endowment · Association for Computing Machinery · 2022 10.14778/3547305.3547321
  58. Estimating the Environmental Impact of Green IoT Deployments Sensors · Multidisciplinary Digital Publishing Institute · 2023 10.3390/s23031537
  59. Knowledge Graphs: Opportunities and Challenges Artificial Intelligence Review · Springer Science+Business Media · 2023 10.1007/s10462-023-10465-9
  60. A systematic review of Green <scp>AI</scp> Wiley Interdisciplinary Reviews Data Mining and Knowledge Discovery · Wiley · 2023 10.1002/widm.1507
  61. Pearls of Algorithm Engineering Cambridge University Press eBooks · 2023 10.1017/9781009128933
  62. Development and evaluation of a reference measurement model for assessing the resource and energy efficiency of software products and components—Green Software Measurement Model (GSMM) Future Generation Computer Systems · Elsevier BV · 2024 10.1016/j.future.2024.01.033
  63. A Survey of Multi-modal Knowledge Graphs: Technologies and Trends ACM Computing Surveys · Association for Computing Machinery · 2024 10.1145/3656579
  64. Sustainability orientation, industrial big data and product innovation: Evidence from the European manufacturing sector Computers & Industrial Engineering · Elsevier BV · 2024 10.1016/j.cie.2024.110163
  65. Efficient federated learning algorithm using sparse ternary compression based on layer variation classification Computer Networks · Elsevier BV · 2024 10.1016/j.comnet.2024.110471
  66. Efficient Hardware Design of DNN for RF Signal Modulation Recognition Employing Ternary Weights IEEE Access · Institute of Electrical and Electronics Engineers · 2024 10.1109/access.2024.3409180
  67. Two-dimensional fully ferroelectric-gated hybrid computing-in-memory hardware for high-precision and energy-efficient dynamic tracking Science Advances · American Association for the Advancement of Science · 2024 10.1126/sciadv.adp0174
  68. Evaluating regular path queries on compressed adjacency matrices The VLDB Journal · Springer Science+Business Media · 2024 10.1007/s00778-024-00885-6
  69. When Are Cache-Oblivious Algorithms Cache Adaptive? A Case Study of Matrix Multiplication and Sorting Leibniz-Zentrum für Informatik (Schloss Dagstuhl) · Schloss Dagstuhl – Leibniz Center for Informatics · 2022 10.4230/lipics.esa.2022.16
  70. Modellbildung und Umsetzung von Methoden zur energieeffizienten Nutzung von Containertechnologien Universitätsbibliothek Trier · 2022 10.25353/ubtr-xxxx-099b-6fe5
  71. Architecting for Sustainability VU Research Portal · Vrije Universiteit Amsterdam · 2022