Encrypted Machine Learning
Bridge2AI Seminar
Michigan State University
Only going to get worse with AI Chatbots
Strict regulations on data privacy in transit, rest, and use.


Privacy of user data is not guaranteed.
FHE enables AI models to process encrypted data without decryption.
Run programs on encrypted data without ever decrypting it.FHE can—in theory—handle universal computation.
Breaking FHE $\Leftrightarrow$ Solving LWE problem: recovering private key from public key.
| System | Problem | Complexity | Solution |
| $b=As$ in $\mathbb{R}$ | System of Linear Equations | P | Gaussian Elimination |
| $b=As+e$ in $\mathbb{R}$ | Least Squares Problem | P | Least Squares Estimator |
| $b=As+e \mod q$ in $\mathbb{Z}_q$ | Learning with Errors Problem | NP-hard | No known efficient algorithm (not even quantum) |
| $b(X)=A(X)s(X)+e(X) \mod q$ in $\mathbb{Z}_q[X]/(X^N+1)$ | Ring Learning with Errors Problem | NP-hard | No known efficient algorithm (not even quantum) |
Encoding/Decoding
Key generation
Encryption/Decryption
Evaluation
Ex: CKKS encoding operates in the cyclotomic ring $\mathbb{Z}_q[X]/(X^N+1)$
Ex: CKKS ciphertext is composed of two polynomials.
Bootstrapping is slowest of HE operations. Avoid if possible.
Choice of packing scheme significantly affects latency.
Vector operations
Polynomial evaluation
Matrix operations
Primitive mathematical operations are feasible under encryption.
import orion
net = ResNet50()
orion.fit(net, trainloader)
orion.compile()
net.he()
ctOut = net(ctIn)
Polynomial approximation for non-linear activations
How to effectively trade-off between accuracy and latency?

| Approach | MPCNN | AESPA | REDsec | AutoFHE |
|---|---|---|---|---|
| Venue | ICML22 | arXiv22 | NDSS23 | USENIX24 |
| Scheme | CKKS | CKKS | TFHE | CKKS |
| Polynomial | high | low | n/a | mixed |
| Layerwise | No | No | n/a | Yes |
| Strategy | approx | train | train | adapt |
| Architecture | manual | manual | manual | search |
Co-designing of neural architecture and FHE system.
| Approach | Resolution | Backbone | 5 Datasets | Latency(s) | Memory(GB) | ||
|---|---|---|---|---|---|---|---|
| Network | Params | Boot | Average Accuracy1 | ||||
| MPCNN | 64x64 | ResNet32 | 0.53M | 31 | 85.60 | 1,277 | 286 |
| 64x64 | ResNet44 | 0.73M | 43 | 89.64 | 1,640 | 286 | |
| AutoFHE | 64x64 | ResNet32 | 0.53M | 8 | 82.69 | 667 | 286 |
| CryptoFace | 64x64 | CryptoFaceNet4 | 0.94M | 2 | 89.42 | 220 | 269 |
| CryptoFace | 96x96 | CryptoFaceNet9 | 2.12M | 2 | 90.99 | 232 | 276 |
| CryptoFace | 128x128 | CryptoFaceNet16 | 3.78M | 2 | 91.46 | 241 | 277 |
7.5x speedup (27 mins → 3.6 mins), while preserving accuracy (89.64 vs 89.42)
Near-constant latency across different resolutions
Closed-source implementations only.
Co-designing AI and FHE architectures is critical for efficiency.
We appreciate your interest. Let's advance secure healthcare AI together.