Edge-NIDS: On-Device Intrusion Detection for IoT
A quantized CNN intrusion-detection model deployed to an ARM Cortex-M microcontroller for real-time IoT traffic monitoring without cloud connectivity.
Overview
Edge-NIDS compresses a network-intrusion-detection classifier down to under 64KB so it can run directly on a Cortex-M4 microcontroller, flagging malicious traffic patterns locally without sending data to the cloud. The project combines the NIDS classifier from my adversarial-robustness reproduction with post-training quantization and structured pruning.
Architecture
A lightweight 1D-CNN ingests windowed flow-feature vectors; INT8 post-training quantization and 60% structured channel pruning reduce the footprint roughly 9x versus the FP32 baseline, with inference over TensorFlow Lite Micro's interpreter on the device.
Tech Stack
Screenshots
Lessons Learned
Quantization-aware fine-tuning after pruning recovered nearly all the accuracy lost to compression, whereas post-training quantization alone on the pruned model degraded accuracy noticeably. Getting realistic power/latency numbers required actually flashing hardware — simulator numbers were consistently optimistic by 15-20%.
ls -la ./related-projects/
ReproBench: Automated Paper Reproduction Scorecard
A tooling suite that runs reproduced model checkpoints against held-out benchmarks and auto-generates a comparison scorecard against reported paper results.
ThreatEvolve: Continual Learning for Emerging Attack Classes
An intrusion-detection model that incorporates new attack categories over time using elastic weight consolidation, without retraining from scratch.