Table of Contents
Fetching ...

Efficient Privacy-Preserving Sparse Matrix-Vector Multiplication Using Homomorphic Encryption

Yang Gao, Gang Quan, Wujie Wen, Scott Piersall, Qian Lou, Liqiang Wang

TL;DR

This paper presents the first framework that efficiently integrates HE with SpMV, addressing the dual challenges of computational efficiency and data privacy and introduces a novel compressed matrix format, named Compressed Sparse Sorted Column (CSSC), which is specifically designed to optimize encrypted sparse matrix computations.

Abstract

Sparse matrix-vector multiplication (SpMV) is a fundamental operation in scientific computing, data analysis, and machine learning. When the data being processed are sensitive, preserving privacy becomes critical, and homomorphic encryption (HE) has emerged as a leading approach for addressing this challenge. Although HE enables privacy-preserving computation, its application to SpMV has remained largely unaddressed. To the best of our knowledge, this paper presents the first framework that efficiently integrates HE with SpMV, addressing the dual challenges of computational efficiency and data privacy. In particular, we introduce a novel compressed matrix format, named Compressed Sparse Sorted Column (CSSC), which is specifically designed to optimize encrypted sparse matrix computations. By preserving sparsity and enabling efficient ciphertext packing, CSSC significantly reduces storage and computational overhead. Our experimental results on real-world datasets demonstrate that the proposed method achieves significant gains in both processing time and memory usage. This study advances privacy-preserving SpMV and lays the groundwork for secure applications in federated learning, encrypted databases, scientific computing, and beyond.

Efficient Privacy-Preserving Sparse Matrix-Vector Multiplication Using Homomorphic Encryption

TL;DR

This paper presents the first framework that efficiently integrates HE with SpMV, addressing the dual challenges of computational efficiency and data privacy and introduces a novel compressed matrix format, named Compressed Sparse Sorted Column (CSSC), which is specifically designed to optimize encrypted sparse matrix computations.

Abstract

Sparse matrix-vector multiplication (SpMV) is a fundamental operation in scientific computing, data analysis, and machine learning. When the data being processed are sensitive, preserving privacy becomes critical, and homomorphic encryption (HE) has emerged as a leading approach for addressing this challenge. Although HE enables privacy-preserving computation, its application to SpMV has remained largely unaddressed. To the best of our knowledge, this paper presents the first framework that efficiently integrates HE with SpMV, addressing the dual challenges of computational efficiency and data privacy. In particular, we introduce a novel compressed matrix format, named Compressed Sparse Sorted Column (CSSC), which is specifically designed to optimize encrypted sparse matrix computations. By preserving sparsity and enabling efficient ciphertext packing, CSSC significantly reduces storage and computational overhead. Our experimental results on real-world datasets demonstrate that the proposed method achieves significant gains in both processing time and memory usage. This study advances privacy-preserving SpMV and lays the groundwork for secure applications in federated learning, encrypted databases, scientific computing, and beyond.
Paper Structure (38 sections, 10 equations, 10 figures, 8 tables, 5 algorithms)

This paper contains 38 sections, 10 equations, 10 figures, 8 tables, 5 algorithms.

Figures (10)

  • Figure 1: Demonstration of SpMV in the CSR format. When both matrix and vector are encrypted in HE, although partial products can be obtained by aligning elements from the CSR matrix and the vector, aggregating these products is highly inefficient. Each addition requires one HE rotation and one HE constant multiplication, leading to significant computational overhead.
  • Figure 2: Illustration of the CSSC format: (1) Rows are reordered in descending order according to the number of non-zero elements. (2) Non-zero elements in each row are shifted to the left. (3) Values are then extracted in column-major order, along with their original column indices, row mapping, and column pointers.
  • Figure 3: Secure computation framework for sparse matrix–vector multiplication. Client A uploads the encrypted CSSC value array to the cloud. Client B reorganizes its vector using the column index and uploads the encrypted aligned vector. The cloud performs: (1) ciphertext--ciphertext multiplication within each chunk, and (2) aggregation across rows and chunks to produce the final encrypted output.
  • Figure 4: The process of generating CSSC's value and column index and its chunks. (1) Rows are reordered in descending order based on the number of non-zero elements. (2) Non-zero elements in each row are shifted to the left. (3) In the chunking step, the matrix is divided into chunks. In this example, the three red boxes indicate three chunks, where non-zero and zero elements in the chunks will be preserved, whereas zero elements outside the red boxes (chunks) will be ignored.
  • Figure 5: Client B's vector is reorganized using the column indices provided by Client A. Each item in "Column Index" indicates which element in "Vector" will be placed in the corresponding location of reorganized result, i.e., ReorganizedResult[$k$] = Vector[ColumnIndex[$k$]]. For example, ColumnIndex[3]==1 indicates "2" ( i.e., Vector[1]) will be placed in ReorganizedResult[3].
  • ...and 5 more figures