MetaKernel: Enabling Efficient Encrypted Neural Network Inference through Unified MVM and Convolution

Practical encrypted neural network inference under the CKKS fully homomorphic encryption (FHE) scheme relies heavily on accelerating two key kernel operations: Matrix-Vector Multiplication (MVM) and Convolution (Conv). However, existing solutions—such as expert-tuned libraries and domain-specific languages—are designed in an ad hoc manner, leading to significant inefficiencies caused by excessive rotations. We introduce MKR, a novel composition-based compiler approach that optimizes MVM and Conv kernel operations for DNN models under CKKS within a unified framework. MKR decomposes each kernel into composable units, called MetaKernels, to enhance SIMD parallelism within ciphertexts (via horizontal batching) and computational parallelism across them (via vertical batching). Our approach tackles previously unaddressed challenges, including reducing rotation overhead through a rotation-aware cost model for data packing, while also ensuring high slot utilization, uniform handling of inputs with arbitrary sizes, and compatibility with the output tensor layout. Implemented in a production-quality FHE compiler, MKR achieves inference time speedups of 10.08×–185.60× for individual MVM and Conv kernels and 1.75×–11.84× for end-to-end inference compared to a state-of-the-art FHE compiler. Moreover, MKR enables homomorphic execution of large DNN models, where prior methods fail, significantly advancing the practicality of FHE compilers.

Authors

Institutions

Publication Details

Journal
Proceedings of the ACM on Programming Languages
Published
2025-10-09
DOI
https://doi.org/10.1145/3763095
Citations
2
Primary Topic
Cryptography and Data Security
Type
article
Field-Weighted Citation Impact
4.96
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

MetaKernel: Enabling Efficient Encrypted Neural Network Inference through Unified MVM and Convolution

Linjie Xiao, X. D. Zhang, Jingling Xue, Yan Liu et al.
2 citations
Proceedings of the ACM on Programming Languages
Cryptography and Data Security
4.96
article

MetaKernel: Enabling Efficient Encrypted Neural Network Inference through Unified MVM and Convolution

Linjie Xiao, X. D. Zhang, Jingling Xue, Yan Liu, Long Li, Qing Zhu, J. W. Lai, Peng Yuan, Tianxiang Sui
article en
2 citations

Abstract

Practical encrypted neural network inference under the CKKS fully homomorphic encryption (FHE) scheme relies heavily on accelerating two key kernel operations: Matrix-Vector Multiplication (MVM) and Convolution (Conv). However, existing solutions—such as expert-tuned libraries and domain-specific languages—are designed in an ad hoc manner, leading to significant inefficiencies caused by excessive rotations. We introduce MKR, a novel composition-based compiler approach that optimizes MVM and Conv kernel operations for DNN models under CKKS within a unified framework. MKR decomposes each kernel into composable units, called MetaKernels, to enhance SIMD parallelism within ciphertexts (via horizontal batching) and computational parallelism across them (via vertical batching). Our approach tackles previously unaddressed challenges, including reducing rotation overhead through a rotation-aware cost model for data packing, while also ensuring high slot utilization, uniform handling of inputs with arbitrary sizes, and compatibility with the output tensor layout. Implemented in a production-quality FHE compiler, MKR achieves inference time speedups of 10.08×–185.60× for individual MVM and Conv kernels and 1.75×–11.84× for end-to-end inference compared to a state-of-the-art FHE compiler. Moreover, MKR enables homomorphic execution of large DNN models, where prior methods fail, significantly advancing the practicality of FHE compilers.

Proceedings of the ACM on Programming LanguagesVol. 9(OOPSLA2)
UNSW Sydney (AU)
Openalex Percentile: Top 5%
Cryptography and Data Security
4.96
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

MetaKernel: Enabling Efficient Encrypted Neural Network Inference through Unified MVM and Convolution — Linjie Xiao, X. D. Zhang, et al. · Proceedings of the ACM on Programming Languages (2025) | TGRS Research Map | TGRS