The standard paradigm for cloud-based AI requires a leap of faith: a user must send their raw, sensitive data to a service provider to receive a prediction. Homomorphic Encryption (HE) offers a way to break this privacy-utility tradeoff by allowing computations to be performed directly on encrypted ciphertexts. When a neural network is "HE-friendly," the cloud provider can process an encrypted image or medical record, producing an encrypted result that only the user can decrypt.
However, translating a standard neural network into the encrypted domain is not a simple 1-to-1 mapping. It requires overcoming two fundamental constraints of lattice-based cryptography: the accumulation of computational noise and the inability to perform non-polynomial operations.
The Noise Bottleneck and Multiplicative Depth
In HE schemes like BFV, BGV, or CKKS, every ciphertext contains a small amount of intentional noise to ensure security. As Kristin E. Lauter explains in Private AI: Machine Learning on Encrypted Data, this noise grows slightly during addition but increases significantly during multiplication. If the noise level exceeds a certain threshold, the ciphertext becomes "undecryptable," and the underlying data is lost.
This creates a strict "multiplicative depth" budget. Every layer in a neural network—specifically the weighted sums in convolutions or fully connected layers—consumes a portion of this budget. As noted by Ran Gilad-Bachrach and Nathan Dowlin in the seminal CryptoNets paper, this noise growth effectively caps the number of layers a network can have before the signal is overwhelmed by cryptographic noise.
Designing HE-Friendly Activations
Standard neural networks rely on non-linear activation functions like ReLU ($max(0, x)$) or Softmax to learn complex patterns. However, HE only natively supports addition and multiplication (polynomial operations). Functions like ReLU are non-polynomial and cannot be computed directly on ciphertexts.
To solve this, researchers replace these functions with low-degree polynomial approximations. Moran Baruch and Guy Moshkowich demonstrate a methodology for training networks where ReLU is replaced by trainable quadratic functions ($ax^2 + bx + c$). In A methodology for training homomorphic encryption friendly neural networks, they show that by using a "smooth-transition" training phase and knowledge distillation, these polynomial networks can match the accuracy of their non-encrypted counterparts while remaining within the multiplicative depth limits of HE.
Scaling to Deep Architectures via Bootstrapping
While shallow networks (like the 5-layer CryptoNets) can operate within a fixed noise budget, modern architectures like ResNet or Transformers require dozens of layers. To support these, researchers use a process called bootstrapping.
Bootstrapping is a "refresh" operation that reduces the noise in a ciphertext without decrypting it. It is computationally expensive—often the primary bottleneck in private inference—but it allows for virtually unlimited depth. HyungChul Kang and colleagues utilized advanced bootstrapping and precise polynomial approximations to successfully run a ResNet-20 model on encrypted CIFAR-10 data, achieving over 90% accuracy. Similarly, Eunsang Lee and Joon-Woo Lee introduced "multiplexed parallel convolutions" to scale ResNets up to 110 layers by managing the noise that accumulates in the imaginary parts of complex-number-based HE ciphertexts.
Optimizing Throughput with Data Packing
Beyond depth, the sheer size of encrypted data is a challenge. A single encrypted number can be thousands of times larger than a plaintext float. To make inference practical, researchers use "packing" or "tiling" to fit multiple data points into a single ciphertext, allowing for Single Instruction, Multiple Data (SIMD) operations.
- Tile Tensors: Ehud Aharoni and the team at IBM developed the HeLayers framework, which uses a "tile tensor" abstraction to automate the complex packing and rotation operations required for large networks like AlexNet.
- Structural Linearization: For Graph Convolutional Networks (GCNs), Hongwu Peng and Ran Ran introduced LinGCN, which linearizes the graph structure to reduce the number of sequential multiplications, achieving a 14.2× speedup.
- Low-Rank Factorization: Min Wu proposed FFConv, which decomposes standard convolutions into smaller, low-rank layers to minimize the "rotation" overhead that occurs when shifting data within encrypted slots.
By combining these cryptographic optimizations with architectural redesigns, the field is moving from simple proofs-of-concept toward practical, private-by-design AI for complex tasks like protein sequence classification and face recognition.