As computing moves to the cloud, there is an increasing need for privacy in AI. Homomorphic encryption (FHE) is a perfect fit for the highly regular data access patterns of neural networks. However, building efficient and correct applications with FHE is tedious and error-prone. CHET is a compiler and runtime that automates many parts of this process for neural network inference tasks.
CHET has a set of transformation passes based on a framework of symbolic analyses. For example, to use FHE schemes two parameters, ciphertext modulus Q and polynomial degree N, must be selected. The search space for Q and N has both correctness and security constraints, and for best performance minimal parameters should be selected. CHET will analyze the target program to select good parameters automatically.
As data movement is expensive in FHE, it is important to design computations around efficient data layouts. CHET’s inference engine implements several data layout policies, and selects between these using an accurate cost model. Combined with a library of kernel implementations, CHET provides state-of-the-art performance for encrypted neural network inference tasks.