This repository contains the experimental code for PRISM-FL, a scalar-verification framework for privacy-aware malicious-update detection in federated learning.
main.py: main experiment entry point.config/: YAML experiment configurations.experiments/: scripts for the paper experiments, ablations, sensitivity studies, and benchmark runs.aggregation/: FedAvg, Krum, Median, FLTrust, and PRISM-FL aggregation logic.attacks/: gradient flipping, scaling, label flipping, backdoor, noise, and adaptive attacks.defense/,privacy/,crypto/: verification, privacy, and simulated secure-protocol components.fl_core/: client/server training loop.models/: model definitions.data/: data loaders and partitioning utilities.visualization/: plotting scripts for experimental figures.utils/: logging, metrics, I/O, and reproducibility helpers.
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtOn Windows PowerShell:
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txtRun a smoke-style experiment with the default configuration:
python main.py --config config/default.yamlRun the bundled experiment launcher:
python experiments/run_all.py --config config/default.yaml --exp allMost paper-specific runs are under experiments/, including run_journal_suite.py, run_v18_atomic.py, and the run_v18_*.sh launch scripts.
Large raw datasets are not included in this repository. Place local VeReMi data under:
data/veremi_extension/
The loaders in data/ can also generate synthetic VeReMi-like data for quick tests where supported by the selected configuration.
Experiment outputs are written to results/ by default. This directory is ignored by Git because it can contain large logs, CSV files, and model artifacts.
- Set random seeds through the configuration files where applicable.
- Keep generated results, model checkpoints, and downloaded datasets out of version control.
- Use the exact configuration file and script name when reporting a reproduced table or figure.