PANDORA: Lightweight Adversarial Defense for Edge IoT using Uncertainty-Aware Metric Learning
Avinash Awasthi
Network and Distributed System Security (NDSS) Symposium 2026 · Day 3 · Web Security
Overview
PANDORA is a lightweight intrusion detection system (IDS) framework designed for resource-constrained edge IoT devices that addresses three fundamental challenges in network security monitoring: domain shift (adapting across different IoT environments), concept drift (evolving traffic patterns over time), and concept shift (detecting zero-day attacks). The framework combines a Mamba backbone with a Mixture of Experts (MoE) architecture to achieve linear time complexity suitable for edge deployment, while using a novel Probabilistic Manifold Structuring and Distance (PMSD) loss function for uncertainty-aware metric learning.

Key moments
- 0:00 Problem statement: IDS for heterogeneous IoT networks
- 2:00 Three challenges: domain shift, concept drift, concept shift
- 4:00 PANDORA framework architecture: Mamba + Mixture of Experts
- 6:00 Feature attention and modality splitting for temporal/volumetric features
- 8:00 PMSD loss function: Wasserstein + triplet loss for uncertainty-aware learning
- 10:00 Real-time test bed with Raspberry Pi and 75 attack scenarios
- 12:00 Results: 0.99 accuracy cross-domain, 98-100% zero-day detection
- 14:00 Q&A: handling concept drift data and dataset composition
PANDORA: Lightweight Adversarial Defense for Edge IoT using Uncertainty-Aware Metric Learning
Speakers: Avinash Awasthi
Conference: NDSS Symposium
YouTube: https://www.youtube.com/watch?v=8ZvavvC924w
Overview
PANDORA is a lightweight intrusion detection system (IDS) framework designed for resource-constrained edge IoT devices that addresses three fundamental challenges in network security monitoring: domain shift (adapting across different IoT environments), concept drift (evolving traffic patterns over time), and concept shift (detecting zero-day attacks). The framework combines a Mamba backbone with a Mixture of Experts (MoE) architecture to achieve linear time complexity suitable for edge deployment, while using a novel Probabilistic Manifold Structuring and Distance (PMSD) loss function for uncertainty-aware metric learning.
The researchers built a real-time test bed using Raspberry Pi relay nodes, generated 75 different attack scenarios, and created the TTDF-IoT 2025 dataset for evaluation. PANDORA achieves 0.99 accuracy on cross-domain generalization without fine-tuning and 98-100% accuracy on unseen zero-day attack detection, with a lightweight footprint of just 24 MB memory and 1.2 CPU cores -- making it deployable on edge devices.
Background
▶ Watch: Problem statement: IDS for heterogeneous IoT networks (0:00)
The proliferation of IoT devices across smart cities, Industry 5.0, and healthcare creates massive, heterogeneous networks with expanding attack surfaces. Traditional IDS approaches face several fundamental limitations in these environments:
Signature-based systems cannot adapt to new environments or detect unknown attacks. Static ML models are trained on specific datasets and degrade when deployed in different network contexts -- an IDS trained on healthcare network traffic may not work for smart home appliances. As networks evolve toward 6G connectivity, the threat landscape becomes more complex, with LLM-generated attacks adding sophistication to the threat vectors.
Existing IDS models struggle with class imbalance: the majority of network traffic is benign, and within malicious traffic, certain attack subclasses (such as backdoor triggers) have very few samples. The researchers note that approximately 48% of attacks go undetected by most IDS systems because of insufficient training data for minority attack classes. This creates a critical gap where the rarest and potentially most dangerous attacks are the least likely to be detected.
The research uses established IDS benchmark datasets including CICIDS 2017 and CICO 2023, along with the team's own TTDF-IoT 2025 dataset which was generated on their physical test bed to evaluate cross-domain generalization.
Key Findings
▶ Watch: PANDORA framework architecture: Mamba + Mixture of Experts (4:00)
Linear time complexity achieved through Mamba backbone. Unlike transformer-based models that require quadratic complexity, the Mamba architecture provides O(n) complexity, making the model fast and efficient enough for resource-constrained devices. This is critical for edge deployment where compute budgets are severely limited.
Cross-domain generalization without fine-tuning. PANDORA achieved 0.99 accuracy when tested across different IoT network domains without any fine-tuning, demonstrating robust adaptation to domain shift scenarios. This means an IDS trained in one environment can be deployed in a different environment without retraining.
Zero-day attack detection at 98-100% accuracy. Using zero-shot learning with a custom novelty score mechanism, the framework identifies unseen attack types with near-perfect accuracy. This addresses the concept shift challenge where entirely new attack classes emerge.
Lightweight edge footprint. The complete framework requires only 24 MB of memory and 1.2 CPU cores, making it deployable on devices like Raspberry Pi and similar edge hardware.
PMSD loss function outperforms existing approaches. The proposed loss function, combining Wasserstein loss and triplet loss with dynamic weighting based on data uncertainty, enables the model to handle subclass-level classification with flexible decision boundaries that adapt to imbalanced data distributions.
Technical Deep Dive
▶ Watch: PMSD loss function: Wasserstein + triplet loss for uncertainty-aware learning (8:00)
PANDORA's architecture consists of several key components:
Meta-task generation creates small training episodes by randomly selecting classes and splitting samples into support sets and query sets. This meta-learning approach enables few-shot adaptation -- the model learns to learn from limited examples, which is critical for detecting rare attack subclasses with few training samples.
Modality splitting divides traffic features into temporal features (time-series patterns) and volumetric features (traffic volume characteristics). Each modality is processed through parallel modality-specific blocks, allowing the model to extract both packet-level content patterns and long-range temporal window patterns independently before fusion.
Feature attention layer computes feature importance weights using a softmax operation, emphasizing the most discriminative attributes for classification. This learnable attention mechanism ensures the model focuses on the features most relevant to each specific classification task.
Mamba + Mixture of Experts fusion combines the Mamba backbone (providing linear-time sequence modeling) with MoE routing (with 2 experts per MoE layer). The cross-attention fusion mechanism embeds both temporal and volumetric features and combines complementary information from each modality.
Probabilistic embedding head generates mean and variance vectors of Gaussian embeddings rather than deterministic point embeddings. This allows the model to represent feature uncertainty, which is particularly valuable for distinguishing between known attack classes, novel attacks, and benign traffic at decision boundaries.
The PMSD loss function is defined as L_PMSD = L_Wasserstein + lambda * L_triplet. The Wasserstein component captures distributional distance between probabilistic embeddings, while the triplet component enforces margin-based separation. The adaptive weighting based on data uncertainty allows the loss function to dynamically adjust decision boundaries, enabling detection of zero-day attacks that fall outside known class distributions.
Demo / Proof of Concept
▶ Watch: Real-time test bed with Raspberry Pi and 75 attack scenarios (10:00)
The researchers built a physical test bed using Raspberry Pi devices as relay nodes for real-time IoT traffic generation and capture. The test bed generated 75 different attack scenarios across multiple attack categories (DDoS, backdoor, and others), with traffic captured using Wireshark into PCAP files.
The resulting TTDF-IoT 2025 dataset includes both full data (9 categories) and evaluation subsets (7 categories), with detailed subclass-level flow information. The dataset is publicly available along with the framework code.
Ablation studies across different architectural parameters (embedding dimensions, MoE configurations, attention dropout) confirmed that the proposed configuration provides stable and reliable results. Comparisons against state-of-the-art IDS methods demonstrated PANDORA's superiority in concept drift adaptation, concept shift detection, and cross-domain generalization.
Defensive Implications
▶ Watch: Q&A: handling concept drift data and dataset composition (14:00)
PANDORA addresses a significant gap in IoT security: the lack of adaptive, lightweight IDS systems that can operate at the network edge. For defenders managing heterogeneous IoT environments, the framework offers several practical advantages:
Deploy-anywhere capability. The 24 MB memory footprint and linear-time complexity mean the IDS can run on the same resource-constrained devices it protects, eliminating the need to backhaul all traffic to a centralized monitoring point.
Zero-day detection without retraining. The uncertainty-aware probabilistic embeddings and novelty scoring enable detection of previously unseen attack types without requiring model updates, addressing the persistent challenge of zero-day threats in IoT environments where update cycles are slow.
Cross-domain portability. An IDS trained on one network environment (e.g., smart home) can be deployed in a different environment (e.g., industrial IoT) without fine-tuning, reducing the operational burden of maintaining environment-specific models.
Subclass-level detection. Rather than simply classifying traffic as malicious or benign, PANDORA identifies specific attack subclasses, providing defenders with actionable intelligence about the nature of threats rather than just binary alerts.
Organizations deploying IoT at scale should evaluate frameworks like PANDORA for edge-level intrusion detection, particularly in environments where centralized monitoring is impractical and where the diversity of network scenarios makes traditional signature-based approaches insufficient.
Key Takeaways
- PANDORA combines Mamba backbone with Mixture of Experts for O(n) complexity IDS suitable for edge IoT devices with just 24 MB memory and 1.2 CPU cores
- The PMSD loss function (Wasserstein + triplet loss with adaptive weighting) enables subclass-level attack classification even with severely imbalanced data
- Cross-domain generalization achieves 0.99 accuracy without fine-tuning, addressing the domain shift problem across heterogeneous IoT environments
- Zero-day attack detection reaches 98-100% accuracy using probabilistic embeddings and novelty scoring
- A physical test bed with Raspberry Pi nodes generated 75 attack scenarios for the TTDF-IoT 2025 dataset, which is publicly available
- The framework addresses the critical gap where approximately 48% of attacks go undetected by existing IDS due to insufficient training data for minority attack classes
About the Speaker(s)
The paper was presented by Romesh Paw Batula, who supervises the research. Avinash Awasthi is the first author, with co-authors Priamya Biranka and professor Manos Singing. The project was funded by the Telecom Department of India. The team focuses on edge IoT security, meta-learning for intrusion detection, and developing adaptive defense mechanisms for heterogeneous network environments.
Reviews
Dr. Zero (Offensive Security Researcher) — WEAK
An ML-heavy IDS framework that claims 98-100% zero-day detection accuracy and 0.99 cross-domain generalization, but the presentation lacks the rigor needed to evaluate these extraordinary claims. The attack scenarios are self-generated, the zero-day detection is tested against held-out classes from the same distribution rather than truly novel attacks, and the Q&A revealed legitimate concerns about dataset composition that went unanswered.
Heather Calloway (CISO) — USEFUL
PANDORA addresses a real problem -- lightweight IDS for edge IoT -- but the extraordinary accuracy claims (98-100% zero-day detection) are not convincingly validated against real-world conditions. The edge deployment characteristics (24 MB, 1.2 CPU cores) are genuinely useful, but security leaders should be cautious about deploying ML-based IDS systems based on lab-validated metrics alone.
→ Top-rated talks at Network and Distributed System Security (NDSS) Symposium 2026
All talks from Network and Distributed System Security (NDSS) Symposium 2026