Testing and Understanding Deviation Behaviors in FHE-Hardened Machine Learning Models

Yiteng PENG, Daoyuan WU*, Zhibo LIU, Dongwei XIAO, Zhenlan JI, Juergen RAHMEL, Shuai WANG*

*Corresponding author for this work

Research output: Book Chapters | Papers in Conference ProceedingsConference paper (refereed)Researchpeer-review

1 Citation (Scopus)

Abstract

Fully homomorphic encryption (FHE) is a promising cryptographic primitive that enables secure computation over encrypted data. A primary use of FHE is to support privacypreserving machine learning (ML) on public cloud infrastructures. Despite the rapid development of FHE-based ML (or HE-ML), the community lacks a systematic understanding of their robustness. In this paper, we aim to systematically test and understand the deviation behaviors of HE-ML models, where the same input causes deviant outputs between FHE-hardened models and their plaintext versions, leading to completely incorrect model predictions. To effectively uncover deviation-triggering inputs under the constraints of expensive FHE computations, we design a novel differential testing tool called HEDIFF, which leverages the margin metric on the plaintext model as guidance to drive targeted testing on FHE models. For the identified deviation inputs, we further analyze them to determine whether they exhibit general noise patterns that are transferable. We evaluate HEDIFF using three popular HE-ML frameworks, covering 12 different combinations of models and datasets. HEDIFF successfully detected hundreds of deviation inputs across almost every tested FHE framework and model. We also quantitatively show that the identified deviation inputs are (visually) meaningful in comparison to regular inputs. Further schematic analysis reveals the root cause of these deviant inputs and allows us to generalize their noise patterns for more directed testing. Our work sheds light on enabling robust HE-ML for real-world usage.

Original languageEnglish
Title of host publicationProceedings - 2025 IEEE/ACM 47th International Conference on Software Engineering, ICSE 2025
PublisherIEEE Computer Society
Pages2251-2263
Number of pages13
ISBN (Electronic)9798331505691
ISBN (Print)9798331505707
DOIs
Publication statusPublished - Jul 2025
Externally publishedYes
Event47th IEEE/ACM International Conference on Software Engineering - Ottawa, Canada
Duration: 26 Apr 20256 May 2025

Conference

Conference47th IEEE/ACM International Conference on Software Engineering
Abbreviated title ICSE 2025
Country/TerritoryCanada
CityOttawa
Period26/04/256/05/25

Bibliographical note

Acknowledgement:
We thank the anonymous reviewers for their valuable feedback. We also thank the developers of the HE-ML projects we used in our evaluation.

Publisher Copyright:
© 2025 IEEE.

Funding

The HKUST authors were supported in part by a RGC GRF grant under the contract 16214723, RGC CRF grant under the contract C6015-23G, and research fund provided by HSBC.

Fingerprint

Dive into the research topics of 'Testing and Understanding Deviation Behaviors in FHE-Hardened Machine Learning Models'. Together they form a unique fingerprint.

Cite this