Inhibitor Transformers and Gated RNNs for Torus Efficient Fully Homomorphic Encryption

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Brännvall, Rickard, Zhang, Tony, Forsgren, Henrik, Stoian, Andrei, Sandin, Fredrik, Liwicki, Marcus
Natura: Preprint
Pubblicazione: 2023
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866917357021036544
author Brännvall, Rickard
Zhang, Tony
Forsgren, Henrik
Stoian, Andrei
Sandin, Fredrik
Liwicki, Marcus
author_facet Brännvall, Rickard
Zhang, Tony
Forsgren, Henrik
Stoian, Andrei
Sandin, Fredrik
Liwicki, Marcus
contents This paper introduces efficient modifications to neural network-based sequence processing approaches, laying new grounds for scalable privacy-preserving machine learning under Fully Homomorphic Encryption (FHE). Transformers are now ubiquitous in AI applications and have largely supplanted Gated Recurrent Neural Networks (RNNs) as the standard architecture for sequence modeling. Both architectures rely on costly multiplications and complex activations that hinder encrypted inference. We focus on TFHE, which supports deep circuit evaluation and efficient univariate function evaluation but makes variable-to-variable multiplication particularly expensive. To address this, we propose inhibitor designs for Transformers and gated RNNs that replace multiplications and Softmax/Sigmoid activations with additive and ReLU-based operations. These changes enable integer-only computation, reduce circuit depth, and improve the efficiency of encrypted execution while preserving learning capacity. We present complexity analyses and scaling experiments that indicate significant reductions in circuit depth and execution time under TFHE, with 3-6 times speedup for encrypted inference and 30-50% reductions in plaintext inference time. Empirical evaluations on MNIST, IMDB, and IAM handwriting show inhibitor-based models maintain competitive accuracy. Knowledge distillation further demonstrates that an inhibitor-based DistilBERT achieves performance close to that of the conventional attention model on GLUE, positioning these architectures as a viable approach for scalable, privacy-preserving AI.
format Preprint
id arxiv_https___arxiv_org_abs_2308_05629
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle Inhibitor Transformers and Gated RNNs for Torus Efficient Fully Homomorphic Encryption
Brännvall, Rickard
Zhang, Tony
Forsgren, Henrik
Stoian, Andrei
Sandin, Fredrik
Liwicki, Marcus
Machine Learning
68T07, 94A60
I.2.6; E.3; C.2.0
This paper introduces efficient modifications to neural network-based sequence processing approaches, laying new grounds for scalable privacy-preserving machine learning under Fully Homomorphic Encryption (FHE). Transformers are now ubiquitous in AI applications and have largely supplanted Gated Recurrent Neural Networks (RNNs) as the standard architecture for sequence modeling. Both architectures rely on costly multiplications and complex activations that hinder encrypted inference. We focus on TFHE, which supports deep circuit evaluation and efficient univariate function evaluation but makes variable-to-variable multiplication particularly expensive. To address this, we propose inhibitor designs for Transformers and gated RNNs that replace multiplications and Softmax/Sigmoid activations with additive and ReLU-based operations. These changes enable integer-only computation, reduce circuit depth, and improve the efficiency of encrypted execution while preserving learning capacity. We present complexity analyses and scaling experiments that indicate significant reductions in circuit depth and execution time under TFHE, with 3-6 times speedup for encrypted inference and 30-50% reductions in plaintext inference time. Empirical evaluations on MNIST, IMDB, and IAM handwriting show inhibitor-based models maintain competitive accuracy. Knowledge distillation further demonstrates that an inhibitor-based DistilBERT achieves performance close to that of the conventional attention model on GLUE, positioning these architectures as a viable approach for scalable, privacy-preserving AI.
title Inhibitor Transformers and Gated RNNs for Torus Efficient Fully Homomorphic Encryption
topic Machine Learning
68T07, 94A60
I.2.6; E.3; C.2.0
url https://arxiv.org/abs/2308.05629