2PM.Network
WebsiteXDiscordLinkedinGithub
  • Overview
    • What is 2PM.Network
    • Architecture
    • FAQ
    • Official Social Channels
  • 2PM Data VSIES Service
    • What is Data VSIES and why is it important
    • [V] Data Validation (ZK)
    • [SI] Data Standardization and Index
    • [E] Data Encryption Client (FHE)
    • [S] Data Storage and Access
    • Data VSIES SDK
  • Node Framework
    • Modular Architecture
    • Federated Learning
      • Horizontal Federated Learning Task
      • Logistic Regression Task
      • On-chain Secure Aggregation
      • Typical Scenarios
    • FHE Machine Learning
      • Built-in Models
      • Deep Learning
      • Typical Scenarios
    • Task Submission
    • Running a 2PM Node
      • Installation
      • Chain Connector Configuration
      • Data Preparation
      • Joining a Subnet
  • Security and Verification
    • Node Staking and Slash Mechanism
    • Running Verification Client
      • EigenLayer
      • Mind Network
    • Restaking and Delegation
  • Model Inference
    • 2PM Node Inference API
    • Posting Request to a Subnet Model
    • Getting Inference Results on Chain
      • Oracle Adapters
  • Monetization and Incentives
    • AI Model IP Assets
    • Distribution Algorithm
  • 2PM DAO
    • Build Subnets
      • Establishing New Subnets
      • General Requirements
      • Data Schema Definition
      • Model Selection
      • Task Implementation
    • $DMP Token
  • Deployed Smart Contracts
    • Subnets on Testnets
    • Local Deployment Guideline
  • Ecosystem
    • Partners
    • Use Cases
      • Private Personalized Recommendation
Powered by GitBook
On this page
  • Key Features of 2PM FHE Machine Learning
  • Typical Workflow
  1. Node Framework

FHE Machine Learning

PreviousTypical ScenariosNextBuilt-in Models

Last updated 10 months ago

2PM.Network integrates Fully Homomorphic Encryption (FHE) into its Node Framework using , a cutting-edge, open-source machine learning framework that ensures privacy preservation throughout the data science workflow.

ZAMA Concrete ML provides the backbone for 2PM.Network's FHE capabilities. It’s designed to allow data scientists, regardless of their cryptography background, to apply FHE in their machine learning projects. The main appeal of Concrete ML lies in its ability to interface with popular machine learning libraries like scikit-learn and PyTorch, translating conventional ML models into their FHE counterparts effortlessly.

Key Features of 2PM FHE Machine Learning

  1. Automatic Model Conversion:

    • Supports Linear, Tree-Based, and Neural Network Models: Concrete ML enables the conversion of a wide array of machine learning models into FHE-compatible versions. This includes linear models, tree-based models, and even complex structures like neural networks.

    • Use of Familiar APIs: By supporting familiar APIs from libraries such as scikit-learn and PyTorch, Concrete ML allows seamless integration into existing workflows, making the transition to FHE-based models straightforward for data scientists.

  2. Training on Encrypted Data:

    • Privacy by Design: The fundamental advantage of FHE is the capability to perform computations on encrypted data. This means models trained via 2PM.Network can operate on data without ever exposing the raw, decrypted data, thereby maintaining strict data confidentiality.

    • No Compromise on Features: Despite the encrypted nature of the operations, there is no compromise on the functionalities of the applications. Models can still perform complex computations and return accurate results, all while the data remains encrypted.

  3. Encrypted Data Pre-Processing:

    • DataFrame Paradigm: Similar to unencrypted data workflows, 2PM.Network supports pre-processing of encrypted data using a DataFrame-style interface, making it intuitive for those familiar with data science toolkits like pandas.

Typical Workflow

  1. Training the Model:

    • Initially, models are trained on plaintext (unencrypted) data using conventional methods provided by libraries like scikit-learn. This step is crucial for establishing the model's accuracy and effectiveness before encryption.

  2. Compiling the Model:

    • Quantization: Since FHE operates over integers, the trained model is quantized, meaning it is adjusted to operate with integer values only, preparing it for encryption.

    • Conversion and Compilation: Post-quantization, the model is converted into a Concrete Python program and compiled into its FHE equivalent, ready for deployment on encrypted data.

  3. Performing Inference:

    • The FHE version of the model can perform inference directly on encrypted data. This is particularly useful in sensitive applications where data privacy is paramount, such as in healthcare or financial services.

ZAMA Concrete ML