# CipherFlow: Compiling AI Programs for Efficient Cryptographically Secure Inference

DevFeed: [CipherFlow: Compiling AI Programs for Efficient Cryptographically Secure Inference](<https://devfeed.tech/articles/cipherflow-compiling-ai-programs-for-efficient-cryptographically-secure-inference-114051.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2611.01450>)

Author: Hedong Zhang, Mengxin Zheng, Qian Lou

Published: 2026-11-03T05:00:00Z

Content type: article

Language: en

Sources: [arXiv: Cryptography and Security](<https://devfeed.tech/sources/arxiv-cryptography-and-security.md>), [arXiv: Machine Learning](<https://devfeed.tech/sources/arxiv-machine-learning.md>)

Topics: [Cryptography](<https://devfeed.tech/topics/cryptography.md>), [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>), [FHE](<https://devfeed.tech/topics/fhe.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [backend](<https://devfeed.tech/tags/backend.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [costs](<https://devfeed.tech/tags/costs.md>), [cpu](<https://devfeed.tech/tags/cpu.md>), [cs-cr](<https://devfeed.tech/tags/cs-cr.md>), [cs-lg](<https://devfeed.tech/tags/cs-lg.md>), [evaluation](<https://devfeed.tech/tags/evaluation.md>), [framework](<https://devfeed.tech/tags/framework.md>), [gpu](<https://devfeed.tech/tags/gpu.md>), [graph](<https://devfeed.tech/tags/graph.md>), [hardware](<https://devfeed.tech/tags/hardware.md>), [homomorphic-encryption](<https://devfeed.tech/tags/homomorphic-encryption.md>), [inference](<https://devfeed.tech/tags/inference.md>), [latency](<https://devfeed.tech/tags/latency.md>), [mpc](<https://devfeed.tech/tags/mpc.md>), [network](<https://devfeed.tech/tags/network.md>), [optimized](<https://devfeed.tech/tags/optimized.md>), [performance](<https://devfeed.tech/tags/performance.md>), [techniques](<https://devfeed.tech/tags/techniques.md>), [transformer](<https://devfeed.tech/tags/transformer.md>)

## AI overview

CipherFlow compiles a high-level AI computation graph into a latency-optimized secure inference program using available cryptographic primitives and the target hardware and network configuration. MicroBench profiles deployment-specific primitive costs; state-expanded planning jointly chooses homomorphic encryption (HE) and secure multi-party computation (MPC) placement, conversions, and ciphertext maintenance subject to cryptographic-state constraints; BlockFold summarizes branched regions to scale planning to Transformer graphs. In evaluation using measured backend costs across CPU/GPU and network settings, CipherFlow achieved up to 16.5x speedup on BERT-base and over 22x on ViT compared with static hybrid placement baselines. The supplied text is an abstract, so it does not provide further evaluation details.

## Source excerpt

arXiv:2611.01450v1 Announce Type: new 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.