← Lab /AI/ML

MOAI reduces HE-secure transformer inference time by over 50%

MOAI achieves a 52.8% reduction in evaluation time versus THOR and 55.7% versus Powerformer for secure transformer inference

AI/ML arXiv 10 Nov 2026 Method Prototype evidence

Published as “MOAI: Module-Optimizing Architecture for non-interactive secure transformer Inference”

Why it matters

Reducing secure inference to a few minutes per input makes FHE-based transformer services far more practical for real-world deployments.

Summary

MOAI cuts secure transformer inference time by 52.8% versus THOR and 55.7% versus Powerformer, achieving 2.36 minutes per input on a single GPU; it does so by using consistent matrix packing, rotation-free Softmax/LayerNorm, and fewer HE rotations, with only a tiny drop in GLUE accuracy (e.g., 93.8 vs 93.9 on SST-2). The evidence comes from end-to-end benchmarks on BERT-base (amortized over 256 inputs) and GLUE scores, compared against the same-hardware baselines.

What they found 2

  1. 52.8% reduction in evaluation time versus THOR

    “We achieve a 52.8% reduction in evaluation time compared to the HE-based non-interactive secure transformer inference, THOR (Moon et al., CCS’25).”

  2. At least 1.7× fewer HE rotations across all matrix multiplications

    “MOAI uses at least 1.7x fewer HE rotations compared to the works across all matrix multiplications of BERT-base.”

Caveats 3

  • Encrypted GLUE scores are slightly lower than plaintext: SST-2 93.8 vs 93.9, QNLI 90.5 vs 90.7, RTE 65.5 vs 65.7.
  • We do not compare end-to-end time with NEXUS Zhang et al. (2024a), since it only provides microbenchmark results.
  • THOR does not provide an open-source CPU implementation nor report CPU results, so we omit the CPU time for THOR.

What’s new here 4

  • Consistent matrix packing across all layers eliminates costly format conversions.
  • Rotation-free algorithms for Softmax and LayerNorm remove 2448 HE rotations.
  • Column packing and interleaved batching further reduce rotations in matrix multiplications, achieving at least 1.7× fewer rotations than prior work.
  • A plug-and-play FHE framework that works without modifying transformer components, enabling reuse of existing pretrained models.