All Projects
Fraud Detection

IoT Network Security Anomaly Detection

Embedded system intrusion detection with extreme imbalance (10% anomalies). BiLSTM+Attention: PR-AUC=0.186, Recall=33.3%. 5× augmentation (Gaussian/MixUp/masking). MC-Dropout uncertainty. Focal loss.

0.186
BiLSTM PR-AUC
33.3%
BiLSTM Recall
6,220 (5×)
Augmented samples
30
MC-Dropout passes
Dataset

1,000 IoT network records — 90/10 imbalance

Approach

ADASYN + 5× augmentation → focal loss DL → MC-Dropout uncertainty

Tech Stack
PythonPyTorchBiLSTM+AttentionADASYNFocal LossMC-Dropout
Keywords
BiLSTMAnomaly DetectionIoTFocal LossMC-DropoutADASYNCybersecurity
Visualizations6 Charts
Deep Dive

Anomaly detection for IoT network intrusion with extreme class imbalance.

Dataset

  • 1,000 records, 14 features, 90% normal / 10% anomaly (100 anomaly examples)
  • Features: packet size, inter-arrival time, spectral entropy, TCP flags, traffic intensity

Pipeline

  1. Random Forest feature selection → 14 key features
  2. ADASYN oversampling (100 → 614 minority samples)
  3. 5× data augmentation → 6,220 total training samples:
    • Gaussian noise injection
    • Feature masking (cutout)
    • MixUp (interpolate between samples)
    • Class-conditional noise
  4. Focal loss (γ=2.0, α=0.25) + cosine LR decay

Architecture Comparison

ModelPR-AUCF1Recall
Random Forest0.1400.210.28
XGBoost0.1600.220.31
Residual DNN0.1720.220.30
Dilated CNN0.1650.210.29
BiLSTM+Attention0.1860.2380.333

5-fold CV BiLSTM: PR-AUC = 0.1456 ± 0.0302

MC-Dropout Uncertainty 30 forward passes → mean + std per prediction. High-std samples flagged for manual review.

Honest Assessment PR-AUC 0.186 is modest. 100 anomaly examples are genuinely insufficient. In production, active learning or semi-supervised approaches would be more effective than supervised models on this dataset size.