Skip to content

Repository files navigation

Privacy-Robustness Trade-off in Decentralized Federated Learning

This repository contains the official source code for the research paper:

"On the Privacy–Robustness Trade-off in Decentralized Federated Learning under Byzantine Attacks" by Zarè Palanciyan, Qiongxiu Li, and Richard Heusdens

This project rigorously investigates the fundamental trade-off between privacy preservation and adversarial robustness in fully decentralized federated learning (FL). Specifically, we analyze the impact of various privacy mechanisms on the detectability of Byzantine attacks within a Primal-Dual Method of Multipliers (PDMM) based FedAVG framework.

Overview

The core objective of this research is to demonstrate that strengthening privacy inevitably degrades the ability to detect malicious (Byzantine) behavior in decentralized FL. We achieve this by:

  • Implementing a decentralized FedAVG scheme utilizing PDMM for model aggregation.
  • Integrating three distinct privacy-preserving mechanisms: Differential Privacy (DP), Secure Multi-Party Computation (SMPC), and Subspace Perturbation (SP).
  • Simulating a range of active Byzantine attacks to corrupt model updates.
  • Employing a Median Absolute Deviation (MAD) based detection algorithm to identify adversarial nodes.
  • Quantifying the privacy-robustness trade-off using False Alarm Rate (FAR) and Missed Detection Rate (MDR) as key metrics.

Repository Contents

This repository is organized as follows:

  • Supplementary_Material.pdf: the supplementary material of the paper (per-attack FAR/MDR figures, the label permutation, baseline-detector round curves, the complete detector grid, and training/testing curves).
  • AverageFed.py: Core implementation of the PDMM-based FedAVG aggregation logic.
  • Corruption.py: Definitions and implementations of various Byzantine attack models.
  • MDR_and_FAR_Plotter.ipynb: Jupyter notebook for generating the False Alarm Rate (FAR) and Missed Detection Rate (MDR) plots, as seen in the paper's results section.
  • ModelPerformancePlotter.ipynb: Jupyter notebook for analyzing and plotting model performance metrics, such as training and testing loss/accuracy.
  • README.md: This file.
  • UtilityGraph.py: Utilities for generating and managing the decentralized network graph.

Reproducing the results

Every reported configuration uses the five seeds 42-46, fixed in the released scripts. The pipeline is:

  1. hpc/run_sweep.py, driven by the Slurm scripts in hpc/, trains and runs detection for one configuration and writes one result file per configuration.
  2. analysis/reduce_runs.py reduces the raw runs to the JSON files shipped in analysis/results/.
  3. The analysis/make_*.py scripts render the paper's figures and tables from there; analysis/README.md states what each script needs.

Dependencies are pinned in requirements-simulation.txt (training and sweeps) and requirements-analysis.txt (reduction and figures). The raw per-run records (about 1.1 GB) are available from the authors on request.

Data availability

The complete raw data behind the paper's figures and tables is archived as a single tarball (126 MB compressed; 1.1 GB and 4,486 files unpacked):

  • Download: https://drive.google.com/drive/folders/1gnynOOsg9y-PWlnW41ZDKd7UA-GkzUgS?usp=sharing
  • File: fedprivbyz-reviewer-data.tar.gz, SHA-256 d38099e50ffcaf96fe54a516addc75549a5fe56d363f2787e1f083eb30773d0d
  • Contents: runs/ (one raw result file per configuration, seeds 42--46, covering the repetition study, the six detection rules and the sensitivity sweeps), runs_index.pkl, reduced/ (the records behind Fig. 4 and Tables III--IV), training_curves/ (the records behind the supplementary loss/accuracy curves), slurm_logs/ (campaign provenance), and a README mapping each folder to the figures and tables it backs.

Unpack with tar -xzf fedprivbyz-reviewer-data.tar.gz and see the README inside, together with analysis/README.md in this repository, to regenerate every figure and table.

About

Investigating the fundamental trade-off between privacy preservation (DP, SMPC, SP) and adversarial detection in decentralized federated learning (FedAVG/PDMM). Includes various Byzantine attack simulations.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages