Skip to content

Add technical architecture documentation for cognitive defence system#2

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/document-defence-architecture
Draft

Add technical architecture documentation for cognitive defence system#2
Copilot wants to merge 3 commits intomainfrom
copilot/document-defence-architecture

Conversation

Copy link
Contributor

Copilot AI commented Dec 24, 2025

Provides comprehensive technical writeup of the federated learning cognitive defence architecture for academic presentation, covering data distribution methodology, experiment execution, and defence strategy comparisons.

Created Document: TECHNICAL_ARCHITECTURE.md

24KB technical writeup (678 lines) structured as:

Core Architecture

  • 4-layer system design (Orchestration → Server → Client → Defence/Attack)
  • Component interactions and modular design principles

Data Distribution Strategy

  • Non-IID partitioning via Dirichlet distribution: Dir(α × [1,...,1]) with α=0.5
  • Heterogeneous client data reflecting realistic federated scenarios
  • MNIST dataset: 60K train samples distributed across clients, 10K centralized test

Experiment Methodology

  • FedAvg protocol with defence-enhanced aggregation
  • Batch client spawning with resource monitoring
  • YAML configuration system with deterministic seeding for reproducibility

Cognitive Defence (OODA + MAPE-K)

Four-phase cycle:

  • Observe: Extract parameter norms and update magnitudes
  • Orient: Z-score anomaly detection: Z_i = (||Δθ_i|| - μ) / σ, threshold at 2.0
  • Decide: Reputation-based weighting with decay (0.8) on anomaly, reward (0.05) on normal
  • Act: Weighted aggregation: θ_global = Σ(reputation_i × n_i × Δθ_i) / Σ(reputation_i × n_i)

Key differentiators: historical context (100-round window), gradual trust adjustment, explainable decisions with evidence

Strategy Comparison

Strategy Approach Complexity Memory Adaptation
Cognitive Defence Adaptive weighted averaging O(nd) O(R) Per-client, per-round
Krum Selection-based (distance) O(n²d) O(1) None
Trimmed Mean Outlier removal (β trim) O(nd log n) O(1) None
FedAvg Simple weighted average O(nd) O(1) None

Robustness analysis: Cognitive defence provides soft aggregation vs. Krum's binary selection and Trimmed Mean's fixed trimming. Maintains client identity tracking absent in stateless methods. Lower computational cost than Krum (O(nd) vs O(n²d)).

Attack Coverage

  • Label flipping, gradient noise, model replacement simulations
  • Evaluation metrics: centralized accuracy, reputation tracking, anomaly detection rates

Additional Documentation

  • README.md updated with link to technical documentation
  • Sections on implementation technologies, experimental workflow, research contributions
Original prompt

provide a small technical writeup of the architecture of this defence design. the write up should be presentable to an academic in the field to make him understand our research. it should focus on how the data is divided, how the experiments are run, how our cognitive defence strategy works, and how it differs from the krum, trimmed mean and fedavg strategies.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits December 24, 2025 04:04
Created TECHNICAL_ARCHITECTURE.md covering:
- System architecture with 4-layer design
- Non-IID data distribution using Dirichlet
- Experiment execution methodology
- Cognitive defence (OODA loop + MAPE-K) details
- In-depth comparison with Krum, Trimmed Mean, and FedAvg
- Attack simulation framework
- Evaluation methodology and metrics

Co-authored-by: self1am <117443069+self1am@users.noreply.github.com>
Co-authored-by: self1am <117443069+self1am@users.noreply.github.com>
Copilot AI changed the title [WIP] Add technical writeup on defence architecture Add technical architecture documentation for cognitive defence system Dec 24, 2025
Copilot AI requested a review from self1am December 24, 2025 04:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants