NeurIPS 2026QuestionsPapersAreasAboutMarkdown

CipherFlow: Hardware-Aware Compiler Framework for Low-Latency Hybrid Secure Inference

Hedong Zhang, Mengxin Zheng, Qian Lou

NeurIPS page · Open on the map

Category: Efficient LLM Inference & Training › Low-Precision LLM Inference · Type: new method · Keywords: hardware-aware compiler, hybrid secure inference, HE-MPC, latency optimization, secure cloud inference

Summary

CipherFlow is a hardware-aware compiler that automatically generates latency-optimized hybrid HE-MPC secure inference programs for diverse deployments, achieving up to 16.5× speedup on BERT-base and over 22× on ViT.

Explained to a 5-year-old

Secure inference lets people use smart computer programs in the cloud without showing their private stuff. Some computers use secret math to keep things hidden. The new system is like a smart helper that looks at the computer and the secret math and decides where to do each step to make things faster. It works for picture and language models. It makes the secret math run faster, so you get answers quicker.

Explained to a 5-year-old, longer

People sometimes want to ask a computer a question but don't want the computer to know their secret answer. To keep answers secret, special math tricks called homomorphic encryption and secure multi-party computation hide the data while the computer works. Usually, these secret math tricks are slow, so researchers combine them in a hybrid way to go faster. However, the best way to mix the two tricks depends on the computer you are using and how the secret math changes during the calculation. Existing systems use a fixed plan that doesn't change, which can be slow or even break on different computers. The new system is like a smart compiler that looks at the computer, the secret math, and the program you want to run. It figures out where to do each step of the calculation, when to switch between the two secret math tricks, and how to keep the secret math efficient. It then creates a special plan that runs the program quickly while keeping everything secret. The plan is tested on two popular models: one that understands language and one that looks at pictures. On many different computers, the new plan runs up to 16 times faster for the language model and more than 22 times faster for the picture model. This means users get answers much quicker without having to manually adjust the secret math for each computer. In short, the system makes secret computing easy and fast for everyone.

For a technical reader

CipherFlow is a hardware-aware compiler that takes a plain neural-network graph and a deployment profile and automatically produces a latency-optimized secure execution program for hybrid HE-MPC inference. It profiles primitive costs on the target hardware, performs state-aware graph optimizations, and decides operator placement, cross-domain conversion, and cryptographic maintenance actions. Implemented on real HE and MPC back-ends, it evaluates BERT-base and Vision Transformer models across CPU/GPU and network configurations. The results show up to 16.5× speedup on BERT-base and over 22× on ViT compared to static hybrid baselines. This automation turns manual secure-inference engineering into a deployment-specific optimization pipeline.

Problem

Hybrid secure inference systems currently use fixed execution strategies that are brittle across different deployment environments and cryptographic states, making manual or static mappings insufficient.

Method

The approach profiles deployment-specific primitive costs, performs state-aware graph optimization, and jointly decides operator placement, cross-domain conversion, and cryptographic maintenance actions to generate an optimized execution program.

Results

The approach achieves up to 16.5× speedup on BERT-base and over 22× on ViT compared to state-of-the-art static hybrid baselines.

Contributions

It introduces a compiler that automatically generates deployment-specialized, latency-optimized hybrid secure inference programs and demonstrates its effectiveness across heterogeneous environments.

Practical relevance

It enables portable, automatic optimization of hybrid secure inference across diverse deployments, reducing manual engineering effort.

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction