forked from sergts/botnet-traffic-analysis
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or requestfederated-learningFederated learning related issuesFederated learning related issuesmodernizationModernizing code, dependencies, and structureModernizing code, dependencies, and structure
Description
Goal
Replace incomplete TensorFlow Federated implementation with modern Flower framework.
Background
Current State (TFF):
- TensorFlow Federated 0.40.0
- Impossible to install (dependency conflicts)
- Never successfully used botnet data (used EMNIST instead)
- Simulation-only, not production-ready
Target (Flower):
- Modern, actively maintained
- Better documentation
- Framework-agnostic
- Production deployment support
Implementation
Architecture
src/federated_learning/
├── __init__.py
├── flower/
│ ├── __init__.py
│ ├── server.py # Flower server
│ ├── client.py # Device clients
│ └── strategy.py # Custom FedAvg
├── simulation/
│ ├── __init__.py
│ └── run_simulation.py # FL simulation
└── utils/
├── __init__.py
└── aggregation.py
Components
Server (server.py):
- Orchest rates federated training
- Aggregates client updates
- Custom FedAvg strategy
Client (client.py):
- One client per IoT device (9 total)
- Local training on device data
- Send updates to server
Simulation (run_simulation.py):
- Simulated FL environment
- Test before deployment
Tasks
- Install Flower (flwr)
- Implement server
- Implement client
- Implement custom aggregation strategy
- Create simulation framework
- Run experiments
- Compare centralized vs federated accuracy
- Document FL implementation
- Create deployment guide
Experiments
- Baseline: Centralized training (all devices)
- Local: Per-device models (no aggregation)
- Federated: Flower FL (FedAvg)
Metrics:
- Accuracy (global and per-device)
- Communication rounds
- Training time
- Model size
Research Questions
- Does FL maintain accuracy vs centralized?
- Can we achieve device-specific personalization?
- What is the communication cost?
- How does it scale?
Related
- Replaces Fix deprecated pandas.append() calls #14 (old TFF issue)
- Part of MODERNIZATION_ROADMAP.md Phase 5.1
- Related to Research modern TensorFlow Federated implementation #22 (FL research)
Priority
HIGH - Core feature for federated learning capability
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestfederated-learningFederated learning related issuesFederated learning related issuesmodernizationModernizing code, dependencies, and structureModernizing code, dependencies, and structure