[Paper Review] Conditionals in Homomorphic Encryption and Machine Learning Applications
This paper identifies conditionals—specifically comparisons and selection operations—as fundamental obstacles to fully implementing machine learning with homomorphic encryption. It proposes a novel, purely homomorphic approach to implement these operations without relying on secure multiparty computation or intermediate decryptions, demonstrating feasibility under levelled homomorphic encryption with accuracy dependent on data spacing and operation depth.
Homomorphic encryption aims at allowing computations on encrypted data without decryption other than that of the final result. This could provide an elegant solution to the issue of privacy preservation in data-based applications, such as those using machine learning, but several open issues hamper this plan. In this work we assess the possibility for homomorphic encryption to fully implement its program without relying on other techniques, such as multiparty computation (SMPC), which may be impossible in many use cases (for instance due to the high level of communication required). We proceed in two steps: i) on the basis of the structured program theorem (Bohm-Jacopini theorem) we identify the relevant minimal set of operations homomorphic encryption must be able to perform to implement any algorithm; and ii) we analyse the possibility to solve -- and propose an implementation for -- the most fundamentally relevant issue as it emerges from our analysis, that is, the implementation of conditionals (requiring comparison and selection/jump operations). We show how this issue clashes with the fundamental requirements of homomorphic encryption and could represent a drawback for its use as a complete solution for privacy preservation in data-based applications, in particular machine learning ones. Our approach for comparisons is novel and entirely embedded in homomorphic encryption, while previous studies relied on other techniques, such as SMPC, demanding high level of communication among parties, and decryption of intermediate results from data-owners. Our protocol is also provably safe (sharing the same safety as the homomorphic encryption schemes), differently from other techniques such as Order-Preserving/Revealing-Encryption (OPE/ORE).
Motivation & Objective
- To determine whether homomorphic encryption can natively support all algorithmic operations required for general-purpose computation, particularly conditionals, without external techniques like secure multiparty computation.
- To analyze the fundamental incompatibility between conditional operations (comparisons and jumps) and the semantic security of homomorphic encryption.
- To propose a practical, provably secure implementation of conditionals within homomorphic encryption that avoids intermediate decryptions and high-communication protocols.
- To evaluate the feasibility of using homomorphic encryption for privacy-preserving machine learning, especially in training phases requiring stopping criteria and heuristic decisions.
- To identify whether certain classes of algorithms—particularly those avoiding run-time decisions—can be securely and efficiently executed under homomorphic encryption.
Proposed method
- Leveraging the structured program theorem to define the minimal set of operations (sequence, selection, iteration) required for any computable function.
- Focusing on the implementation of comparison and selection operations as the core challenge, since they are essential for conditionals and clash with semantic security.
- Designing a novel, fully homomorphic protocol for comparisons using polynomial approximations and encoding techniques that preserve privacy and correctness.
- Implementing selection (conditional jumps) via homomorphic evaluation of piecewise functions without decryption, ensuring compatibility with the encryption scheme’s security model.
- Analyzing the impact of operation depth on accuracy, particularly in levelled homomorphic encryption without bootstrapping, and identifying thresholds (e.g., 9 multiplications) where accuracy degrades.
- Evaluating the approach on inter-spaced data points to assess practical accuracy and feasibility under real-world constraints.
Experimental results
Research questions
- RQ1Can homomorphic encryption natively support conditional operations such as comparisons and selections without relying on external protocols like secure multiparty computation?
- RQ2What are the fundamental incompatibilities between implementing conditionals and the semantic security guarantees of homomorphic encryption?
- RQ3How can comparisons be implemented in a fully homomorphic setting without intermediate decryption or high-communication protocols?
- RQ4To what extent does the depth of consecutive operations in levelled homomorphic encryption affect the accuracy of conditional logic in machine learning?
- RQ5Are there classes of machine learning algorithms that can be securely executed under homomorphic encryption by avoiding run-time decision-making?
Key findings
- The implementation of conditionals in homomorphic encryption faces a fundamental tension with semantic security, as selection and jump operations inherently leak information about data values.
- A novel, provably secure method for implementing comparisons and selections is proposed that operates entirely within homomorphic encryption, avoiding intermediate decryptions and SMPC.
- Accuracy of the proposed method depends on data spacing and operation depth; percent-level accuracy is achievable when data points are sufficiently separated.
- The method performs reliably for up to 9 multiplications in levelled schemes, with degradation increasing beyond this threshold.
- The stopping criterion in machine learning training and heuristic-based decisions clash with homomorphic encryption, as both require run-time conditional logic that compromises privacy.
- Algorithms avoiding run-time decisions—such as pure database queries—can be securely and efficiently executed using the proposed approach, indicating a viable niche for homomorphic encryption.
Better researchstarts right now
From reading papers to final review, dramatically reduce your research time.
No credit card · Free plan available
This review was created by AI and reviewed by human editors.