--- language: - en license: apache-2.0 tags: - cybersecurity - small-language-models - ransomware-detection - lateral-movement - onnx - int8 - edge-ai pipeline_tag: text-classification --- # EdgeShield: Dual-Stream Small Language Model Cybersecurity Framework [![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![GitHub](https://img.shields.io/badge/GitHub-graval%2Fedgeshield-black.svg)](https://github.com/graval/edgeshield) [![Kaggle](https://img.shields.io/badge/Kaggle-edgeshield--models-blue.svg)](https://www.kaggle.com/models/gauravr1/edgeshield-models) EdgeShield is an edge-native cybersecurity framework that uses a decoupled dual-stream Small Language Model (SLM) architecture and tiered selective gating to intercept lateral movement (MITRE TA0008) and pre-encryption ransomware before cryptographic destruction begins. --- ## πŸ›οΈ Architecture & Model Lineage EdgeShield decouples host threat monitoring into two specialized streams: 1. **Stream A (LSA - Log Sequence Analyzer)**: - **Backbone:** 44M parameter `microsoft/deberta-v3-small` with sliding-window attention ($K=3$) and Supervised Contrastive Loss. - **Target:** High-fidelity authentication logs and host command sequences to detect stealthy lateral movement. - **Formats:** PyTorch FP32 and Quantized INT8 ONNX (with AVX-VNNI acceleration). 2. **Stream B (BPD - Behavioral Pattern Detector)**: - **Backbone:** Compact Transformer with Attention Threat Scoring Head. - **Target:** Captures pre-encryption ransomware precursor indicators, defense evasion (T1562.001), and rapid file entropy variations. - **Formats:** PyTorch FP32 and Quantized INT8 ONNX. 3. **Tiered Selective Gating Engine**: - Two-stage filter (fast-path allowlist + Shannon file entropy triage). - Operates in **48.55 μs**, discarding **94.75%** of benign telemetry with **100% attack pass-through** (0 drop misses). --- ## πŸ—ΊοΈ Repository Structure & Releases | Tag / Revision | Milestone | Key Artifacts | | :--- | :--- | :--- | | **`v1.0-temscon`** | **IEEE TEMSCON-ASPAC 2026** (Oct 2026) | Baseline PyTorch FP32 weights for Stream A (`edgeshield_lsa`) and Stream B (`edgeshield_bpd`) | | **`v2.0-int8-quantized` (`main`)** | **Extended Journal** | Quantized INT8 ONNX models (`edgeshield_lsa_int8.onnx`, `edgeshield_bpd_int8.onnx`) optimized for edge CPUs (<50 MB RAM, 15.30 ms latency) | --- ## πŸš€ Quick Usage (ONNX Runtime INT8) ```python import onnxruntime as ort import numpy as np # Load quantized Stream A (LSA) session = ort.InferenceSession("models/v2_int8/edgeshield_lsa_int8.onnx", providers=["CPUExecutionProvider"]) # Example dummy sequence input input_ids = np.zeros((1, 128), dtype=np.int64) attention_mask = np.ones((1, 128), dtype=np.int64) outputs = session.run(None, {"input_ids": input_ids, "attention_mask": attention_mask}) logits = outputs[0] print("Prediction logits:", logits) ``` --- ## πŸ“š Citation ```bibtex % 1. Accepted Conference Baseline @inproceedings{raval2026edgeshield_temscon, author = {Raval, Gauravkumar and Bhatt, Tejaskumar}, title = {{EdgeShield: Lightweight Dual-Stream Small Language Model Architecture for Pre-Encryption Ransomware Defense on Edge Devices}}, booktitle = {Proceedings of the 5th IEEE Technology and Engineering Management Conference - Asia Pacific (TEMSCON-ASPAC)}, year = {2026}, note = {Accepted and In Press} } % 2. Extended Framework & Deployment Benchmarks @article{raval2026edgeshield_journal, author = {Raval, Gauravkumar and Bhatt, Tejaskumar}, title = {{EdgeShield: A High-Throughput Edge-Native Small Language Model Architecture for Pre-Encryption Ransomware Early Warning and Lateral Movement Interception}}, journal = {Target Journal: TBD (Manuscript in Preparation)}, year = {2026}, note = {Under Submission / Pre-submission Draft} } ``` ## πŸ‘₯ Authors - **Gauravkumar Raval** (GLS University) - **Dr. Tejaskumar Bhatt** (GLS University)