EHEIR: Efficient Homomorphic Encrypted Inference via Architectural Redesign
Encrypted inference under homomorphic encryption (HE) imposes stringent constraints on computation, making the direct deployment of deep neural networks infeasible on resource-constrained edge devices. Existing approaches, such as FHEEDGE and UniHENN, primarily focus on improving the efficiency of encrypted computation through algorithmic and systems-level optimizations. In contrast, we adopt a complementary perspective by redesigning neural architectures to align with the inherent cost model of HE operations. In this work, we present a framework that reformulates HE-aware model design as a constrained neural architecture search problem, where the objective is to identify architectures that are both cryptographically feasible and computationally efficient while preserving task performance. Starting from a pretrained network, we perform a structured, iterative transformation process that includes HE-compatible operator substitutions, depth–width trade-offs, and rotation-efficient design strategies such as successive average pooling. These transformations are guided by constraints on ciphertext slots, multiplicative depth, and rotation complexity, and are evaluated using short-horizon training to efficiently explore the architecture space. We provide a theoretical analysis showing that the transformed network approximates the original model with bounded error under layer-wise Lipschitz propagation, ensuring controlled performance degradation. As a case study, we apply the proposed framework to encrypted crack detection for structural health monitoring. The optimized model achieves an execution time of 86.5 seconds for single-threaded CPU inference in the encrypted domain, compared to an estimated 3.5 hours required by the original encrypted convolutional pipeline. Furthermore, deployment on a Raspberry Pi demonstrates end-to-end encrypted inference within approximately 7.5 minutes. These results highlight that architecture-level optimization, when framed as a constrained search problem, complements existing algorithmic acceleration approaches and provides a practical pathway for enabling efficient and privacy-preserving inference on edge devices across a broad class of sensitive AI workloads.