Bandwidth Efficient Homomorphic Encrypted Matrix Vector Multiplication Accelerator on FPGA
Abstract
Homomorphic Encryption (HE) is a promising solution to the increasing concerns of privacy in Machine Learning (ML) as it enables computations directly on encrypted data. However, it imposes significant overhead on the compute system and remains impractically slow. Prior works have proposed efficient FPGA implementations of basic HE primitives such as number theoretic transform (NTT), key switching, etc. Composing the primitives together to realize higher level ML computation is still a challenge due to the large data transfer overhead. In this work, we propose an efficient FPGA implementation of HE Matrix Vector Multiplication <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$(\mathbf{M}\times \mathbf{V})$</tex> , a key kernel in HE-based Machine Learning applications. By analyzing the data reuse characteristics and the encryption overhead of HE <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$\mathbf{M}\times \mathbf{V}$</tex> , we show that simply using the principles of unencrypted <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$\mathbf{M}\times \mathbf{V}$</tex> to design accelerators for HE <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$\mathbf{M}\times \mathbf{V}$</tex> can lead to a significant amount of DRAM data transfers. We tackle the computation and data transfer challenges by proposing a bandwidth efficient dataflow that is specially optimized for HE <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$\mathbf{M}\times \mathbf{V}$</tex> . We identify highly reused data entities in HE <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$\mathbf{M}\times \mathbf{V}$</tex> and efficiently utilize the on-chip SRAM to reduce the DRAM data transfers. To speed up the computation of HE <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$\mathbf{M}\times \mathbf{V}$</tex> , we exploit three types of parallelism: partial sum parallelism, residual polynomial parallelism and coefficient parallelism. Leveraging these innovations, we demonstrate the first FPGA accelerator for HE matrix vector multiplication. Evaluation on 7 HE <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$\mathbf{M}\times \mathbf{V}$</tex> benchmarks shows that our FPGA accelerator is up to <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$3.8\times$</tex> (GeoMean <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$2.8\times$</tex> ) faster compared to the 64-thread CPU implementation.
BibTeX
@inproceedings{yang2022bandwidth,
author = {Yang Yang and Sanmukh R. Kuppannagari and Rajgopal Kannan and Viktor K. Prasanna},
title = {{Bandwidth Efficient Homomorphic Encrypted Matrix Vector Multiplication Accelerator on FPGA}},
booktitle = {FPT},
year = {2022},
url = {https://openreview.net/forum?id=GIFcK6X5_9},
}Ask Althea to put this paper to the test.
Loading related content...