-
Notifications
You must be signed in to change notification settings - Fork 16
SEALion
SEALion is a high-level interface that emulates the Tensorflow and Keras machine learning APIs while enabling homomorphic inference via the underlying SEAL library.
SEALion is implemented in Python and accesses the underlying SEAL Library via a Python Extension. The tool consists of four major components:
- Heras - High-level api similar to Keras that defines FHE versions of Models and Layers.
- Graph - Lower-level API similar to the lower-level API in Tensorflow
- SEAL Python Extension - Bridge between Python and the C++ SEAL library
- Parameter Estimation - Analyzes a computational graph and estimates the required parameters
- SEAL @ aa7bf57
- Tensorflow 1.14.0
- Numpy
While SEALion does seem to support Windows in some way, actually executing encrypted computations seems to fail due to some issues with the C++ extension module.
SEALion includes estimator.py
to automatically select suitable parameters from a list of pre-defined candidate parameters.
SEALion first tries to estimate the necessary plaintext modulus, however this is apparently generally overly cautious and therefore divided by 16 before proceeding. This estimate is then used to narrow down the candidates to be tested.
Then, starting with the smallest remaining candidate, it evaluates the network on a single batch of the network, enforcing stricter noise budgets (as measured by SEAL::Decryptor::invariant_noise_budget
than during normal computatios.
This is meant to account for variations in the input data, by allowing some "extra breathing room" for larger values.
During training, the parameters appear to be re-calculated each epoch, which seems slightly inefficient.
Since machine learning in practice only provides meaningful results on input that are relatively close to the training data, this approach is well suited for neural network inference. However, it would be incorrect for e.g. financial or statistical calculations.
- Home
- Compilers & Optimizations
- Libraries
- Benchmark Programs
- Implementation Docs