WTF is FHEML

4/2/2024, 3:22:19 PM
Advanced
Blockchain
Exploring Fully Homomorphic Encryption-based Machine Learning (FHEML), a revolutionary technology that enables computations on encrypted data, ensuring data privacy and security. Learn about the primary use cases of FHEML, including outsourced computation, encrypted inference and encrypted training insights, as well as the top frameworks and libraries supporting FHEML development.

A bit on FHE first

Fully Homomorphic Encryption (FHE) represents a class of encryption techniques designed to allow meaningful computations to be performed on encrypted data. This means that when the results of such computations are decrypted, they are consistent with the outcomes that would have been obtained if those computations has been performed on the on plaintext, data.

In short

fenc is some homomorphic encryption function

Where

Homomorphic property preserves computation in encrypted space

Within the broader FHE category, We generally see the categorization of FHE schemes into two of three types of FHE schemes which are

  • Somewhat Homomorphic Encryption (SHE): Supports a limited number of addition and multiplication operations on ciphertext.
  • Fully Homomorphic Encryption (FHE): Supports any number of multiplication and/or addition operations on ciphertext without compromising it’s integrity while decryption.
  • Partial Homomorphic Encryption (Partial HE): Supports either addition or multiplication operation on ciphertext, but not both.

Earlier attempts in ML with FHE

The exploration of machine learning (ML) with fully homomorphic encryption (FHE) directly contributes towards privacy preserving computation enablings computations to be performed on encrypted data.

This area has seen several notable contributions, such as that of Lauter’s (2021) exposition on the integration of homomorphic encryption with AI for private training and predictions, highlighting the marriage of cryptography and machine learning to safeguard data privacy while leveraging AI’s power.

Further, the work on privacy-preserving deep neural networks using FHE, as detailed in a study focusing on a hybrid model of FHE and Multi-Party Computation (MPC) for evaluating non-arithmetic functions in ML models, pushes the boundary on maintaining data and model confidentiality during computations.

Graepel, Lauter, and Naehrig’s (2012) seminal paper on ML Confidential introduces the application of somewhat homomorphic encryption to delegate ML computations to compute services securely, enabling confidential ML algorithms that ensure data secrecy. Additionally, research into logistic regression and unsupervised learning algorithms on encrypted data exemplifies the practical application and adaptation of traditional ML methods to operate under encryption constraints, demonstrating the feasibility and efficiency of such approaches in preserving data privacy. These works collectively underscore the critical intersection of machine learning and cryptography, offering a blueprint for future research on secure, privacy-preserving ML algorithms.

Introduction to FHEML

Fully Homomorphic Encryption based Machine Learning (FHEML) is a way where we implement machine learning algorithms that utilize fully homomorphic encryption schemes. It enables computations to be carried out on encrypted data, ensuring the confidentiality of the data which is being processed.

FHEML can be seen as complementary to Zero-Knowledge Machine Learning (ZKML), where the latter focuses on proving the correct execution of machine learning algorithms, while FHEML emphasizes performing computations on encrypted data to maintain data privacy.

The essence of FHEML lies in its ability to enable computations on encrypted data in such a way that, once the computation results are decrypted, they match the results that would have been obtained if the computations had been performed on the original, plaintext data. This capability opens up significant scope for machine learning applications because it allows algorithms to operate on encrypted data without compromising the privacy or security of the data.

It can be visualized as:

computation on encrypted data

FHEML consists of machine learning algorithms that are adapted to work with fully homomorphic encryption schemes. By leveraging these schemes, FHEML opens the door to a wide range of privacy-centric machine learning use cases. At a high level, this includes confidential computing, encrypted training, and private inferences, among others. Such advancements not only enhance data security but also expand the potential applications of machine learning in sensitive and privacy-demanding contexts.

Existing libraries in the direction of FHEML

Few libraries and frameworks towards FHEML, For now there is not set standard for writing FHEML programs but few of the most popular frameworks and libraries for building FHEML programs are:

Concrete-ml is library created by Zama, built on top of their low-level TFHE compiler, Concrete which allows for the compilation of arbitrary python code into FHE circuits, enabling developers to write functions in python which can perform computations over encrypted data.

Concrete-ml enables developers to work with familiar machine learning API (linear models, tree based models, neural network) available in scikit learn or other frameworks, allows for the conversion of PyTorch models into there FHE-compatible versions, stochastic gradient descent based classifiers which can be trained on encrypted data etc . Concrete-ml significantly lowers the barrier to entry for implementing ml operations on encrypted data.

Tenseal, developed by the OpenMined community, Focuses on enabling homomorphic operations on tensors (fundamental units in neural networks and can represent or manipulate data in a variety of forms). Built on top of Microsoft SEAL (Simple Encrypted Arithematic Library), Tenseal provides an efficient, Python-accessible API with underlying operations written in C++ for enhanced performance for enabling HE function on encrypted tensors.

PySyft, is another contribution from OpenMined aimed at secure and private deep learning in Python. It’s built with homomorphic encryption capabilities of Tenseal to enhance its privacy-preserving functionalities. PySyft introduces the CKKS tensor, based on the CKKS homomorphic encryption scheme, enabling operations on real numbers and providing approximate results. This extends beyond homomorphic encryption, It also incorporating secure multiparty computation and differential privacy to offer a comprehensive suite for privacy-preserving machine learning.

