Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/chalakpaneer/feddefender
/ types & classes
Types & classes
12 in github.com/chalakpaneer/feddefender
⨍
Functions
83
◇
Types & classes
12
↓ 2 callers
Class
Block
blockchain/reputation.py:29
↓ 2 callers
Class
TransformerGNNModel
Hybrid Transformer + GNN intrusion detection model. Forward pass: 1. Transformer encodes the temporal sequence → H 2. GNN encode
models/transformer_gnn.py:143
↓ 1 callers
Class
AnomalyAwareAggregator
Wraps Krum / Multi-Krum with an additional pre-filter step: 1. Compute cosine similarity of each update to the current global mode
aggregation/aggregator.py:171
↓ 1 callers
Class
BlockchainLedger
Append-only immutable ledger that records every client's reputation update. Tampering with a block invalidates the chain (all subsequent
blockchain/reputation.py:66
↓ 1 callers
Class
FLClient
Simulates a single IoT edge device participating in federated learning. Parameters ---------- client_id : Unique integer identi
models/fl_client.py:31
↓ 1 callers
Class
FLServer
Central coordinator for the FedDefender FL simulation. Holds the global model and orchestrates all training rounds.
models/fl_server.py:37
↓ 1 callers
Class
GNNEncoder
models/transformer_gnn.py:90
↓ 1 callers
Class
GNNLayer
Single message-passing layer. h_v^(l+1) = σ( W^(l) · MEAN({h_u : u ∈ N(v) ∪ {v}}) + b^(l) ) This corresponds to Eq. 3 in the paper.
models/transformer_gnn.py:48
↓ 1 callers
Class
PositionalEncoding
models/transformer_gnn.py:24
↓ 1 callers
Class
ReputationManager
Maintains per-client reputation scores using Eq. 9 and writes every update to the blockchain ledger. Usage ----- rm = Reputation
blockchain/reputation.py:116
↓ 1 callers
Class
TrafficTransformerEncoder
models/transformer_gnn.py:109
Class
IoTTrafficDataset
Wraps (X, y) arrays and optionally builds a graph adjacency matrix for the GNN stream.
data/dataset.py:74