Fast and Private Inference of Deep Neural Networks by Co-designing Activation Functions

Abdulrahman Diaa, Lucas Fenaux, Thomas Humphries, Marian Dietz, Faezeh Ebrahimianghazani +7 more
6/14/2023
cs.CRcs.LG

No official code found. Best implementation: LucasFenaux/PILLAR-ESPN (12 stars, MIT, last commit 2024-03-13).

Abstract

Machine Learning as a Service (MLaaS) is an increasingly popular design where a company with abundant computing resources trains a deep neural network and offers query access for tasks like image classification. The challenge with this design is that MLaaS requires the client to reveal their potentially sensitive queries to the company hosting the model. Multi-party computation (MPC) protects the client's data by allowing encrypted inferences. However, current approaches suffer from prohibitively large inference times. The inference time bottleneck in MPC is the evaluation of non-linear layers such as ReLU activation functions. Motivated by the success of previous work co-designing machine learning and MPC, we develop an activation function co-design. We replace all ReLUs with a polynomial approximation and evaluate them with single-round MPC protocols, which give state-of-the-art inference times in wide-area networks. Furthermore, to address the accuracy issues previously encountered with polynomial activations, we propose a novel training algorithm that gives accuracy competitive with plaintext models. Our evaluation shows between $3$ and $110\times$ speedups in inference time on large models with up to $23$ million parameters while maintaining competitive inference accuracy.

View on arXivView PDF

Code Implementations(1)

MIT

Code for the paper: Fast and Private Inference of Deep Neural Networks by Co-designing Activation Functions

121Shell, PythonJun 5, 20232 years agoMIT

Similar Papers

Cite this paper

@article{diaa2023fast,
  title  = {Fast and Private Inference of Deep Neural Networks by Co-designing Activation Functions},
  author = {Abdulrahman Diaa and Lucas Fenaux and Thomas Humphries and Marian Dietz and Faezeh Ebrahimianghazani and Bailey Kacsmar and Xinda Li and Nils Lukas and Rasoul Akhavan Mahdavi and Simon Oya and Ehsan Amjadian and Florian Kerschbaum},
  year   = {2023},
  eprint = {2306.08538},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2306.08538v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2306.08538.svg)](https://codeofpaper.com/paper/2306.08538)

Discussion