How lpd-epfl/byzfl works
ByzFL is a Python library for robust federated learning, combining standalone aggregation and attack algorithms with a simulation framework and benchmarking capability. The principal workflow distributes training data, computes honest-client gradients, creates Byzantine updates, and applies configured robust aggregation to update and evaluate a global model. Benchmarking is documented as a separate capability. Unsampled benchmark internals and some framework wiring are represented at subsystem level; edges rely on README statements or the cited source excerpts.
Main entry points: client.py Honest client · server.py Federated server · model_base_interface.py Model interface · misc.py Array utilities
Components 15
Robust algorithms
- Robust aggregators
byzfl/aggregators/aggregators.py - Pre-aggregators
byzfl/aggregators/preaggregators.py - Byzantine attacks
byzfl/attacks/attacks.py
Federated simulation
- Data distribution
byzfl/fed_framework/data_distributor.py - Honest client
byzfl/fed_framework/client.py - Byzantine client
byzfl/fed_framework/byzantine_client.py - Federated server
byzfl/fed_framework/server.py - Robust aggregation
byzfl/fed_framework/robust_aggregator.py
Models and utilities
- Model definitions
byzfl/fed_framework/models.py - Model interface
byzfl/fed_framework/model_base_interface.py - Parameter conversion
byzfl/utils/conversion.py - Array utilities
byzfl/utils/misc.py - Torch operations
byzfl/utils/torch_tools.py
Benchmarking
- Adversarial benchmarks
byzfl/benchmark
Other components
- Experimenter
Connections 21
- Experimenter → Data distribution: configures data
README.md - Data distribution → Honest client: splits training data
README.md - Experimenter → Honest client: configures clients
README.md - Honest client → Federated server: submits gradients
README.md - Experimenter → Byzantine client: configures attack
README.md - Byzantine client → Byzantine attacks: applies attack
byzfl/fed_framework/byzantine_client.py - Byzantine client → Federated server: supplies faulty updates
README.md - Federated server → Robust aggregation: aggregates updates
byzfl/fed_framework/server.py - Robust aggregation → Robust aggregators: uses aggregator
byzfl/fed_framework/robust_aggregator.py - Robust aggregation → Pre-aggregators: uses preprocessing
byzfl/fed_framework/robust_aggregator.py - Federated server → Model interface: inherits model interface
byzfl/fed_framework/server.py - Honest client → Model interface: inherits model interface
byzfl/fed_framework/client.py - Model interface → Model definitions: instantiates model
byzfl/fed_framework/model_base_interface.py - Model interface → Parameter conversion: flattens parameters
byzfl/fed_framework/model_base_interface.py - Honest client → Parameter conversion: flattens gradients
byzfl/fed_framework/client.py - Robust aggregators → Array utilities: normalizes vectors
byzfl/aggregators/aggregators.py - Pre-aggregators → Array utilities: normalizes vectors
byzfl/aggregators/preaggregators.py - Byzantine attacks → Array utilities: normalizes vectors
byzfl/attacks/attacks.py - Array utilities → Torch operations: dispatches torch ops
byzfl/utils/misc.py - Experimenter → Adversarial benchmarks: runs evaluations
README.md - Federated server → Experimenter: reports accuracy
README.md