CipherFlow: Compiling AI Programs for Efficient Cryptographically Secure Inference
cs.CR, cs.LG
Submitted: 2026-11-01
Updated: 2026-11-01
Comments: Accepted at NeurIPS 2026. 34 pages. Code and interactive demo: https://loopleap-lab.github.io/CipherFlow/
Code: https://github.com/loopleap-lab/CipherFlow
License: http://creativecommons.org/licenses/by-nc-nd/4.0/
The gist: Cryptographically secure inference faces two practical challenges: making secure programming accessible to AI developers and data scientists…
Terminology
Abstract
Cryptographically secure inference faces two practical challenges: making secure programming accessible to AI developers and data scientists, and achieving efficient execution across deployment environments. Developers must compose cryptographic primitives correctly, while performance depends on hardware, networks, and evolving ciphertext states. We present CipherFlow, a compiler framework that takes a high-level AI computation graph, available cryptographic primitives, and a target hardware and network configuration to generate an executable, latency-optimized secure inference program. CipherFlow automates cryptographic execution decisions through three techniques: MicroBench profiles deployment-specific primitive costs; state-expanded planning jointly optimizes homomorphic encryption (HE) and secure multi-party computation (MPC) placement, conversions, and ciphertext maintenance under cryptographic-state constraints; and BlockFold summarizes branched regions to scale planning to Transformer graphs. Evaluation using measured HE/MPC backend costs across CPU/GPU and network settings shows up to 16.5 times speedup on BERT-base and over 22 times on ViT compared with static hybrid placement baselines. CipherFlow separates model programming from cryptographic execution decisions, enabling developers to express AI computations while the compiler constructs efficient secure programs.
Sources
- AttestLLM: Efficient Attestation Framework for Billion-scale On-device LLMs
- Securing Transformer-based AI Execution via Unified TEEs and Crypto-protected Accelerators
- Privacy-Preserving Machine Learning: Methods, Challenges and Directions
- SoK: Can Fully Homomorphic Encryption Support General AI Computation? A Functional and Cost Analysis
- CryptoGen: Secure Transformer Generation with Encrypted KV-Cache Reuse
- SecureRouter: Encrypted Routing for Efficient Secure Inference
- MPCFormer: fast, performant and private Transformer inference with MPC
- RobPI: Robust Private Inference against Malicious Client
Related papers
- From Strategy Search to Policy Learning: MCTS-Guided Adversarial Co-Evolution for LLM Safety Alignment
- Privacy Leakage from Recurrent State in LLM Inference
- Incrementally Verifiable Oracle Aided Computation
- Privilege and confidentiality in generative AI workflows
- BadMoE: Backdooring Mixture-of-Experts LLMs via Routing-Aware Triggers and Task-Underutilized Experts
- CoVault: Secure, Scalable Analytics of Personal Data