How farooqpersonal12/tara-fl works
TARA-FL is a federated-learning research system that trains an MNIST model across clients and adapts defenses to suspicious updates. Its round workflow prepares client data, performs local training, scores updates, derives client trust and round risk, aggregates updates, and evaluates the global model. The repository also includes configurable experiment runners, attack variants, and plots for analyzing results. Some modules are represented from their tree paths or explicit usage in sampled code; their internal behavior and any unsampled wiring are not inferred.
Main entry points: run_unified.py Experiment runner · main.py Training entry · server.py Federated server · client.py Federated client
Components 18
Federated workflow
- Training entry
main.py - Federated server
server/server.py - Federated client
clients/client.py - Label-flip attack
attacks/label_flip.py
Trust and defense
- PID detector
detection/pid_detector.py - Robust PID detector
detection/robust_pid_detector.py - Trust engine
trustengine/trust_engine.py - Trust history
trustengine/trust_history.py - Round risk
risk/round_risk.py - Adaptive aggregation
aggregation/adaptive_aggregator.py
Experiments and analysis
- Update attacks
attacks/gradient_poison.py - Experiment runner
experiments/run_unified.py - FedAvg baseline
experiments/run_baseline_fedavg.py - Experiment results
experiments/experiments - Result visualization
visualization/plots.py
Model and data
- MNIST partitioning
data/dataset.py - MNIST model
model/model.py
Other components
- Researcher
Connections 27
- Researcher → Training entry: starts training
- Researcher → Experiment runner: configures experiments
- Training entry → MNIST partitioning: loads and partitions
- Training entry → Federated server: creates and queries
- Training entry → Federated client: creates and trains
- Training entry → Label-flip attack: wraps client data
- Training entry → PID detector: scores updates
- Training entry → Trust engine: calculates trust
- Training entry → Round risk: assesses round
- Training entry → Adaptive aggregation: requests aggregation
- Training entry → Federated server: evaluates model
- Federated client → MNIST model: trains and updates
- Federated server → MNIST model: initializes and evaluates
- Federated server → Adaptive aggregation: delegates aggregation
- Trust engine → Trust history: reads and updates
- Experiment runner → MNIST partitioning: loads and partitions
- Experiment runner → Federated client: creates and trains
- Experiment runner → Update attacks: applies update attacks
- Experiment runner → PID detector: scores updates
- Experiment runner → Robust PID detector: selects detector
- Experiment runner → Trust engine: calculates trust
- Experiment runner → Round risk: assesses round
- Experiment runner → Adaptive aggregation: selects aggregation
- Experiment runner → FedAvg baseline: selects baseline
- Experiment runner → Experiment results: writes results
- FedAvg baseline → Experiment results: writes results
- Experiment results → Result visualization: reads results