Skip to content
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
9a33073
Initial plan
Copilot Feb 3, 2026
df5e70a
Add adaptive attack implementations and documentation
Copilot Feb 3, 2026
4b3e5ea
Integrate adaptive attacks into client runner and add tests
Copilot Feb 3, 2026
474edda
Address code review feedback - improve error handling and documentation
Copilot Feb 3, 2026
3290831
Add implementation summary and finalize adaptive attacks feature
Copilot Feb 3, 2026
51a7914
Add production experiment docs & scripts
self1am Feb 5, 2026
0e34928
Use multiprocessing for server and relax resources
self1am Feb 6, 2026
2b05ebe
Wait on server, capture client logs
self1am Feb 6, 2026
928b777
Update client_orchestrator.py
self1am Feb 6, 2026
b00747c
Run server as subprocess with logging
self1am Feb 6, 2026
360014c
Update experiment_runner.py
self1am Feb 6, 2026
ebd8b49
Resolve merge conflict: combine subprocess server approach with serve…
self1am Feb 9, 2026
a8f05e7
Create production_test.yaml
self1am Feb 10, 2026
eaf6b3e
Update production_test.yaml
self1am Feb 10, 2026
061ab24
Update mnist_handler.py
self1am Feb 10, 2026
16e44a9
Add Ray-based Flower simulation runner and configs
self1am Feb 10, 2026
9013130
Update baseline_100_clients.yaml
self1am Feb 10, 2026
8d0f430
Update baseline_100_clients.yaml
self1am Feb 10, 2026
aa9e311
fail proofing
self1am Feb 12, 2026
af8c7ed
Revert "fail proofing"
self1am Feb 12, 2026
bf8a468
ram monitor scripts
self1am Feb 13, 2026
6e94ec8
cpu monitor scripts
self1am Feb 13, 2026
eb99a35
baseline config expands
self1am Feb 13, 2026
2e86b90
baseline config expands
self1am Feb 13, 2026
54946b7
Update baseline_100_clients_optimized.yaml
self1am Feb 14, 2026
f1878a1
Revert "Update baseline_100_clients_optimized.yaml"
self1am Feb 14, 2026
4f46c08
Add attack/defense experiment configs
self1am Feb 15, 2026
f7f26c2
Standardize experiment configs and add summary
self1am Feb 15, 2026
07142a3
Update label_flip.py
self1am Feb 15, 2026
d1b694e
Update static attack config to 40% malicious
self1am Feb 16, 2026
20cfb35
Add Krum support and extend defence config
self1am Feb 16, 2026
602dcd4
Increase attack intensity and add strong no-defence config
self1am Feb 16, 2026
0cd88af
Update krum_defence.py
self1am Feb 16, 2026
0b9321a
Update static_attacks_horizontal_defence.yaml
self1am Feb 16, 2026
f1e2bfc
Update static_attacks_no_defence_STRONG.yaml
self1am Feb 20, 2026
ed6a04a
Update static_attacks_no_defence_STRONG.yaml
self1am Feb 20, 2026
cff7729
Update multi_krum_defence_test.yaml
self1am Feb 20, 2026
1821134
Update multi_krum_defence_test.yaml
self1am Feb 21, 2026
94e69c1
Update static_attacks_cognitive_defence.yaml
self1am Feb 21, 2026
3487e45
Add cloud VM setup and rename defence strategy
self1am Feb 21, 2026
6df58ea
Update static_attacks_vertical_defence.yaml
self1am Feb 21, 2026
1c0c248
Update dny_opt_attack_test.yaml
self1am Feb 21, 2026
f4a901c
Update dny_opt_attack_test.yaml
self1am Feb 21, 2026
5d17fb3
Create dny_opt_attack_no_defence.yaml
self1am Feb 21, 2026
aed4b0c
Update stat_opt_attack_test.yaml
self1am Feb 22, 2026
185d207
Add experiment configs, analysis, and fix VERT
self1am Feb 26, 2026
21e556e
Update vert_defence.py
self1am Feb 28, 2026
8151be9
Add gradient clipping to VERT predictor and tests
self1am Feb 28, 2026
261bafe
Add POSG SAC cognitive defence and device fixes
self1am Mar 4, 2026
813fde0
Fix TypeError: wire POSGAggregationStrategy into simulation runner
self1am Mar 4, 2026
6ccd128
Fix POSGAggregationStrategy.evaluate() signature and evaluate_fn call
self1am Mar 4, 2026
edd4214
Fix cold-start: warm-up heuristic and optimistic Beta init in SAC policy
self1am Mar 4, 2026
f7b5a1d
Improve warmup heuristic with cosine direction detection and add medi…
self1am Mar 5, 2026
54a99bb
Update seed for baseline cognitive defence configs
self1am Mar 5, 2026
37190ad
Ground defence in mathematical literature: Welford normalization, com…
self1am Mar 6, 2026
4c4aa56
cognitive revised
self1am Mar 12, 2026
a512e59
Add CogDef v2 configs and GRU temporal detector
self1am Apr 13, 2026
4e6a140
Majority consensus + YELLOW threat handling
self1am Apr 13, 2026
c4450d7
mape k fix and 30 round configs
self1am Apr 13, 2026
37ff147
Fix direction/cluster detectors to operate on deltas, not full params
self1am Apr 14, 2026
70eb0e8
Fix DynOpt oscillations: RED threshold + reputation-weighted trimmed …
self1am Apr 14, 2026
10ac8fd
Use classification-head delta for direction and cluster detection
self1am Apr 14, 2026
6cc8c97
Add COGDEF_RESEARCH_FINDINGS.md: thesis-grade documentation of all fi…
self1am Apr 14, 2026
9c7f8d2
Add two-phase detection: convergence resistance + cold-start guard
self1am Apr 14, 2026
a5bfdc3
Fix convergence-resistance false positives: median floor + 2x threshold
self1am Apr 14, 2026
e0f2ef2
Fix R2 over-flagging: unit-normalise head deltas before direction con…
self1am Apr 15, 2026
325bcb0
Accelerated reputation recovery for clients clearing consecutive GREE…
self1am Apr 15, 2026
e395c02
Update research findings: label-flip debugging campaign + 3 new sections
self1am Apr 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 25 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ A modular federated learning framework implementing cognitive defence strategies
- **Cognitive Defence**: OODA loop and MAPE-K framework implementation
- **Krum**: Byzantine-robust aggregation selecting updates with minimal distance scores
- **Trimmed Mean**: Robust aggregation removing outliers from both ends
- **Attack Simulation**: Label flipping, gradient noise, model replacement, and more
- **Attack Simulation**:
- **Static Attacks**: Label flipping, gradient noise
- **Adaptive Attacks**: stat-opt, dny-opt, min-max, min-sum (see [docs/ADAPTIVE_ATTACKS.md](docs/ADAPTIVE_ATTACKS.md))
- **Explainable AI**: Decision logging with reasoning and evidence
- **Deterministic Experiments**: Reproducible results with proper seeding