TF Encrypted, is a framework designed for encrypted machine learning within the TensorFlow ecosystem. Mimicking the TensorFlow experience, particularly through the Keras API, TF Encrypted facilitates training and prediction on encrypted data. It leverages secure multi-party computation and homomorphic encryption to provide privacy-preserving machine learning capabilities. TF Encrypted aims to democratize encrypted machine learning by making it accessible to those without a deep background in cryptography, distributed systems, or high-performance computing.

Few generic usecase of FHEML

Outsourcing computation

Since, computation occurs over encrypted data now the party which wants the computations to happen can safely share the encrypted form of the data to third party to process.

Encrypted Inferences

It facilitates encrypted inferencing, Where the inference requested by user is not revealed to the models and remain encrypted by default and only the user can decrypt it with their keys.

Encrypted Training Insights

Empower businesses to leverage encrypted forms of sensitive data to train machine learning models and derive insights. This enables organizations to utilize their data for enhancing operations, developing new strategies, and improving decision-making processes, all while ensuring the utmost privacy and security of the data involved.

Disclaimer:

  1. This article is reprinted from [Foresightnews]. Forward the Original Title‘速览 Gitcoin 推出的 Allo Protocol:社区赠款计划的协议层基础设施’.All copyrights belong to the original author [Frank, Foresight News]. If there are objections to this reprint, please contact the Gate Learn team, and they will handle it promptly.

  2. Liability Disclaimer: The views and opinions expressed in this article are solely those of the author and do not constitute any investment advice.

  3. Translations of the article into other languages are done by the Gate Learn team. Unless mentioned, copying, distributing, or plagiarizing the translated articles is prohibited.

Share

Crypto Calendar

Project Updates
Etherex will launch the token REX on August 6.
REX
22.27%
2025-08-06
Rare Dev & Governance Day in Las Vegas
Cardano will host the Rare Dev & Governance Day in Las Vegas, from August 6 to 7, featuring workshops, hackathons and panel discussions focused on technical development and governance topics.
ADA
-3.44%
2025-08-06
Blockchain.Rio in Rio De Janeiro
Stellar will participate in the Blockchain.Rio conference, scheduled to be held in Rio de Janeiro, from August 5 to 7. The program will include keynotes and panel discussions featuring representatives of the Stellar ecosystem in collaboration with partners Cheesecake Labs and NearX.
XLM
-3.18%
2025-08-06
Webinar
Circle has announced a live Executive Insights webinar titled “The GENIUS Act Era Begins”, scheduled for August 7, 2025, at 14:00 UTC. The session will explore the implications of the newly passed GENIUS Act—the first federal regulatory framework for payment stablecoins in the United States. Circle’s Dante Disparte and Corey Then will lead the discussion on how the legislation impacts digital asset innovation, regulatory clarity, and the US’s leadership in global financial infrastructure.
USDC
-0.03%
2025-08-06
AMA on X
Ankr will host an AMA on X on August 7th at 16:00 UTC, focusing on DogeOS’s work in building the application layer for DOGE.
ANKR
-3.23%
2025-08-06

Related Articles

Solana Need L2s And Appchains?
Advanced

Solana Need L2s And Appchains?

Solana faces both opportunities and challenges in its development. Recently, severe network congestion has led to a high transaction failure rate and increased fees. Consequently, some have suggested using Layer 2 and appchain technologies to address this issue. This article explores the feasibility of this strategy.
6/24/2024, 1:39:17 AM
The Future of Cross-Chain Bridges: Full-Chain Interoperability Becomes Inevitable, Liquidity Bridges Will Decline
Beginner

The Future of Cross-Chain Bridges: Full-Chain Interoperability Becomes Inevitable, Liquidity Bridges Will Decline

This article explores the development trends, applications, and prospects of cross-chain bridges.
12/27/2023, 7:44:05 AM
Sui: How are users leveraging its speed, security, & scalability?
Intermediate

Sui: How are users leveraging its speed, security, & scalability?

Sui is a PoS L1 blockchain with a novel architecture whose object-centric model enables parallelization of transactions through verifier level scaling. In this research paper the unique features of the Sui blockchain will be introduced, the economic prospects of SUI tokens will be presented, and it will be explained how investors can learn about which dApps are driving the use of the chain through the Sui application campaign.
6/13/2024, 8:23:51 AM
Navigating the Zero Knowledge Landscape
Advanced

Navigating the Zero Knowledge Landscape

This article introduces the technical principles, framework, and applications of Zero-Knowledge (ZK) technology, covering aspects from privacy, identity (ID), decentralized exchanges (DEX), to oracles.
1/4/2024, 4:01:13 PM
What Is Ethereum 2.0? Understanding The Merge
Intermediate

What Is Ethereum 2.0? Understanding The Merge

A change in one of the top cryptocurrencies that might impact the whole ecosystem
1/18/2023, 2:25:24 PM
What is Tronscan and How Can You Use it in 2025?
Beginner

What is Tronscan and How Can You Use it in 2025?

Tronscan is a blockchain explorer that goes beyond the basics, offering wallet management, token tracking, smart contract insights, and governance participation. By 2025, it has evolved with enhanced security features, expanded analytics, cross-chain integration, and improved mobile experience. The platform now includes advanced biometric authentication, real-time transaction monitoring, and a comprehensive DeFi dashboard. Developers benefit from AI-powered smart contract analysis and improved testing environments, while users enjoy a unified multi-chain portfolio view and gesture-based navigation on mobile devices.
5/22/2025, 3:13:17 AM
Start Now
Sign up and get a
$100
Voucher!