CipherFlow: Compiling AI Programs for Efficient Cryptographically Secure Inference

Hedong Zhang, Mengxin Zheng, Qian Lou
11/1/2026
cs.CRcs.LG
transformer-attention

No confident code implementation found for this paper.

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{zhang2026cipherflow,
  title  = {CipherFlow: Compiling AI Programs for Efficient Cryptographically Secure Inference},
  author = {Hedong Zhang and Mengxin Zheng and Qian Lou},
  year   = {2026},
  eprint = {2611.01450},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2611.01450v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2611.01450.svg)](https://codeofpaper.com/paper/2611.01450)

Discussion