An Adversarial Zero-Shot Learning Approach for Anomaly Detection in Multivariate IoT Traffic Data
Summary
This paper proposes a zero-shot learning framework for multivariate IoT traffic anomaly detection using adversarial and contrastive learning within a variational autoencoder, enabling domain adaptation without labeled data and demonstrating strong performance across diverse datasets.
View Cached Full Text
Cached at: 09/04/26, 06:29 AM
# An Adversarial Zero-Shot Learning Approach for Anomaly Detection in Multivariate IoT Traffic Data
Source: [https://arxiv.org/html/2609.03505](https://arxiv.org/html/2609.03505)
\[type=editor\]
\[type=editor\]
\[type=editor\]
Tolunay Seyfitseyfi@clemson\.eduFatemeh Afghahfafghah@clemson\.edu
###### Abstract
Anomaly detection in Internet of Things \(IoT\) networks presents unique challenges due to the diversity of devices, lack of labeled data, and domain variability across environments\. In this paper, we propose a novel framework for multivariate time\-series anomaly detection that leverages adversarial learning and contrastive loss within a sequence\-based Variational Autoencoder \(VAE\) architecture\. Our method enables zero\-shot domain adaptation by jointly optimizing domain\-invariant latent representations and semantically structured embedding spaces, without requiring labeled data or raw feature transfer\. To address the heterogeneity of IoT deployments, we introduce encoder and decoder adaptor layers that align feature distributions across domains while preserving contextual semantics\. Additionally, we propose a destination\-based segmentation strategy to better model real\-world communication structures in IoT traffic\. Our framework is comprehensively evaluated on six distinct datasets spanning industrial, enterprise, general\-purpose, smart home, and military automation domains across 44 transfer scenarios\. Experimental results demonstrate strong zero\-shot generalization in several cross\-domain settings and competitive performance against a contrastive domain\-adaptation baseline under realistic, heterogeneous, and privacy\-constrained IoT conditions\.
###### keywords
Zero\-Shot Learning ,IoT Anomaly Detection ,Domain Adaptation ,Variational Autoencoder ,Contrastive Learning ,Multivariate Time\-Series ,Adversarial Representation Learning
††titlenote:This material is based upon work supported by the National Science Foundation under Grant Numbers CNS\- 2318726, and CNS\-2232048\.††These authors contributed equally to this work\.††corresponding:Corresponding author\.## 1Introduction
The rapid proliferation of Internet of Things \(IoT\) devices across industrial, urban, and defense infrastructures has heightened the risk of operational failures and security breaches\. Anomaly detection \(AD\) in IoT networks is therefore a critical capability: it enables the timely identification of hardware malfunctions, communication disruptions, and malicious cyber\-attacks by recognizing deviations from expected traffic patterns\[[1](https://arxiv.org/html/2609.03505#bib.bib8),[2](https://arxiv.org/html/2609.03505#bib.bib9)\]\. From a security perspective, anomalies map directly to common network attacks such as scanning, denial\-of\-service \(DoS\), botnet propagation, and brute\-force intrusions\. From a reliability perspective, they also capture system\-level degradations such as abnormal packet loss or irregular latency surges that signal hardware or connectivity failures\[[1](https://arxiv.org/html/2609.03505#bib.bib8)\]\.
A large fraction of these anomalies can be inferred directly from flow\-level network data, where each flow aggregates packets sharing source, destination, and protocol attributes\. Network\-level anomaly detection thus provides visibility into a diverse set of attack classes\. Reconnaissance attacks such as port and vulnerability scans manifest as repetitive short flows; volumetric floods \(UDP, DNS, ICMP\) appear as sustained high\-throughput flows with abnormal temporal correlations; and stealthy application\-layer attacks like Slowloris exhibit long\-duration but low\-rate deviations\. By analyzing traffic at this granularity, AD models can detect both acute, short\-term disruptions and gradually evolving threats\[[3](https://arxiv.org/html/2609.03505#bib.bib10),[1](https://arxiv.org/html/2609.03505#bib.bib8)\]\.
While anomaly detection has been widely studied in other cyber–physical domains, IoT environments introduce distinctive challenges\. IoT traffic is inherently heterogeneous—devices differ in computational capabilities, communication protocols, and sampling rates—yielding highly multivariate traffic, variable sequence lengths, and irregular sampling intervals\[[4](https://arxiv.org/html/2609.03505#bib.bib11)\]\. In addition, IoT deployments are distributed across diverse environments \(e\.g\., smart grids, medical sensors, military automation\), which produces severe*domain shift*when models trained on one setting are applied to another\[[5](https://arxiv.org/html/2609.03505#bib.bib7)\]\. Finally, the scarcity of labeled anomalies in IoT networks makes purely supervised approaches impractical\[[2](https://arxiv.org/html/2609.03505#bib.bib9),[4](https://arxiv.org/html/2609.03505#bib.bib11)\]\.
Machine learning–based AD has emerged as a natural solution, modeling complex nonlinear dependencies without heavy feature engineering\[[1](https://arxiv.org/html/2609.03505#bib.bib8)\]\. Within this space, two dominant paradigms exist: reconstruction\-based methods \(e\.g\., autoencoders\) that flag large reconstruction errors, and prediction\-based methods that flag large forecasting residuals; both exploit temporal correlations in multivariate traffic\[[4](https://arxiv.org/html/2609.03505#bib.bib11)\]\. Recent time\-series work also leverages contrastive objectives to improve representation quality for downstream detection\[[6](https://arxiv.org/html/2609.03505#bib.bib12)\]\.
Among these, sequence models such as LSTM\-based autoencoders capture both short\- and long\-range temporal dependencies, and Variational Autoencoders \(VAEs\) extend this framework by probabilistically modeling latent spaces to improve generalization in unsupervised settings\[[7](https://arxiv.org/html/2609.03505#bib.bib13)\]\. Despite these advantages, commonly used VAE\-based approaches in IoT still face two critical limitations: \(i\) many assume fixed\-length input sequences, limiting robustness to real\-world traffic variability, and \(ii\) they often lack mechanisms to transfer knowledge across heterogeneous domains without retraining on target data\[[4](https://arxiv.org/html/2609.03505#bib.bib11),[5](https://arxiv.org/html/2609.03505#bib.bib7)\]\.
Effective AD in IoT networks therefore requires models that can \(a\) accept variable\-length flows to capture both rapid and gradual deviations, \(b\) remain robust under domain shift without fine\-tuning on new data, and \(c\) operate in zero\-shot conditions without access to labeled target samples\[[4](https://arxiv.org/html/2609.03505#bib.bib11),[5](https://arxiv.org/html/2609.03505#bib.bib7),[2](https://arxiv.org/html/2609.03505#bib.bib9)\]\. Few existing approaches simultaneously address these requirements; contrastive learning and domain adaptation are promising ingredients but are rarely combined with strict zero\-shot constraints in flow\-based IoT settings\[[6](https://arxiv.org/html/2609.03505#bib.bib12),[5](https://arxiv.org/html/2609.03505#bib.bib7)\]\.
To fill this gap, we propose a zero\-shot anomaly detection framework that integrates adversarial domain adaptation and contrastive representation learning into a sequence\-driven LSTM–VAE architecture\. Our method enforces domain\-invariant latent representations while structuring the latent space to capture semantic relationships between flows\. Unlike prior work, it supports variable\-length sequences and generalizes to unseen domains without requiring raw data, labels, or retraining, making it suitable for dynamic, privacy\-sensitive, and continually evolving IoT ecosystems\.
## 2Related Work
### 2\.1Supervised and Semi\-Supervised AD
Label\-rich models generally achieve strong in\-domain accuracy but require continuous annotation and re\-labeling as traffic evolves\. ST\-VAE\[[8](https://arxiv.org/html/2609.03505#bib.bib15)\]combines spatiotemporal VAE encoding with supervised contrastive learning and entropy\-aware sampling to mitigate concept drift; however, its reliance on labeled feedback limits deployment in label\-scarce environments\. Transformer\-based detectors such as SwinIoT\[[9](https://arxiv.org/html/2609.03505#bib.bib16)\]tailor hierarchical vision Transformers and SLAA modules to structured visual inputs at the edge, yet the specialization to vision signals constrains applicability to general multivariate telemetry\. Classical supervised pipelines \(e\.g\., TF–IDF over system calls\[[10](https://arxiv.org/html/2609.03505#bib.bib17)\]\) offer interpretability and low cost but lack temporal modeling and do not transfer across unseen domains\. SDN\-integrated policies\[[11](https://arxiv.org/html/2609.03505#bib.bib18)\]optimize network\-layer behavior with tight control loops, but policy coupling hampers portability to heterogeneous infrastructures\.
### 2\.2Unsupervised AD
Unsupervised approaches remove the label dependency but still struggle with domain shift\. DUDetector\[[12](https://arxiv.org/html/2609.03505#bib.bib21)\]combines Transformer modules and dual\-resolution autoencoding for fine\-grained segmentation, at the expense of higher compute budgets\. EvoAAE\[[13](https://arxiv.org/html/2609.03505#bib.bib22)\]augments adversarial training with PSO\-driven architecture search, but training stability can be fragile\. Graph\-based models such as DPGLAD\[[14](https://arxiv.org/html/2609.03505#bib.bib24)\]exploit dynamic diffusion over evolving topologies, yet require domain\-specific graph construction and extensive feature engineering\. Lightweight statistical detectors \(e\.g\., moment\-based features\[[15](https://arxiv.org/html/2609.03505#bib.bib25)\]\) are efficient but typically lack the representational capacity for heterogeneous IoT domains\. Platform\-bound pipelines like MindFlow\[[16](https://arxiv.org/html/2609.03505#bib.bib27)\]\(CNN\+BiLSTM on NF\-BoT\-IoT\) highlight temporal modeling benefits but limit portability across toolchains and protocols\. Federated variants\[[17](https://arxiv.org/html/2609.03505#bib.bib19),[18](https://arxiv.org/html/2609.03505#bib.bib20)\]improve privacy via decentralized training, though they often depend on synchronized participation and sensitive hyperparameters; practical deployments face stragglers and non\-IID data issues\.
### 2\.3Few\-/Zero\-Shot AD and Domain Shift Without Retraining
A growing line of work targets adaptation with few or no labels in the target domain\. Typical strategies rely on \(i\) metric learning \(contrastive/triplet\) to shape a semantically meaningful latent space, and \(ii\) domain alignment \(adversarial or discrepancy\-based\) to encourage invariance\. However, many methods still*fine\-tune*on target data \(even unlabeled\), which weakens the zero\-shot guarantee and adds operational complexity\. Our framework is designed for*strict zero\-shot*inference on the target domain: the final phase computes no loss on target data and requires no target\-side retraining, while contrastive and adversarial objectives \(learned on source/auxiliary domains\) yield a latent geometry that generalizes across domains\.
### 2\.4Positioning and Distinctions
Key differentiators of our approachrelative to prior work:
- •Fully unsupervised source\-side training with strict zero\-shot target inference:No labels are required from source or target, and the final phase performs decisions without any target loss or fine\-tuning\.
- •Dual latent alignment:A combination of contrastive learning \(semantic structuring\) and adversarial domain alignment \(invariance\) produces transferrable representations under domain shift\.
- •No handcrafted features or graph construction:The method is protocol\-agnostic and avoids bespoke feature engineering or topology building\.
- •Privacy\-aware operation:No raw feature transfer from target sites is required; the model transfers solely via learned parameters trained on source/auxiliary domains\.
### 2\.5Comparison With Representative Methods
To highlight axes that matter in deployment, Table[1](https://arxiv.org/html/2609.03505#S2.T1)compares representative works along: supervision level, data modality \(multivariate flows\), support for variable\-length sequences, explicit handling of domain shift, zero\-/few\-shot readiness, and retraining needs on new domains\.111“NR” denotes*not reported*or unspecified in the cited source\.
Table 1:Comparison of representative IoT anomaly detection methods\.MethodSupervisionMultivar\.Var\. Len\.Domain ShiftZero/FewRetrain?NotesST\-VAE\[[8](https://arxiv.org/html/2609.03505#bib.bib15)\]Sup\.YesNRPartialFew\-shotOftenSupervised contrastive \+ spatiotemporal VAE\.SwinIoT\[[9](https://arxiv.org/html/2609.03505#bib.bib16)\]Sup\.VisionNRNoNoYesHierarchical Transformers for edge vision only\.TF–IDF Syscalls\[[10](https://arxiv.org/html/2609.03505#bib.bib17)\]Sup\.Syscall textNoNoNoYesLightweight, but weak temporal modeling\.SDN\-IIoT Policy\[[11](https://arxiv.org/html/2609.03505#bib.bib18)\]Sup\./RulesNet\. flowsNRNoNoYesTight SDN coupling; limited portability\.DUDetector\[[12](https://arxiv.org/html/2609.03505#bib.bib21)\]Unsup\.YesNRPartialNoPossiblyTransformer \+ dual\-res AE; high compute\.EvoAAE\[[13](https://arxiv.org/html/2609.03505#bib.bib22)\]Unsup\. \(adv\.\)YesNRPartialNoPossiblyAdversarial AE \+ PSO NAS; unstable\.DPGLAD\[[14](https://arxiv.org/html/2609.03505#bib.bib24)\]Unsup\. \(graph\)GraphNRPartialNoPossiblyNeeds domain\-specific graph construction\.Stat\. Moments\[[15](https://arxiv.org/html/2609.03505#bib.bib25)\]Sup\./Heur\.Yes \(hand\)NRNoNoYesEfficient, limited to handcrafted features\.MindFlow\[[16](https://arxiv.org/html/2609.03505#bib.bib27)\]Sup\.YesNRNoNoYesCNN\+BiLSTM; platform\-dependent\.Fed\. GAN/Ensemble\[[17](https://arxiv.org/html/2609.03505#bib.bib19)\]Fed\.YesNRPartialFew\-shotSometimesFL; sync/global aggregation required\.Fed\. IF Opt\.\[[18](https://arxiv.org/html/2609.03505#bib.bib20)\]Fed\.YesNRPartialFew\-shotSometimesFL, hyperparam\-sensitive\.DACAD\[[5](https://arxiv.org/html/2609.03505#bib.bib7)\]Unsup\./DAYesNRYesZero/FewOftenContrastive domain adaptation for multivariate time\-series AD; strong baseline but not designed around destination\-centric IoT flow segmentation, variable\-length LSTM\-VAE reconstruction, or strict no\-target\-loss inference\.This workUnsup\.YesYesYesZero/FewNoStrict zero\-shot inference; dual alignment; validated on 6 datasets\.
## 3System Model
In this work, we propose theContrastive Adversarially\-Adaptive LSTM\-VAE, a novel framework tailored for multivariate anomaly detection in IoT and networked environments\. The overall architecture of the proposed model is illustrated in Figure[1](https://arxiv.org/html/2609.03505#S3.F1)\.
Figure 1:Overall architecture of the proposed Contrastive Adversarially\-Adaptive LSTM\-VAE framework\. The model is trained using two unlabeled source datasets to learn domain\-invariant and semantically structured latent representations\. Adversarial learning minimizes the domain discrepancy through a gradient reversal layer and domain classifier, while contrastive loss refines the latent space geometry\. Adaptors normalize cross\-domain input/output formats\. At inference, the model generalizes to the unseen target domain in a zero\-shot manner using reconstruction error and latent deviations for anomaly detection\.Our framework builds upon a Variational Autoencoder \(VAE\) augmented with Long Short\-Term Memory \(LSTM\) layers to effectively capture temporal dependencies in multivariate time\-series data\. To address domain shifts across different network traffic distributions, we introduce lightweight input and output adaptor layers that serve as transformation modules, aligning feature representations between source and target domains\.
As shown in Figure[1](https://arxiv.org/html/2609.03505#S3.F1), the model is trained on two distinct, unlabeled network traffic datasets\. The goal is to learn representations that are invariant to dataset\-specific characteristics while capturing fundamental patterns in temporal dynamics and cross\-feature correlations\. This enables the model to generalize based on intrinsic structure rather than domain\-dependent artifacts\.
The training procedure begins with unsupervised pretraining on a large\-scale source dataset, where the Variational Autoencoder \(VAE\) learns to reconstruct benign traffic patterns and encode variable\-length input sequences into compact latent representations\. To minimize the domain gap between the source and auxiliary datasets, adversarial domain alignment is applied\. Specifically, a domain discriminator is trained to identify the origin of encoded samples, while the encoder is concurrently optimized in an adversarial manner to mislead the discriminator, thereby promoting the learning of domain\-invariant latent features\.
In addition, to develop a more generalizable model that is also capable of zero\-shot adaptation, it is essential to enhance the semantic structure of the latent space\. This facilitates the model’s ability to extract and retain meaningful knowledge even when input sequences vary in length and no labeled or unlabeled samples from the target domain are available during training\. To achieve this, we incorporate a contrastive learning objective, which encourages the model to learn discriminative and semantically meaningful representations under such constraints\. Specifically, the encoder is guided to cluster similar patterns \(positive pairs\) and separate dissimilar ones \(negative pairs\) based on cosine similarity, even when they originate from different domains\. This dual training strategy—adversarial for alignment and contrastive for structure—produces a latent space that is both generalizable and discriminative\.
After training, the model is deployed to a previously unseen target domain in a zero\-shot manner, meaning no retraining or target\-domain labels are used\. Anomalies are detected based on reconstruction errors and deviations from the latent distribution learned during training on source domains\.
To provide a structured overview of our approach, we first formalize the anomaly detection problem and the challenges of domain adaptation in time\-series data\. We then detail the architecture and components of our framework, including the LSTM\-VAE core, domain\-specific adaptor layers, and the integration of adversarial and contrastive learning mechanisms\.
### 3\.1Problem Definition
We model IoT network traffic as a multivariate time series, where each observation is a feature vector recorded at a discrete time step\. Formally, a traffic sequence is denoted as
𝐗=\(x1,x2,…,xT\)∈ℝT×d,\\mathbf\{X\}=\(x\_\{1\},x\_\{2\},\\ldots,x\_\{T\}\)\\in\\mathbb\{R\}^\{T\\times d\},whereTTis the sequence length andddis the number of traffic features\. In flow\-level network monitoring, these features may include packet counts, flow duration, inter\-arrival statistics, throughput, byte counts, protocol indicators, or other traffic descriptors\. A collection of such features over time forms a multivariate sequence that captures both temporal dependencies and cross\-feature correlations in network behavior\.
This work addresses anomaly detection under heterogeneous cross\-domain IoT deployments\. Let𝒟s\\mathcal\{D\}\_\{s\}denote a primary source domain,𝒟a\\mathcal\{D\}\_\{a\}denote an auxiliary source domain used for domain alignment, and𝒟t\\mathcal\{D\}\_\{t\}denote a held\-out target domain\. The source and auxiliary domains may come from different network environments, devices, protocols, or attack distributions\. The target domain represents an unseen deployment whose data distribution is not available during training\. The goal is to learn an anomaly detector from𝒟s\\mathcal\{D\}\_\{s\}and𝒟a\\mathcal\{D\}\_\{a\}that generalizes to𝒟t\\mathcal\{D\}\_\{t\}without target\-domain labels, target\-domain fine\-tuning, or target\-domain loss computation\.
The proposed framework follows a strict zero\-shot protocol\. In the first stage, an LSTM\-based VAE is trained on the primary source domain to model normal temporal behavior through sequence reconstruction and latent\-space regularization\. In the second stage, samples from the source and auxiliary domains are used to improve transferability through adversarial domain alignment and contrastive representation learning\. The adversarial objective encourages the encoder to suppress domain\-specific artifacts between𝒟s\\mathcal\{D\}\_\{s\}and𝒟a\\mathcal\{D\}\_\{a\}, while the contrastive objective structures the latent space by pulling similar temporal patterns closer and pushing dissimilar patterns apart\. Importantly, the held\-out target domain𝒟t\\mathcal\{D\}\_\{t\}is not used in either stage\.
After training, the learned encoder–decoder model is deployed directly on𝒟t\\mathcal\{D\}\_\{t\}\. For each target sequence, the model computes an anomaly score from reconstruction error and latent deviation relative to the source\-learned normal\-behavior representation\. A sequence is classified as anomalous when its score exceeds a predefined threshold\. Target\-domain labels are used only for final evaluation metrics and are never used for training, alignment, threshold selection, or model adaptation\. This formulation enables privacy\-preserving and deployment\-oriented anomaly detection in heterogeneous IoT environments where collecting labeled target data or retraining the model for every new domain is impractical\.
### 3\.2Sequence\-Based VAE
We employ a sequence\-based Variational Autoencoder \(VAE\) architecture to model multivariate time\-series data in IoT environments\. The goal is to encode an observed sequencexxinto a latent representationzzwhile retaining its essential structural and temporal features\. The VAE models the joint probability distribution of observed variablesxxand latent variableszz, assuming a standard Gaussian prior overzz:
p\(z\)=𝒩\(z,0,I\)p\(z\)=\\mathcal\{N\}\(z;0,I\)\(1\)The dataxxis generated conditionally through a neural decoderpθ\(x\|z\)p\_\{\\theta\}\(x\|z\), but the true posteriorp\(z\|x\)p\(z\|x\)is intractable\. To approximate it, we use an encoderqϕ\(z\|x\)q\_\{\\phi\}\(z\|x\)parameterized as a Gaussian with learned mean and variance:
qϕ\(z\|x\)=𝒩\(z,μ\(x\),σ2\(x\)\)q\_\{\\phi\}\(z\|x\)=\\mathcal\{N\}\(z;\\mu\(x\),\\sigma^\{2\}\(x\)\)\(2\)where the approximate posterior takes the form:
qϕ\(z\|x\)=12πσ2\(x\)exp\(−\(z−μ\(x\)\)22σ2\(x\)\)q\_\{\\phi\}\(z\|x\)=\\frac\{1\}\{\\sqrt\{2\\pi\\sigma^\{2\}\(x\)\}\}\\exp\\left\(\-\\frac\{\(z\-\\mu\(x\)\)^\{2\}\}\{2\\sigma^\{2\}\(x\)\}\\right\)\(3\)To enable backpropagation through sampling, we apply the reparameterization trick:
z=μ\(x\)\+σ\(x\)⋅ϵ,ϵ∼𝒩\(0,I\)z=\\mu\(x\)\+\\sigma\(x\)\\cdot\\epsilon,\\quad\\epsilon\\sim\\mathcal\{N\}\(0,I\)\(4\)In our approach, each input sequencex=\{x1,x2,…,xT\}x=\\\{x\_\{1\},x\_\{2\},\\ldots,x\_\{T\}\\\}, representing a series of network traffic observations, is fed into the model\. Instead of treating each time step independently, we use an LSTM to capture temporal dependencies across the sequence\. The encoder LSTM processes the entire sequence and computes the final hidden statehTh\_\{T\}, which summarizes it\. The latent variables are derived as:
ht\\displaystyle h\_\{t\}=fLSTM\(ht−1,xt\)\\displaystyle=f\_\{\\text\{LSTM\}\}\(h\_\{t\-1\},x\_\{t\}\)\(5\)μϕ\(x\)\\displaystyle\\mu\_\{\\phi\}\(x\)=WμhT\+bμ\\displaystyle=W\_\{\\mu\}h\_\{T\}\+b\_\{\\mu\}\(6\)logσϕ2\(x\)\\displaystyle\\log\\sigma^\{2\}\_\{\\phi\}\(x\)=WσhT\+bσ\\displaystyle=W\_\{\\sigma\}h\_\{T\}\+b\_\{\\sigma\}\(7\)The latent vectorzzis sampled using the learned parameters:
z=μϕ\(x\)\+σϕ\(x\)⋅ϵ,ϵ∼𝒩\(0,I\)z=\\mu\_\{\\phi\}\(x\)\+\\sigma\_\{\\phi\}\(x\)\\cdot\\epsilon,\\quad\\epsilon\\sim\\mathcal\{N\}\(0,I\)\(8\)The decoder is also an LSTM network and reconstructs the sequence one step at a time\. Givenzzand the previously reconstructed stepx^t−1\\hat\{x\}\_\{t\-1\}, each next step is generated as:
x^t=fdecoder\(z,x^t−1\)\\hat\{x\}\_\{t\}=f\_\{\\text\{decoder\}\}\(z,\\hat\{x\}\_\{t\-1\}\)\(9\)This sequence\-based formulation allows the model to learn both short\- and long\-term temporal patterns in IoT traffic data\. By encoding the full sequence into a latent space and reconstructing it iteratively, the model builds a nuanced understanding of normal traffic behavior\. Deviations in the reconstruction signal potential anomalies, enabling effective detection of both sudden and gradual attacks across varied environments\.
### 3\.3Variable\-Length Sequence Adaptation
Real IoT traffic rarely arrives as uniform fixed\-length sequences\. Flow durations vary across devices, protocols, sampling rates, and attack behaviors\. A fixed\-window detector can therefore introduce two practical problems: short flows may be padded with little useful context, while long flows may be truncated before slow or gradual anomalies become visible\. Both effects can degrade detection performance and delay operational response\.
To address this issue, the proposed framework supports variable\-length traffic sequences\. Each sequence is encoded by the LSTM encoder into a compact latent representation, allowing the model to summarize temporal behavior without requiring all inputs to share the same duration\. This makes the detector more suitable for heterogeneous IoT environments, where attacks may appear as short bursts, repeated scans, or long\-duration low\-rate deviations\.
Because shorter sequences may contain limited temporal context, variable\-length modeling is combined with adversarial and contrastive latent learning\. Adversarial alignment reduces domain\-specific artifacts between the primary and auxiliary source domains, while contrastive learning encourages similar temporal patterns to remain close in the latent space\. Together, these mechanisms help the model preserve useful behavioral structure across different sequence lengths and deployment domains\.
### 3\.4Adversarial and Contrastive Learning for Domain\-Invariant Representations
To improve cross\-domain generalization, we integrate adversarial domain alignment and cosine\-based contrastive learning into the latent\-space training stage\. Let𝒟s\\mathcal\{D\}\_\{s\}denote the primary source domain and𝒟a\\mathcal\{D\}\_\{a\}denote the auxiliary source domain used for alignment\. The held\-out target domain𝒟t\\mathcal\{D\}\_\{t\}is not used during this stage\. The goal is to learn an encoderEEthat suppresses domain\-specific artifacts between𝒟s\\mathcal\{D\}\_\{s\}and𝒟a\\mathcal\{D\}\_\{a\}while preserving temporal structures that are useful for anomaly detection in unseen deployments\.
#### 3\.4\.1Adversarial Domain Alignment
We introduce a domain discriminatorDDthat predicts whether a latent representation originates from the primary source domain𝒟s\\mathcal\{D\}\_\{s\}or the auxiliary source domain𝒟a\\mathcal\{D\}\_\{a\}\. The discriminator is trained to distinguish the two domains, while the encoder is trained through a Gradient Reversal Layer \(GRL\) to make the two latent distributions difficult to separate\. This adversarial objective encourages the encoder to remove domain\-specific nuisance factors and retain features that are more transferable across environments\.
The adversarial loss is defined as
ℒadv\(E,D\)=\\displaystyle\\mathcal\{L\}\_\{\\mathrm\{adv\}\}\(E,D\)=−𝔼xs∼𝒟s\[logD\(E\(xs\)\)\]\\displaystyle\-\\mathbb\{E\}\_\{x\_\{s\}\\sim\\mathcal\{D\}\_\{s\}\}\\left\[\\log D\(E\(x\_\{s\}\)\)\\right\]\(10\)−𝔼xa∼𝒟a\[log\(1−D\(E\(xa\)\)\)\],\\displaystyle\-\\mathbb\{E\}\_\{x\_\{a\}\\sim\\mathcal\{D\}\_\{a\}\}\\left\[\\log\\left\(1\-D\(E\(x\_\{a\}\)\)\\right\)\\right\],wherexsx\_\{s\}andxax\_\{a\}denote samples from the primary and auxiliary source domains, respectively\. The discriminator minimizesℒadv\\mathcal\{L\}\_\{\\mathrm\{adv\}\}, whereas the encoder receives the reversed gradient through the GRL, which makes the latent representations less domain\-identifiable\.
#### 3\.4\.2Cosine\-Based Contrastive Learning
Adversarial alignment alone may remove domain\-specific information but does not necessarily impose a useful semantic geometry on the latent space\. Therefore, we also apply cosine\-based contrastive learning to encourage similar temporal patterns to remain close while dissimilar patterns are separated\. For each anchor representationziaz\_\{i\}^\{a\}, we define a positive representationzipz\_\{i\}^\{p\}and a negative representationzinz\_\{i\}^\{n\}\. The contrastive loss is
ℒcon=1N∑i=1N\[1−cos\(zia,zip\)\+max\(0,cos\(zia,zin\)−m\)\],\\mathcal\{L\}\_\{\\mathrm\{con\}\}=\\frac\{1\}\{N\}\\sum\_\{i=1\}^\{N\}\\left\[1\-\\cos\(z\_\{i\}^\{a\},z\_\{i\}^\{p\}\)\+\\max\\left\(0,\\cos\(z\_\{i\}^\{a\},z\_\{i\}^\{n\}\)\-m\\right\)\\right\],\(11\)wherecos\(⋅,⋅\)\\cos\(\\cdot,\\cdot\)denotes cosine similarity andmmis a margin controlling the minimum desired separation between anchor\-negative pairs\. This objective improves latent\-space organization by reducing intra\-pattern variation and increasing separation between dissimilar temporal behaviors\.
#### 3\.4\.3Combined Objective
The final phase–2 training objective combines adversarial alignment and contrastive structuring:
ℒphase2=λadvℒadv\+λconℒcon,\\mathcal\{L\}\_\{\\mathrm\{phase2\}\}=\\lambda\_\{\\mathrm\{adv\}\}\\mathcal\{L\}\_\{\\mathrm\{adv\}\}\+\\lambda\_\{\\mathrm\{con\}\}\\mathcal\{L\}\_\{\\mathrm\{con\}\},\(12\)whereλadv\\lambda\_\{\\mathrm\{adv\}\}andλcon\\lambda\_\{\\mathrm\{con\}\}control the relative strength of domain confusion and contrastive latent organization\. The target domain𝒟t\\mathcal\{D\}\_\{t\}is excluded from this optimization and is used only during final zero\-shot evaluation\. Thus, the learned representation is encouraged to be transferable without requiring target\-domain labels, target\-domain loss computation, or target\-side fine\-tuning\.
### 3\.5Domain\-Specific Adaptors for Variability Handling
IoT datasets often differ in feature scale, feature ordering, measurement units, protocol composition, and device behavior\. Directly feeding such heterogeneous inputs into a shared sequence model can cause the encoder to learn dataset\-specific artifacts rather than transferable temporal structure\. To reduce this effect, we introduce lightweight domain\-specific adaptor layers around the shared LSTM\-VAE\.
For a samplexi\(k\)x\_\{i\}^\{\(k\)\}from domain𝒟k\\mathcal\{D\}\_\{k\}, wherek∈\{s,a\}k\\in\\\{s,a\\\}during training, the encoder adaptorAe\(k\)A\_\{e\}^\{\(k\)\}maps the input sequence into a shared feature space:
x~i\(k\)=Ae\(k\)\(xi\(k\)\)\.\\tilde\{x\}\_\{i\}^\{\(k\)\}=A\_\{e\}^\{\(k\)\}\(x\_\{i\}^\{\(k\)\}\)\.\(13\)The transformed sequencex~i\(k\)\\tilde\{x\}\_\{i\}^\{\(k\)\}is then passed to the shared LSTM encoder, which produces the latent representationzi\(k\)z\_\{i\}^\{\(k\)\}\. This design allows the source and auxiliary domains to be normalized before entering the shared latent model\.
Similarly, after decoding, a lightweight decoder adaptorAd\(k\)A\_\{d\}^\{\(k\)\}maps the decoder output back to the corresponding domain\-specific feature space:
x^i\(k\)=Ad\(k\)\(x~^i\(k\)\)\.\\hat\{x\}\_\{i\}^\{\(k\)\}=A\_\{d\}^\{\(k\)\}\(\\hat\{\\tilde\{x\}\}\_\{i\}^\{\(k\)\}\)\.\(14\)The adaptor layers therefore act as interface modules that absorb domain\-specific feature variability, while the shared LSTM\-VAE focuses on learning transferable temporal dynamics\.
During strict zero\-shot inference, no target\-specific adaptor is trained using target data\. The learned shared encoder–decoder is applied directly to the held\-out target domain, and the anomaly decision is computed from the reconstruction and latent\-deviation score\. This preserves the zero\-shot protocol while still allowing the model to benefit from source–auxiliary adaptor\-based alignment during training\.
### 3\.6Loss Functions and Training Phases
The proposed framework is trained in two stages\. Phase 1 learns a reconstruction\-based normal\-behavior model from the primary source domain\. Phase 2 improves cross\-domain transferability by aligning the primary source domain with an auxiliary source domain using adversarial and contrastive objectives\. The held\-out target domain is excluded from both training stages and is used only for final zero\-shot evaluation\.
#### 3\.6\.1Phase 1: VAE Pretraining on the Primary Source Domain
In the first stage, the LSTM\-VAE is pretrained on the primary source domain𝒟s\\mathcal\{D\}\_\{s\}to model normal temporal behavior\. Given an input sequencexix\_\{i\}, the encoder produces the approximate posterior parametersμi\\mu\_\{i\}andσi\\sigma\_\{i\}, samples a latent vectorziz\_\{i\}through the reparameterization trick, and the decoder reconstructs the sequence asx^i\\hat\{x\}\_\{i\}\. The reconstruction loss is defined as
ℒrec=1N∑i=1N‖xi−x^i‖22\.\\mathcal\{L\}\_\{\\mathrm\{rec\}\}=\\frac\{1\}\{N\}\\sum\_\{i=1\}^\{N\}\\left\\\|x\_\{i\}\-\\hat\{x\}\_\{i\}\\right\\\|\_\{2\}^\{2\}\.\(15\)
The Kullback–Leibler divergence regularizes the approximate posteriorqϕ\(z\|x\)q\_\{\\phi\}\(z\|x\)toward the standard Gaussian priorp\(z\)=𝒩\(0,I\)p\(z\)=\\mathcal\{N\}\(0,I\):
ℒKL=−12∑j=1dz\(1\+logσij2−μij2−σij2\),\\mathcal\{L\}\_\{\\mathrm\{KL\}\}=\-\\frac\{1\}\{2\}\\sum\_\{j=1\}^\{d\_\{z\}\}\\left\(1\+\\log\\sigma\_\{ij\}^\{2\}\-\\mu\_\{ij\}^\{2\}\-\\sigma\_\{ij\}^\{2\}\\right\),\(16\)wheredzd\_\{z\}is the latent dimension\. The Phase 1 objective is
ℒphase1=λrecℒrec\+λKLℒKL,\\mathcal\{L\}\_\{\\mathrm\{phase1\}\}=\\lambda\_\{\\mathrm\{rec\}\}\\mathcal\{L\}\_\{\\mathrm\{rec\}\}\+\\lambda\_\{\\mathrm\{KL\}\}\\mathcal\{L\}\_\{\\mathrm\{KL\}\},\(17\)whereλrec\\lambda\_\{\\mathrm\{rec\}\}andλKL\\lambda\_\{\\mathrm\{KL\}\}control the relative contributions of reconstruction fidelity and latent regularization\.
#### 3\.6\.2Phase 2: Source–Auxiliary Alignment
In the second stage, we improve transferability using the primary source domain𝒟s\\mathcal\{D\}\_\{s\}and an auxiliary source domain𝒟a\\mathcal\{D\}\_\{a\}\. The target domain𝒟t\\mathcal\{D\}\_\{t\}is not used in this phase\. A domain discriminatorDDattempts to distinguish whether an encoded representation comes from𝒟s\\mathcal\{D\}\_\{s\}or𝒟a\\mathcal\{D\}\_\{a\}, while the encoderEEis optimized through a Gradient Reversal Layer \(GRL\) to make the two domains difficult to separate\. The adversarial domain loss is
ℒGRL=\\displaystyle\\mathcal\{L\}\_\{\\mathrm\{GRL\}\}=−𝔼xs∼𝒟s\[logD\(E\(xs\)\)\]\\displaystyle\-\\mathbb\{E\}\_\{x\_\{s\}\\sim\\mathcal\{D\}\_\{s\}\}\\left\[\\log D\(E\(x\_\{s\}\)\)\\right\]\(18\)−𝔼xa∼𝒟a\[log\(1−D\(E\(xa\)\)\)\],\\displaystyle\-\\mathbb\{E\}\_\{x\_\{a\}\\sim\\mathcal\{D\}\_\{a\}\}\\left\[\\log\\left\(1\-D\(E\(x\_\{a\}\)\)\\right\)\\right\],wherexsx\_\{s\}andxax\_\{a\}are samples from the primary and auxiliary source domains, respectively\.
To further organize the latent space, we apply cosine\-based contrastive learning\. For each anchor representationziaz\_\{i\}^\{a\}, letzipz\_\{i\}^\{p\}denote a positive representation andzinz\_\{i\}^\{n\}denote a negative representation\. The contrastive loss is
ℒcon=1N∑i=1N\[1−cos\(zia,zip\)\+max\(0,cos\(zia,zin\)−m\)\],\\mathcal\{L\}\_\{\\mathrm\{con\}\}=\\frac\{1\}\{N\}\\sum\_\{i=1\}^\{N\}\\left\[1\-\\cos\(z\_\{i\}^\{a\},z\_\{i\}^\{p\}\)\+\\max\\left\(0,\\cos\(z\_\{i\}^\{a\},z\_\{i\}^\{n\}\)\-m\\right\)\\right\],\(19\)wherecos\(⋅,⋅\)\\cos\(\\cdot,\\cdot\)denotes cosine similarity andmmis the margin that controls anchor\-negative separation\.
The Phase 2 objective is then
ℒphase2=λGRLℒGRL\+λconℒcon,\\mathcal\{L\}\_\{\\mathrm\{phase2\}\}=\\lambda\_\{\\mathrm\{GRL\}\}\\mathcal\{L\}\_\{\\mathrm\{GRL\}\}\+\\lambda\_\{\\mathrm\{con\}\}\\mathcal\{L\}\_\{\\mathrm\{con\}\},\(20\)whereλGRL\\lambda\_\{\\mathrm\{GRL\}\}andλcon\\lambda\_\{\\mathrm\{con\}\}balance adversarial domain confusion and contrastive latent structuring\.
#### 3\.6\.3Phase 3: Strict Zero\-Shot Inference
After training, the encoder and decoder are frozen and deployed directly on the held\-out target domain𝒟t\\mathcal\{D\}\_\{t\}\. No target\-domain labels, target\-domain loss, target\-domain fine\-tuning, or target\-domain model selection are used\. For a target sequencextx\_\{t\}, the model computes an anomaly score from the reconstruction error and latent deviation:
s\(xt\)=α‖xt−x^t‖22\+\(1−α\)‖zt−z¯s‖22,s\(x\_\{t\}\)=\\alpha\\left\\\|x\_\{t\}\-\\hat\{x\}\_\{t\}\\right\\\|\_\{2\}^\{2\}\+\(1\-\\alpha\)\\left\\\|z\_\{t\}\-\\bar\{z\}\_\{s\}\\right\\\|\_\{2\}^\{2\},\(21\)wherezt=E\(xt\)z\_\{t\}=E\(x\_\{t\}\),z¯s\\bar\{z\}\_\{s\}is the mean latent representation estimated from normal source\-domain training samples, andα∈\[0,1\]\\alpha\\in\[0,1\]controls the relative contribution of reconstruction and latent deviation\. A target sequence is classified as anomalous whens\(xt\)s\(x\_\{t\}\)exceeds a predefined threshold\. Target labels are used only to compute final evaluation metrics\.
### 3\.7Evaluation Datasets
In this study, we utilize six distinct IoT\-related datasets originating from diverse application domains—namely, industrial IoT, general\-purpose enterprise networks, military automation, academic testbeds, and smart home automation—to comprehensively evaluate the effectiveness and generalizability of our proposed anomaly detection framework\.
- •CICIDS 2018 Dataset:The CICIDS 2018 dataset\[[19](https://arxiv.org/html/2609.03505#bib.bib2)\], curated by the Canadian Institute for Cybersecurity \(CIC\) in collaboration with the Communications Security Establishment \(CSE\), was generated using a simulated enterprise network setup\. It spans ten days of realistic network traffic, totaling over 16 million flow\-based entries\. Approximately 83% of the data is benign, while 17% comprises various attack categories including brute force, denial\-of\-service \(DoS\), botnet activity, web attacks, and infiltration\. Each record contains more than 80 traffic flow features extracted via CICFlowMeter\. This dataset serves as a comprehensive benchmark for evaluating intrusion detection systems in general network environments\. All recorded features are monitored to examine the robustness of our method under diverse traffic behaviors, enabling an in\-depth assessment of model adaptability across heterogeneous network conditions\.
- •WUSTL\-IIOT\-2021 Dataset:The WUSTL\-IIOT\-2021 dataset\[[20](https://arxiv.org/html/2609.03505#bib.bib6)\]originates from an Industrial IoT \(IIoT\) testbed designed to monitor water storage tanks\. Spanning 53 hours of operation, it includes 1,194,464 entries, capturing critical network metrics such as packet drops and flow durations\. The dataset is predominantly benign \(93%\), with 7% of records corresponding to attack types such as denial\-of\-service \(89\.98%\), reconnaissance \(9\.46%\), SQL injection \(0\.31%\), and backdoor access \(0\.25%\)\. Consistent with prior studies, we track all extracted features to analyze the effectiveness of the proposed method when applied to industrial traffic with varying characteristics\.
- •ACI\-IoT\-2023 Dataset:The ACI\-IoT\-2023 dataset\[[21](https://arxiv.org/html/2609.03505#bib.bib3)\]was collected within a simulated military IoT environment that replicates real\-world home automation scenarios\. It contains 742,758 traffic entries recorded over five days, of which 95% are malicious\. The attack composition includes reconnaissance \(74%\), brute force \(1%\), and denial\-of\-service \(25%\), encompassing subcategories such as scanning and sweeping\. This dataset offers valuable insights into the cybersecurity vulnerabilities inherent in military\-oriented IoT systems\. We utilize all available features to evaluate the proposed method’s performance in handling traffic patterns with distinct operational contexts\.
- •CICIDS 2017 Dataset:A predecessor to CICIDS 2018, this dataset\[[22](https://arxiv.org/html/2609.03505#bib.bib1)\]includes both benign and common, up\-to\-date attacks\. It contains 2,830,743 total flow entries, of which approximately 80\.3% are benign\. The remaining 19\.7% of malicious traffic is composed of several attack types\. The most prevalent attacks are Denial\-of\-Service \(DoS/DDoS\), accounting for the vast majority of malicious instances, followed by Port Scanning\. Other implemented attacks include Brute Force \(FTP and SSH\), Web Attacks \(Brute Force, XSS, SQL Injection\), Infiltration, Botnet, and Heartbleed\. The dataset is used in source–target–adversary combinations to evaluate robustness across different temporal captures and protocol variations within CIC environments\.
- •UNSW\-NB15 Dataset:Developed by the Australian Cyber Security Centre, this dataset\[[23](https://arxiv.org/html/2609.03505#bib.bib4)\]includes both real benign and synthetic attack flows from a total of 2,540,044 records\. Approximately 87\.4% of the traffic is benign, while the other 12\.6% is malicious\. The attack composition consists of nine types, dominated by Generic attacks \(67\.1%\) and Exploits \(13\.9%\)\. The remaining categories are Fuzzers \(7\.5%\), DoS \(5\.1%\), Reconnaissance \(4\.3%\), Analysis \(0\.8%\), Backdoors \(0\.7%\), Shellcode \(0\.5%\), and Worms \(0\.1%\)\. It is employed as both a source and target to evaluate cross\-protocol and attack\-style generalization\.
- •TON\-IoT Dataset:Provided by the Cyber Range Lab at UNSW, TON\-IoT\[[24](https://arxiv.org/html/2609.03505#bib.bib5)\]is a smart home\-oriented dataset with over 22 million telemetry and network event records\. Within the network traffic portion, approximately 64\.8% of entries are benign, and 35\.2% are malicious\. The malicious traffic is heavily skewed towards reconnaissance activities, with Scanning attacks making up 48\.7% of all malicious events\. Denial\-of\-Service is also highly prevalent, with DDoS \(29\.0%\) and DoS \(21\.6%\) attacks forming the next largest categories\. The dataset also contains smaller numbers of Backdoor \(0\.34%\), Injection \(0\.19%\), Ransomware \(0\.10%\), XSS \(0\.04%\), Password \(0\.01%\), and Man\-in\-the\-Middle \(MITM\) attacks\. It is used as a target domain in several experiments, revealing generalization challenges in more constrained settings\.
Together, these six datasets provide a heterogeneous evaluation suite spanning enterprise network traffic, industrial IoT, military\-oriented IoT, academic intrusion\-detection testbeds, and smart\-home IoT environments\. CICIDS2017 and CICIDS2018 represent general\-purpose enterprise network settings with diverse benign and malicious flow patterns; WUSTL\-IIoT\-2021 captures industrial IoT traffic with operationally structured benign behavior and a smaller set of attack classes; ACI\-IoT\-2023 reflects a military\-oriented IoT environment with a highly attack\-dominant distribution; UNSW\-NB15 introduces additional protocol and attack\-style diversity; and TON\-IoT provides smart\-home IoT traffic with substantial reconnaissance and denial\-of\-service activity\.
In our evaluation framework, these datasets are used in source–auxiliary–target combinations to test cross\-domain generalization under strict zero\-shot conditions\. For each experiment, the model is trained using a primary source domain𝒟s\\mathcal\{D\}\_\{s\}and an auxiliary source domain𝒟a\\mathcal\{D\}\_\{a\}for adversarial and contrastive alignment, while the target domain𝒟t\\mathcal\{D\}\_\{t\}is held out entirely during training\. No target\-domain samples, labels, losses, or fine\-tuning steps are used before inference\. The target dataset is used only for final metric computation\. This protocol allows us to evaluate both successful transfer cases and failure modes caused by domain shift, class imbalance, and insufficient source\-domain coverage\.
## 4Model Evaluation and Analysis
### 4\.1Experimental Protocol
In all experiments, the held\-out target domain is used only for final evaluation\. Target labels are not used during model training, adversarial alignment, contrastive learning, threshold selection, or model selection\. Performance is reported using accuracy, Matthews correlation coefficient \(MCC\), recall, precision, F1\-score, and false\-positive rate \(FPR\)\. This protocol is intended to measure strict zero\-shot transfer rather than target\-adaptive performance\.
Figure 2:Confusion matrix for transfer scenario: CICIDS 2018 \(source\)→\\rightarrowACI\-IoT\-2023 \(target\)Figure 3:Confusion matrix for transfer scenario: WUSTL\-IIoT\-2021 \(source\)→\\rightarrowACI\-IoT\-2023 \(target\)Figure 4:Confusion matrix for transfer scenario: CICIDS 2018 \+ WUSTL\-IIoT\-2021 \(source\)→\\rightarrowACI\-IoT\-2023 \(target\)The confusion matrices in Figs\.[2](https://arxiv.org/html/2609.03505#S4.F2)–[4](https://arxiv.org/html/2609.03505#S4.F4)reinforce these observations\. In the CICIDS\-only scenario, true positives are generally high, indicating good recognition of abnormal patterns\. However, moderate false positives suggest some overgeneralization to benign classes\. The WUSTL\-only model achieves a similar true negative rate but suffers from increased false positives and false negatives, due to the absence of explicit attack semantics during training\. The combined scenario demonstrates the most balanced classification performance with minimal false negatives \(66\) and false positives \(330\), aligning with its top accuracy\. This confirms that the adversarial framework effectively aligns heterogeneous source domains to construct a more resilient decision boundary in the target space\.
### 4\.2Zero\-Shot Inference Protocol \(No Target Loss\)
In the final phase, the model operates under a strict zero\-shot setting on the target domain: no target data \(labeled or unlabeled\) is used and*no loss function is computed*in this phase\. Decisions are made using reconstruction errors and latent deviations only\.
SourceTargetACCMCCRecallPrecisionF1FPRACI\+TONCICIDS20171\.0001\.0001\.0001\.0001\.0000\.000ACI\+TONCICIDS20180\.8330\.7071\.0000\.7500\.8570\.333ACI\+TONNB150\.8120\.5840\.7811\.0000\.8770\.000ACI\+WUSTL\-IIoT\-2021CICIDS20171\.0001\.0001\.0001\.0001\.0000\.000ACI\+WUSTL\-IIoT\-2021CICIDS20180\.8540\.7371\.0000\.7810\.8770\.304ACI\+WUSTL\-IIoT\-2021NB150\.8330\.6320\.8001\.0000\.8890\.000ACI\+WUSTL\-IIoT\-2021TON0\.4790\.2270\.8890\.2500\.3900\.615CICIDS2017\+ACICICIDS20180\.8750\.7691\.0000\.8120\.8970\.273CICIDS2017\+ACINB150\.8120\.5840\.7811\.0000\.8770\.000CICIDS2017\+ACITON0\.4790\.2270\.8890\.2500\.3900\.615CICIDS2017\+TONACI0\.3330\.0000\.0000\.0000\.0000\.667CICIDS2017\+TONCICIDS20180\.9580\.9131\.0000\.9380\.9680\.111CICIDS2017\+TONNB150\.8540\.6790\.8211\.0000\.9010\.000CICIDS2017\+WUSTL\-IIoT\-2021ACI0\.3330\.0000\.0000\.0000\.0000\.667CICIDS2017\+WUSTL\-IIoT\-2021CICIDS20180\.9580\.9131\.0000\.9380\.9680\.111CICIDS2017\+WUSTL\-IIoT\-2021NB150\.8330\.6320\.8001\.0000\.8890\.000CICIDS2017\+WUSTL\-IIoT\-2021TON0\.4790\.2270\.8890\.2500\.3900\.615CICIDS2018\+ACICICIDS20171\.0001\.0001\.0001\.0001\.0000\.000CICIDS2018\+ACINB150\.8330\.6320\.8001\.0000\.8890\.000CICIDS2018\+ACITON0\.4790\.2270\.8890\.2500\.3900\.615CICIDS2018\+TONACI0\.3330\.0000\.0000\.0000\.0000\.667CICIDS2018\+TONCICIDS20171\.0001\.0001\.0001\.0001\.0000\.000Table 2:Cross\-domain zero\-shot results for part 1 of the 44\-experiment evaluation\.Sourcelists the two training domains \(A\+B\);Targetis the held\-out zero\-shot domain\.SourceTargetACCMCCRecallPrecisionF1FPRCICIDS2018\+TONNB150\.8120\.5840\.7811\.0000\.8770\.000CICIDS2018\+WUSTL\-IIoT\-2021ACI0\.3330\.0000\.0000\.0000\.0000\.667CICIDS2018\+WUSTL\-IIoT\-2021CICIDS20171\.0001\.0001\.0001\.0001\.0000\.000CICIDS2018\+WUSTL\-IIoT\-2021NB150\.8540\.6790\.8211\.0000\.9010\.000CICIDS2018\+WUSTL\-IIoT\-2021TON0\.4790\.2270\.8890\.2500\.3900\.615NB15\+ACICICIDS20171\.0001\.0001\.0001\.0001\.0000\.000NB15\+ACICICIDS20180\.9380\.8741\.0000\.9060\.9510\.158NB15\+ACITON0\.4790\.2270\.8890\.2500\.3900\.615NB15\+TONACI0\.3330\.0000\.0000\.0000\.0000\.667NB15\+TONCICIDS20171\.0001\.0001\.0001\.0001\.0000\.000NB15\+TONCICIDS20180\.9580\.9131\.0000\.9380\.9680\.111NB15\+WUSTL\-IIoT\-2021ACI0\.3330\.0000\.0000\.0000\.0000\.667NB15\+WUSTL\-IIoT\-2021CICIDS20171\.0001\.0001\.0001\.0001\.0000\.000NB15\+WUSTL\-IIoT\-2021CICIDS20180\.9580\.9131\.0000\.9380\.9680\.111NB15\+WUSTL\-IIoT\-2021TON0\.4790\.2270\.8890\.2500\.3900\.615TON\+ACICICIDS20171\.0001\.0001\.0001\.0001\.0000\.000TON\+ACICICIDS20180\.8960\.8021\.0000\.8440\.9150\.238TON\+ACINB150\.8120\.5840\.7811\.0000\.8770\.000TON\+WUSTL\-IIoT\-2021ACI0\.3330\.0000\.0000\.0000\.0000\.667TON\+WUSTL\-IIoT\-2021CICIDS20171\.0001\.0001\.0001\.0001\.0000\.000TON\+WUSTL\-IIoT\-2021CICIDS20180\.9580\.9131\.0000\.9380\.9680\.111TON\+WUSTL\-IIoT\-2021NB150\.8540\.6790\.8211\.0000\.9010\.000Table 3:Cross\-domain P3 results for part 2 of the 44\-experiment subset from the previous runs\.Sourcelists the two training domains \(A\+B\);Targetis the held\-out zero\-shot domain\.
### 4\.3Cross\-Domain Benchmarking and Latent Alignment via t\-SNE
We expanded the evaluation to six datasets: CICIDS2017, CICIDS2018, UNSW–NB15, TON–IoT, ACI–IoT–2023, and WUSTL\-IIoT\-2021/WUSTL\-IIoT\. These datasets form 44 source–auxiliary–target combinations, where two domains are used during training and alignment and the remaining domain is held out for zero\-shot evaluation\. The cross\-domain results are reported in Tables[2](https://arxiv.org/html/2609.03505#S4.T2)and[3](https://arxiv.org/html/2609.03505#S4.T3)\. Figure[5](https://arxiv.org/html/2609.03505#S4.F5)complements these numerical results by showing the phase–2 latent geometry, i\.e\., the alignedzzspace after VAE encoding with contrastive and adversarial objectives, for thirteen representative source\-domain pairs\.
Several regularities emerge from the latent visualizations\. First, source pairs involving CICIDS2017, CICIDS2018, NB15, or WUSTL\-IIoT\-2021 often form smooth low\-dimensional manifolds, suggesting that the adversarial and contrastive objectives reduce visible domain separation in the learned latent space\. Second, when TON participates as a source, the embedding often becomes highly smooth and nearly one\-dimensional\. Although this indicates strong geometric regularization, it may also suggest reduced latent diversity, which can limit coverage of unseen target\-domain modes\. Third, source pairs involving ACI sometimes retain more scattered or multi\-lobed structures, indicating that complete cross\-domain mixing is more difficult when military\-IoT traffic is involved\. These visual patterns suggest that latent compactness alone is not sufficient; the aligned representation must also preserve enough variability to support unseen target domains\.
The numerical results in Tables[2](https://arxiv.org/html/2609.03505#S4.T2)and[3](https://arxiv.org/html/2609.03505#S4.T3)show that the proposed method performs strongly for several CICIDS2017, CICIDS2018, and NB15 target settings\. When CICIDS2017 is used as the target, source pairs such as ACI\+TON, ACI\+WUSTL\-IIoT\-2021, and CICIDS2018\+ACI achieve perfect or near\-perfect accuracy, MCC, recall, precision, and F1\. Similar behavior is observed when CICIDS2018 is the target, especially for source pairs involving CICIDS2017, NB15, TON, or WUSTL\-IIoT\-2021\.
By contrast, the results also reveal systematic weaknesses in some target domains\. Transfers to TON–IoT often produce low precision and F1 despite high recall, indicating that the model detects many anomalous samples but also generates many false positives\. This behavior appears across several TON target cases, especially when the source pairs include ACI, CICIDS2017, CICIDS2018, NB15, or WUSTL\-IIoT\-2021\. A similar failure mode appears when ACI is the unseen target for several source pairs, where the model collapses toward poor recall and low MCC\. These results indicate that strict zero\-shot transfer remains challenging when the held\-out target contains traffic modes or attack distributions that are poorly covered by the aligned source domains\.
Overall, the cross\-domain benchmark shows that the proposed adversarial and contrastive LSTM–VAE can learn useful transferable representations across several heterogeneous IoT and network\-security datasets, especially when the target domain shares latent structure with the source and auxiliary domains\. At the same time, the weaker TON and ACI target cases highlight an important limitation of strict zero\-shot anomaly detection: alignment between the available source domains does not guarantee sufficient latent support for every unseen deployment\. This motivates the DACAD comparison in the next subsection and suggests that future work should incorporate uncertainty\-aware rejection, broader source\-domain coverage, or lightweight adaptor\-only calibration when a small amount of target data is available\.
ACI\+TONACI\+WUSTL\-IIoT\-2021CICIDS2017\+ACICICIDS2017\+TONCICIDS2017\+WUSTL\-IIoT\-2021CICIDS2018\+ACICICIDS2018\+TONCICIDS2018\+WUSTL\-IIoT\-2021NB15\+ACINB15\+TONNB15\+WUSTL\-IIoT\-2021TON\+ACITON\+WUSTL\-IIoT\-2021Figure 5:Phase 2 latent space visualization after contrastive and adversarial alignment\. Each panel shows the t\-SNE projection of the aligned VAE latent representations for one source domain pair\.
### 4\.4Comparison with DACAD
DACAD\[[5](https://arxiv.org/html/2609.03505#bib.bib7)\]is the closest conceptual baseline to our work because it also addresses anomaly detection in multivariate time series under domain shift using contrastive domain adaptation\. Its main objective is to learn transferable representations by aligning source and target domains through contrastive learning, thereby improving anomaly detection when the deployment distribution differs from the training distribution\. This makes DACAD a strong reference point for evaluating whether the proposed Contrastive Adversarially\-Adaptive LSTM\-VAE provides additional value beyond contrastive domain adaptation alone\.
Despite this conceptual similarity, our framework differs from DACAD in four important ways\. First, DACAD is primarily designed around domain\-adaptive multivariate time\-series anomaly detection, whereas our framework is designed for strict zero\-shot IoT traffic anomaly detection\. In our final inference phase, no target\-domain samples, labels, target loss, or target\-side fine\-tuning are used\. The model performs detection only through reconstruction error and latent deviation from the source\-learned normal\-behavior manifold\. Second, DACAD focuses on contrastive domain adaptation, while our method combines contrastive latent structuring with adversarial domain alignment through a gradient reversal mechanism\. This dual objective simultaneously encourages semantic separation between dissimilar temporal patterns and domain invariance across heterogeneous IoT traffic sources\. Third, our model explicitly supports variable\-length flow sequences through the LSTM\-VAE formulation, which is important for realistic IoT traffic where flows differ in duration, sampling density, and attack timescale\. Fourth, our destination\-centric segmentation strategy groups traffic by receiver endpoint, preserving device\-level communication context instead of relying only on generic temporal windows\.
To compare against DACAD, we use the same cross\-domain evaluation setting adopted in the previous subsection\. Multiple datasets are used as source/adversarial training domains, while the held\-out target domain is never exposed during training\. The comparison therefore evaluates generalization under domain shift rather than in\-domain detection\. This is particularly important because IoT anomaly detection systems are often deployed in environments whose device composition, protocols, traffic intensity, and attack distribution differ from those observed during training\.
The comparison shows a mixed outcome rather than a uniform advantage for either method\. The proposed framework performs particularly well when CICIDS2017 or CICIDS2018 is the held\-out target, often reaching near\-perfect accuracy in these transfer settings\. In contrast, DACAD achieves stronger accuracy in several NB15, TON\-IoT, and ACI\-IoT target configurations\. This indicates that the proposed reconstruction\-based adversarial LSTM\-VAE is effective when the unseen target shares temporal and flow\-level structure with the aligned source domains, whereas DACAD can be more competitive when contrastive domain adaptation provides better direct representation transfer\.
These results also clarify the role of the proposed design choices\. Our method emphasizes strict no\-target\-loss inference, variable\-length sequence reconstruction, adversarial source\-domain alignment, and destination\-centric flow modeling\. This design is especially effective when the held\-out target shares temporal and flow\-level structure with the aligned source domains, as seen in several CICIDS2017 and CICIDS2018 target settings\. DACAD, by contrast, is a strong contrastive domain\-adaptation baseline and can outperform the proposed method in several NB15, TON–IoT, and ACI–IoT target configurations, where direct contrastive representation transfer appears to handle the domain shift more effectively\. Therefore, the comparison should be interpreted as complementary rather than as a one\-sided improvement: the proposed framework offers a deployment\-oriented strict zero\-shot detector for IoT traffic anomaly detection, while DACAD remains highly competitive in difficult cross\-domain accuracy comparisons\.
SourceTargetProposed ACCDACAD ACCACI\+TONCICIDS20171\.0000\.519ACI\+TONCICIDS20180\.8330\.415ACI\+TONNB150\.8120\.649ACI\+WUSTL\-IIoT\-2021CICIDS20171\.0000\.656ACI\+WUSTL\-IIoT\-2021CICIDS20180\.8540\.738ACI\+WUSTL\-IIoT\-2021NB150\.8330\.985ACI\+WUSTL\-IIoT\-2021TON0\.4790\.966CICIDS2017\+ACICICIDS20180\.8750\.506CICIDS2017\+ACINB150\.8120\.895CICIDS2017\+ACITON0\.4790\.800CICIDS2017\+TONACI0\.3330\.485CICIDS2017\+TONCICIDS20180\.9580\.551CICIDS2017\+TONNB150\.8540\.988CICIDS2017\+WUSTL\-IIoT\-2021ACI0\.3330\.512CICIDS2017\+WUSTL\-IIoT\-2021CICIDS20180\.9580\.559CICIDS2017\+WUSTL\-IIoT\-2021NB150\.8330\.984CICIDS2017\+WUSTL\-IIoT\-2021TON0\.4790\.979CICIDS2018\+ACICICIDS20171\.0000\.626CICIDS2018\+ACINB150\.8330\.989CICIDS2018\+ACITON0\.4790\.563CICIDS2018\+TONACI0\.3330\.492CICIDS2018\+TONCICIDS20171\.0000\.600Table 4:Accuracy comparison between the proposed method and DACAD for part 1 of the 44\-experiment P3 subset\. The higher accuracy in each row is shown in bold\.SourceTargetProposed ACCDACAD ACCCICIDS2018\+TONNB150\.8120\.891CICIDS2018\+WUSTL\-IIoT\-2021ACI0\.3330\.418CICIDS2018\+WUSTL\-IIoT\-2021CICIDS20171\.0000\.691CICIDS2018\+WUSTL\-IIoT\-2021NB150\.8540\.904CICIDS2018\+WUSTL\-IIoT\-2021TON0\.4790\.963NB15\+ACICICIDS20171\.0000\.484NB15\+ACICICIDS20180\.9380\.545NB15\+ACITON0\.4790\.603NB15\+TONACI0\.3330\.564NB15\+TONCICIDS20171\.0000\.647NB15\+TONCICIDS20180\.9580\.594NB15\+WUSTL\-IIoT\-2021ACI0\.3330\.418NB15\+WUSTL\-IIoT\-2021CICIDS20171\.0000\.620NB15\+WUSTL\-IIoT\-2021CICIDS20180\.9580\.551NB15\+WUSTL\-IIoT\-2021TON0\.4790\.984TON\+ACICICIDS20171\.0000\.389TON\+ACICICIDS20180\.8960\.410TON\+ACINB150\.8120\.632TON\+WUSTL\-IIoT\-2021ACI0\.3330\.449TON\+WUSTL\-IIoT\-2021CICIDS20171\.0000\.680TON\+WUSTL\-IIoT\-2021CICIDS20180\.9580\.755TON\+WUSTL\-IIoT\-2021NB150\.8540\.940Table 5:Accuracy comparison between the proposed method and DACAD for part 2 of the 44\-experiment P3 subset\. The higher accuracy in each row is shown in bold\.
## 5Conclusion
This paper introduced a contrastive adversarially adaptive LSTM–VAE framework for zero\-shot anomaly detection in multivariate IoT network traffic\. By combining sequence\-based variational reconstruction with adversarial source\-domain alignment and cosine\-based contrastive latent structuring, the framework addresses cross\-domain shifts without requiring target\-side labels, target\-domain loss computation, or target\-side fine\-tuning\. The integration of lightweight domain adaptors and destination\-centric traffic segmentation further allows the model to accommodate variable\-length flows while preserving device\-level communication context\.
Extensive evaluation across six diverse IoT and network\-security benchmarks spanning 44 transfer scenarios demonstrates that the proposed framework achieves strong zero\-shot generalization in several structurally compatible cross\-domain settings, particularly for CICIDS2017 and CICIDS2018 targets\. At the same time, the results expose systematic degradation in highly shifted smart\-home and military\-IoT target domains when the aligned source domains do not provide sufficient latent coverage\. In particular, TON–IoT target cases often produce high recall but low precision, indicating elevated false\-positive rates, while several ACI–IoT target cases show poor recall and low MCC under strict zero\-shot transfer\.
Comparison with DACAD shows a complementary performance pattern rather than a uniform advantage for either method\. The proposed reconstruction\-driven LSTM–VAE is highly effective when temporal and flow\-level structures transfer across domains, whereas direct contrastive domain adaptation can be more competitive under severe distribution shift\. These findings highlight both the promise and the limitations of strict zero\-shot anomaly detection for heterogeneous IoT deployments\.
## CRediT authorship contribution statement
Mahshid Rezakhani: Conceptualization, Methodology, Software, Validation, Formal analysis, Investigation, Data curation, Writing – original draft, Visualization\. Tolunay Seyfi: Conceptualization, Methodology, Software, Validation, Formal analysis, Investigation, Data curation, Writing – original draft, Writing – review and editing, Visualization\. Fatemeh Afghah: Conceptualization, Supervision, Project administration, Funding acquisition, Writing – review and editing\.
## Declaration of competing interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper\.
## Data availability
The datasets analyzed in this study are publicly available from their respective repositories\. Processed data and implementation details are available from the corresponding author upon reasonable request\.
## Acknowledgements
This material is based upon work supported by the National Science Foundation under Grant Numbers CNS\-2318726 and CNS\-2232048\.
## References
- \[1\]Z\. A\. Haider, A\. Zeb, T\. Rahman, S\. K\. Singh, R\. Akram, A\. Arishi, and I\. Ullah\(2025\)A survey on anomaly detection in IoT: techniques, challenges, and opportunities with the integration of 6G\.Computer Networks270,pp\. 111484\.External Links:ISSN 1389\-1286,[Document](https://dx.doi.org/10.1016/j.comnet.2025.111484),[Link](https://www.sciencedirect.com/science/article/pii/S1389128625004517)Cited by:[§1](https://arxiv.org/html/2609.03505#S1.p1.1),[§1](https://arxiv.org/html/2609.03505#S1.p2.1),[§1](https://arxiv.org/html/2609.03505#S1.p4.1)\.
- \[2\]M\. M\. Rahman, S\. Al Shakil, and M\. R\. Mustakim\(2025\)A survey on intrusion detection system in IoT networks\.Cyber Security and Applications3,pp\. 100082\.External Links:ISSN 2772\-9184,[Document](https://dx.doi.org/10.1016/j.csa.2024.100082),[Link](https://www.sciencedirect.com/science/article/pii/S2772918424000481)Cited by:[§1](https://arxiv.org/html/2609.03505#S1.p1.1),[§1](https://arxiv.org/html/2609.03505#S1.p3.1),[§1](https://arxiv.org/html/2609.03505#S1.p6.1)\.
- \[3\]J\. Doménech, O\. León, M\. S\. Siddiqui, and J\. Pegueroles\(2025\)Evaluating and enhancing intrusion detection systems in IoMT: the importance of domain\-specific datasets\.Internet of Things32,pp\. 101631\.External Links:ISSN 2542\-6605,[Document](https://dx.doi.org/10.1016/j.iot.2025.101631),[Link](https://www.sciencedirect.com/science/article/pii/S2542660525001453)Cited by:[§1](https://arxiv.org/html/2609.03505#S1.p2.1)\.
- \[4\]Z\. Z\. Darban, G\. I\. Webb, S\. Pan, C\. Aggarwal, and M\. Salehi\(2024\)Deep learning for time series anomaly detection: a survey\.ACM Computing Surveys57\(1\)\.External Links:ISSN 0360\-0300,[Link](https://doi.org/10.1145/3691338),[Document](https://dx.doi.org/10.1145/3691338)Cited by:[§1](https://arxiv.org/html/2609.03505#S1.p3.1),[§1](https://arxiv.org/html/2609.03505#S1.p4.1),[§1](https://arxiv.org/html/2609.03505#S1.p5.1),[§1](https://arxiv.org/html/2609.03505#S1.p6.1)\.
- \[5\]Z\. Z\. Darban, Y\. Yang, G\. I\. Webb, C\. C\. Aggarwal, Q\. Wen, S\. Pan, and M\. Salehi\(2025\)DACAD: domain adaptation contrastive learning for anomaly detection in multivariate time series\.IEEE Transactions on Knowledge and Data Engineering37\(8\),pp\. 4485–4496\.External Links:[Document](https://dx.doi.org/10.1109/TKDE.2025.3569909)Cited by:[§1](https://arxiv.org/html/2609.03505#S1.p3.1),[§1](https://arxiv.org/html/2609.03505#S1.p5.1),[§1](https://arxiv.org/html/2609.03505#S1.p6.1),[Table 1](https://arxiv.org/html/2609.03505#S2.T1.2.1.13.1),[§4\.4](https://arxiv.org/html/2609.03505#S4.SS4.p1.1)\.
- \[6\]L\. Tang, Z\. Wang, G\. He, R\. Wang, and F\. Nie\(2024\)Perturbation guiding contrastive representation learning for time series anomaly detection\.InProceedings of the Thirty\-Third International Joint Conference on Artificial Intelligence, IJCAI\-24,K\. Larson \(Ed\.\),pp\. 4955–4963\.Note:Main TrackExternal Links:[Document](https://dx.doi.org/10.24963/ijcai.2024/548),[Link](https://doi.org/10.24963/ijcai.2024/548)Cited by:[§1](https://arxiv.org/html/2609.03505#S1.p4.1),[§1](https://arxiv.org/html/2609.03505#S1.p6.1)\.
- \[7\]S\. Guan, Z\. He, S\. Ma, and M\. Gao\(2024\)Multivariate time series anomaly detection with variational autoencoder and spatial–temporal graph network\.Computers & Security142,pp\. 103877\.External Links:ISSN 0167\-4048,[Document](https://dx.doi.org/10.1016/j.cose.2024.103877),[Link](https://www.sciencedirect.com/science/article/pii/S0167404824001780)Cited by:[§1](https://arxiv.org/html/2609.03505#S1.p5.1)\.
- \[8\]L\. Tang, R\. Wei, B\. Xia, Y\. Tang, W\. Wang, Q\. Huang, and Q\. Chen\(2025\)Online anomaly detection in industrial IoT networks using a supervised contrastive learning\-based spatiotemporal variational autoencoder\.IEEE Internet of Things Journal\.External Links:[Document](https://dx.doi.org/10.1109/JIOT.2025.3537864)Cited by:[§2\.1](https://arxiv.org/html/2609.03505#S2.SS1.p1.1),[Table 1](https://arxiv.org/html/2609.03505#S2.T1.2.1.2.1)\.
- \[9\]H\. Mancy and Q\. H\. Naith\(2025\)SwinIoT: a hierarchical transformer\-based framework for behavioral anomaly detection in IoT\-driven smart cities\.IEEE Access13,pp\. 48758–48774\.External Links:[Document](https://dx.doi.org/10.1109/ACCESS.2025.3551207)Cited by:[§2\.1](https://arxiv.org/html/2609.03505#S2.SS1.p1.1),[Table 1](https://arxiv.org/html/2609.03505#S2.T1.2.1.3.1)\.
- \[10\]N\. Shamim, M\. Asim, A\. I\. Awad, and M\. K\. Khan\(2025\)Anomaly detection in internet of things system calls using a centroid\-based vector\-space model\.IEEE Internet of Things Journal\.External Links:[Document](https://dx.doi.org/10.1109/JIOT.2025.3562675)Cited by:[§2\.1](https://arxiv.org/html/2609.03505#S2.SS1.p1.1),[Table 1](https://arxiv.org/html/2609.03505#S2.T1.2.1.4.1)\.
- \[11\]L\. Tan, A\. Singh, W\. Zhang, H\. Pei, P\. Zhang, P\. K\. Chahal, and M\. Singh\(2025\)Energy\-efficient tactile\-driven rule configuration and anomaly detection in industrial IoT systems\.IEEE Internet of Things Journal\.External Links:[Document](https://dx.doi.org/10.1109/JIOT.2025.3541641)Cited by:[§2\.1](https://arxiv.org/html/2609.03505#S2.SS1.p1.1),[Table 1](https://arxiv.org/html/2609.03505#S2.T1.2.1.5.1)\.
- \[12\]H\. Geng, Q\. Ma, H\. Chi, Z\. Zhang, J\. Yang, and X\. Yin\(2025\)DUdetector: a dual\-granularity unsupervised model for network anomaly detection\.Computer Networks257,pp\. 110937\.External Links:[Document](https://dx.doi.org/10.1016/j.comnet.2024.110937)Cited by:[§2\.2](https://arxiv.org/html/2609.03505#S2.SS2.p1.1),[Table 1](https://arxiv.org/html/2609.03505#S2.T1.2.1.6.1)\.
- \[13\]G\. Zeng, Y\. Yang, K\. Lu, G\. Geng, and J\. Weng\(2025\)Evolutionary adversarial autoencoder for unsupervised anomaly detection of industrial internet of things\.IEEE Transactions on Reliability,pp\. 1–15\.External Links:[Document](https://dx.doi.org/10.1109/TR.2025.3528256)Cited by:[§2\.2](https://arxiv.org/html/2609.03505#S2.SS2.p1.1),[Table 1](https://arxiv.org/html/2609.03505#S2.T1.2.1.7.1)\.
- \[14\]M\. Zhanget al\.\(2024\)DPGLAD: an unsupervised graph learning\-based anomaly detection model for industrial IoT\.Applied Intelligence\.Cited by:[§2\.2](https://arxiv.org/html/2609.03505#S2.SS2.p1.1),[Table 1](https://arxiv.org/html/2609.03505#S2.T1.2.1.8.1)\.
- \[15\]E\. Tuyishime, M\. Martalò, P\. A\. Cotfas, V\. Popescu, D\. T\. Cotfas, and A\. Rekeraho\(2025\)Resource\-efficient traffic classification using feature selection for message queuing telemetry transport–internet of things network\-based security attacks\.Applied Sciences15\(8\),pp\. 4252\.External Links:[Document](https://dx.doi.org/10.3390/app15084252)Cited by:[§2\.2](https://arxiv.org/html/2609.03505#S2.SS2.p1.1),[Table 1](https://arxiv.org/html/2609.03505#S2.T1.2.1.9.1)\.
- \[16\]L\. Chenet al\.\(2025\)MindFlow: a deep learning\-based intrusion detection system for IoT using CNN\-BiLSTM on mindspore\.arXiv preprint arXiv:2504\.17678\.Cited by:[§2\.2](https://arxiv.org/html/2609.03505#S2.SS2.p1.1),[Table 1](https://arxiv.org/html/2609.03505#S2.T1.2.1.10.1)\.
- \[17\]B\. Jiang, G\. Wang, X\. Cui, F\. Luo, and J\. Wang\(2025\)Lightweight anomaly detection in federated learning via separable convolution and convergence acceleration\.Internet of Things30,pp\. 101518\.External Links:[Document](https://dx.doi.org/10.1016/j.iot.2025.101518)Cited by:[§2\.2](https://arxiv.org/html/2609.03505#S2.SS2.p1.1),[Table 1](https://arxiv.org/html/2609.03505#S2.T1.2.1.11.1)\.
- \[18\]A\. Babu and A\. Bagubali\(2025\)Federated learning with sailfish\-optimized ensemble models for anomaly detection in iot edge computing environment\.IEEE Access13,pp\. 53171–53187\.External Links:[Document](https://dx.doi.org/10.1109/ACCESS.2025.3554301)Cited by:[§2\.2](https://arxiv.org/html/2609.03505#S2.SS2.p1.1),[Table 1](https://arxiv.org/html/2609.03505#S2.T1.2.1.12.1)\.
- \[19\]Communications Security Establishment \(CSE\) and Canadian Institute for Cybersecurity \(CIC\)\(2018\)CSE\-cic\-ids2018: a collaborative dataset for computer network intrusion detection\.Technical reportUniversity of New Brunswick\.External Links:[Link](https://www.unb.ca/cic/datasets/ids-2018.html)Cited by:[1st item](https://arxiv.org/html/2609.03505#S3.I1.i1.p1.1)\.
- \[20\]D\. Bhamare S\. Zolanvariet al\.\(2021\)Cybersecurity for industrial internet of things \(IIoT\): a survey and a testbed\.IEEE International Conference on Computer and Communication Engineering \(ICCCE\)\.External Links:[Link](https://www.cse.wustl.edu/~jain/iiot2/index.html)Cited by:[2nd item](https://arxiv.org/html/2609.03505#S3.I1.i2.p1.1)\.
- \[21\]N\. Bastian D\. Bierbraueret al\.\(2023\)ACI IoT network traffic dataset 2023\.IEEE Dataport\.External Links:[Document](https://dx.doi.org/10.21227/qacj-3x32)Cited by:[3rd item](https://arxiv.org/html/2609.03505#S3.I1.i3.p1.1)\.
- \[22\]I\. Sharafaldin, A\. H\. Lashkari, and A\. A\. Ghorbani\(2018\)Toward generating a new intrusion detection dataset and intrusion traffic characterization\.InProceedings of the 4th International Conference on Information Systems Security and Privacy \(ICISSP\),pp\. 108–116\.External Links:[Document](https://dx.doi.org/10.5220/0006639801080116)Cited by:[4th item](https://arxiv.org/html/2609.03505#S3.I1.i4.p1.1)\.
- \[23\]N\. Moustafa and J\. Slay\(2015\)UNSW\-NB15: a comprehensive data set for network intrusion detection systems\.InProceedings of the Military Communications and Information Systems Conference \(MilCIS\),pp\. 1–6\.External Links:[Document](https://dx.doi.org/10.1109/MilCIS.2015.7348942)Cited by:[5th item](https://arxiv.org/html/2609.03505#S3.I1.i5.p1.1)\.
- \[24\]N\. Moustafa M\. Ahmedet al\.\(2020\)Data analytics\-enabled intrusion detection: evaluations of ToN\_IoT linux datasets\.InProceedings of the 2020 IEEE 19th International Conference on Trust, Security and Privacy in Computing and Communications \(TrustCom\),pp\. 839–846\.External Links:[Document](https://dx.doi.org/10.1109/TrustCom50675.2020.00100)Cited by:[6th item](https://arxiv.org/html/2609.03505#S3.I1.i6.p1.1)\.
- \[25\]J\. Azar, M\. Al Saleh, R\. Couturier, and H\. Noura\(2025\)Text mining and unsupervised deep learning for intrusion detection in smart\-grid communication networks\.IoT6\(2\),pp\. 22\.External Links:[Document](https://dx.doi.org/10.3390/iot6020022)
- \[26\]R\. Fanget al\.\(2024\)LTG: learning temporal and graph structures for multivariate time\-series anomaly detection in IoT networks\.Discover Internet of Things\.
- \[27\]S\. Xie, L\. Li, and Y\. Zhu\(2024\)Anomaly detection for multivariate time series in IoT using discrete wavelet decomposition and dual graph attention networks\.Computers & Security146,pp\. 104075\.External Links:ISSN 0167\-4048,[Document](https://dx.doi.org/10.1016/j.cose.2024.104075),[Link](https://www.sciencedirect.com/science/article/pii/S0167404824003808)
\*Similar Articles
Federated Low-Rank Koopman Learning for Multivariate Time-Series Anomaly Detection in IoT Systems
Proposes FedKAD, a federated Koopman anomaly detection framework for multivariate time series in IoT systems, using lightweight sliding-window Koopman representations and a Stiefel-ADMM algorithm for efficient communication and inference.
CALAD: Channel-Aware contrastive Learning for multivariate time series Anomaly Detection
Proposes CALAD, a channel-aware contrastive learning framework for multivariate time series anomaly detection that uses estimated channel relevance to construct contrastive samples, achieving state-of-the-art performance.
Zero-Shot Learning in Industrial Scenarios: New Large-Scale Benchmark, Challenges and Baseline
This paper proposes a large-scale multi-modal dataset (MMIO) for zero-shot industrial defect detection and introduces the Refined Text-Visual Prompt (RTVP) method, achieving state-of-the-art results on the benchmark.
Cross-Domain Generalization Failure in Lightweight Intrusion Detection Models for IIoT Networks
This paper investigates the cross-domain generalization failure of lightweight ML models for IIoT intrusion detection, finding they rely on coarse port features and that adversarial robustness does not correlate with cross-network performance.
Modeling Normal Is All You Need: Joint Latent Clustering for Anomaly Detection in Multimodal Cyber-Physical Systems
This paper introduces a joint latent clustering approach for anomaly detection in multimodal cyber-physical systems, modeling normal behavior as a mixture of Gaussians in latent space, and proposes a fair evaluation protocol. It achieves state-of-the-art results on three real-world CPS datasets, particularly on difficult subsets.