Skip to content

MMw-Unibo/MPFL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MPFL: Membership Proof in Federated Learning

This repository contains the implementation of MPFL (Membership Proof in Federated Learning), as described in our paper:

I Trained That! Client-Side Proof of Participation in Federated Learning
Carlo Mazzocca*, Alessio Mora, Nicolò Romandini, Rebecca Montanari, Paolo Bellavista
*University of Salerno, University of Bologna
Contact authors

MPFL enables clients to cryptographically verify their participation in Federated Learning rounds using smart contracts and cryptographic accumulators.

Overview

In Federated Learning (FL), model updates from clients are typically sent to a central server for aggregation. However, clients have no direct way to confirm that their updates were actually used in the global model.

MPFL solves this by:

  • Using a smart contract to run Federated Averaging (FedAvg).
  • Generating a cryptographic proof of participation for every client whose update is included.
  • Leveraging Hyperledger Fabric to ensure trust, decentralization, and tamper-resistance.

System Setup

  • Blockchain Framework: Hyperledger Fabric
  • Consensus Protocol: Raft
  • Organizations: 6
  • Peers: 1 per organization (total: 6)
  • Ordering Nodes: 1
  • Endorsement Policy: Majority (≥ 4 out of 6 peers)
  • Smart Contract Language: Node.js
  • Hardware:
    • CPU: Intel(R) Core(TM) i5-3470 @ 3.20GHz
    • RAM: 32 GB

Features

  • FL round orchestration via smart contracts
  • Update inclusion auditing using cryptographic accumulators
  • Proof generation and client-side verification
  • Tested across diverse ML models and datasets

Getting Started

These steps assume you have Docker and Hyperledger Fabric binaries installed on your system.

  1. Clone the Repository
    Clone the MPFL repository and navigate into the project directory:

    git clone https://github.com/MMw-Unibo/MPFL.git
    cd MPFL
  2. Start the Fabric Network
    You can use the scripts provided in the following repository to start a production-grade Fabric network with 6 peer nodes and 1 orderer node:
    Production Fabric Network Scripts

  3. Deploy the Smart Contract
    From within the Fabric network folder, run the following command to deploy the smart contract:

    ./network.sh deployCC -ccn fl -ccp /path/to/fl-chaincode/ -ccl javascript -cci Init -c production-channel

    Replace /path/to/fl-chaincode/ with the actual path to the smart contract directory.

  4. Deploy the Clients
    The client implementation follows the design described in FlowChain. An example configuration is included in this repository, which you can modify or duplicate to add more clients.

    Configuration steps:

    • Place the cert.pem and priv_sk (private key) files of the Fabric user inside client1/org-node/credentials/.
    • Edit connection-org1.json to include the appropriate network configuration for that user.

    Running the clients:

    • Start the organization node (inside client1/org-node/):
      node org1.js
    • Start the Flower server (inside client1/):
      python3 server1.py
    • Start the Flower client (inside client1/):
      python3 client1.py

About

Membership Proof in Federated Learning via Cryptographic Accumulators

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published