Expand Down Expand Up @@ -159,12 +161,33 @@ Results are automatically saved to:
- `logs/`: Detailed execution logs
- Individual client logs with training history

## Attack Strategies

### Static Attacks
- **Label Flipping**: Randomly flips labels during training to corrupt the model
- **Gradient Noise**: Adds Gaussian/uniform noise to gradient updates

### Adaptive Attacks
Advanced attacks that learn from defense responses. See [docs/ADAPTIVE_ATTACKS.md](docs/ADAPTIVE_ATTACKS.md) for detailed documentation.

1. **stat-opt (Statistical Optimization)**: Crafts updates that stay within statistical bounds of benign clients to evade detection
2. **dny-opt (Dynamic Optimization)**: Uses reinforcement learning to adapt attack parameters based on real-time feedback
3. **min-max (Minimax)**: Game-theoretic attack that assumes optimal defender response
4. **min-sum (Minimum Sum)**: Minimizes total distance to benign updates while maintaining attack impact

Example configurations available in `experiments/configs/`:
- `stat_opt_attack_test.yaml`
- `dny_opt_attack_test.yaml`
- `min_max_attack_test.yaml`
- `min_sum_attack_test.yaml`
- `all_adaptive_attacks_test.yaml`

## Next Steps

1. **FEMNIST Integration**: More realistic FL dataset
2. **Quantum Neural Networks**: PennyLane integration
3. **Advanced defences**: FreqFed, Median, FoolsGold
4. **Adaptive Attacks**: Learning-based adversarial strategies
4. ~~**Adaptive Attacks**: Learning-based adversarial strategies~~ ✓ Completed
5. **Comparative Analysis**: Benchmark defences against various attack scenarios

## Contributing
Expand Down
Loading