Compiler-Guided Polynomial-Level Parallelism for FHE-Encrypted Machine Learning Inference
The paper introduces CRISP, a compiler-guided approach that enables safe polynomial-level parallelism for FHE-encrypted machine learning inference by trading runtime SIMD vectorization for compile-time OpenMP parallelism, resulting in significant speedups and latency reductions within the ANT-ACE compiler framework.
Original paper licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
In the modern digital world, sensitive information often travels through networks controlled by strangers. A bank might process your loan application on a server it does not own, or a hospital might analyze patient records using a cloud service operated by a third party. In these scenarios, the data is vulnerable; if the server is compromised, the private information is exposed. For decades, the only way to protect data in such situations was to keep it offline or to trust the server operator completely. Fully homomorphic encryption offers a different path. It is a mathematical method that allows a computer to perform calculations on data that remains locked in an encrypted state. The computer never sees the actual numbers; it only manipulates the scrambled code. When the calculation is finished, the result is decrypted to reveal the correct answer, as if the work had been done on the original, unencrypted data. This technology promises a future where privacy is preserved even when computation happens on untrusted infrastructure.
However, this privacy comes at a steep price. Because the computer must work with scrambled code rather than clear numbers, the calculations are incredibly slow. A task that takes a fraction of a second on normal data can take hours or even days when encrypted. This slowness has prevented the technology from being used in real-time applications, such as analyzing medical scans or processing financial transactions as they happen. The bottleneck lies in how the computer handles the massive amounts of mathematical work required to keep the encryption intact. To make this technology practical, researchers must find ways to speed up these calculations without breaking the security rules that keep the data safe.
A team of researchers from Hunan University and the Guangdong Provincial Key Laboratory of Power System Network Security has developed a new method to tackle this speed problem. They created a system called CRISP, which acts as a specialized translator for the computer code that runs these encrypted calculations. Their work focuses on a specific type of encryption scheme known as CKKS, which is widely used for machine learning tasks. In this scheme, the encrypted data is represented as a collection of large mathematical objects called polynomials. To perform a calculation, the computer must process these polynomials through a series of steps that involve breaking them down into smaller pieces and reassembling them. The researchers discovered that the existing software used to run these calculations was not fully utilizing the power of modern computer processors.
Modern computer processors contain multiple cores, similar to a team of workers, each capable of doing a job simultaneously. The standard software for encrypted calculations was designed to use a technique called SIMD, which is like having a single worker perform a task on many small items at once using a specialized tool. While effective, this approach limits the number of workers that can be active at the same time. The researchers realized that the structure of the encrypted calculations allowed for a different strategy: instead of relying on the specialized tool for every small item, they could assign different large chunks of the work to different workers. They developed a compiler-guided approach that reorganizes the code before it runs, allowing the computer to use its multiple cores more effectively. This shift from a single-worker, many-items approach to a many-workers, many-chunks approach is the core of their innovation.
The researchers built their system, CRISP, on top of an existing end-to-end compiler called ANT-ACE. This compiler takes a machine learning model, such as one used to recognize images, and automatically converts it into a program that can run on encrypted data. The team inserted their new parallelization strategy into the final stage of this process, where the program is translated into the polynomial operations that the encryption library understands. By doing this at the compiler level, they could see the entire structure of the calculation and ensure that the new way of splitting the work did not violate the strict rules of the encryption. They had to be careful because the encrypted data has specific mathematical properties that must be preserved; if the work is split incorrectly, the final answer will be wrong. Their method carefully analyzes the dependencies between different parts of the calculation to ensure that the parallel workers do not interfere with one another.
The results of their experiments were significant. They tested the system on a standard multi-core computer processor using six different encrypted machine learning models. When they ran the encrypted calculations with their new method, the core mathematical operations became, on average, 2.65 times faster than when using the standard method. This speedup was consistent across different types of calculations, including addition and multiplication of the encrypted numbers. For the entire machine learning inference process—the time it takes to run a model on a single piece of data—the new method reduced the total time by an average of 137 seconds compared to the best existing version. In some cases, the reduction was even more dramatic, with the system running nearly seven times faster for specific multiplication tasks. These improvements were achieved without changing the underlying encryption scheme or requiring new hardware; the gains came entirely from a smarter way of organizing the existing work.
The researchers also verified that their method works well when combined with other optimizations. Machine learning models often involve complex steps where different operations are merged together to save time. The team showed that their parallelization strategy could coexist with these merging techniques, preserving the benefits of both. They tested the system with up to sixteen processor cores and found that the performance continued to improve, though the gains began to level off as the system approached the limits of its memory bandwidth. This indicates that the method scales well with more powerful hardware. Crucially, they confirmed that the results produced by the new system were mathematically identical to the results produced by the standard system, proving that the speed did not come at the cost of accuracy.
This work represents a practical step forward in making encrypted machine learning viable for real-world use. By shifting the control of how calculations are parallelized from the runtime library to the compiler, the researchers have unlocked a new level of performance that was previously inaccessible. Their approach does not rely on magic or new theoretical breakthroughs but rather on a careful reorganization of how existing tools are used. The findings suggest that encrypted data processing can be made fast enough for applications that require immediate results, such as real-time fraud detection or private medical diagnostics. The team has made their implementation available for others to study and build upon, opening the door for further refinements. As the demand for privacy-preserving computation grows, methods like CRISP provide a clear path toward making secure data processing a standard part of the digital landscape rather than a theoretical possibility.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.