Next Article in Journal
Improved Hippopotamus Optimization Algorithm for Deep Learning Denoising of Controlled Source Electromagnetic Method Data
Previous Article in Journal
Microcontroller-Based Synchronized Switching Drive for DC Electromagnet-Driven Apparatus
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Generalized Zero-Shot Learning for Evolving Network Device Identification

1
State Grid Shanghai Municipal Electric Power Company, Shanghai 200122, China
2
School of Informatics, Xiamen University, Xiamen 361102, China
3
State Grid Electric Power Research Institute Co., Ltd., Nanjing 211106, China
*
Author to whom correspondence should be addressed.
Electronics 2026, 15(11), 2320; https://doi.org/10.3390/electronics15112320
Submission received: 11 April 2026 / Revised: 22 May 2026 / Accepted: 23 May 2026 / Published: 27 May 2026
(This article belongs to the Special Issue Network Traffic Analysis for Enhanced Cybersecurity)

Abstract

The rapid expansion of the Ubiquitous Electric Internet of Things (UEIoT) has introduced a vast array of heterogeneous devices into smart grids, rendering traditional identification methods inadequate. The continuous emergence of new terminal models and frequent firmware updates create a dynamic environment where training data cannot realistically cover all evolving device types. To bridge this gap, we propose HALO (Hierarchical Attribute-guided Learning with Offset Calibration), a generalized zero-shot learning (GZSL) framework specifically designed for IoT device identification. First, a lightweight Transformer-based architecture, NetFormer, is utilized to extract discriminative features by capturing fine-grained temporal behaviors with minimal computational overhead. Second, a Weighted Conditional Variational Autoencoder (W-CVAE) is developed to synthesize high-quality pseudo-samples for unseen classes. To ensure semantic fidelity, the W-CVAE incorporates multi-scale Maximum Mean Discrepancy (MMD) to prevent mode collapse and employs attribute-feature contrastive learning to align semantic and feature spaces. Finally, a hybrid prototype construction strategy and an adaptive bias calibration mechanism are introduced to dynamically adjust decision boundaries, effectively mitigating the seen-class bias inherent in GZSL. Experimental results demonstrate that HALO significantly outperforms existing baseline methods across multiple evaluation metrics, validating the effectiveness and superiority of the proposed framework.

1. Introduction

With the rapid development of networking technology, the number of devices connected in cyberspace has undergone exponential growth, particularly within the context of the smart grid and the Ubiquitous Electric Internet of Things (UEIoT). The evolution toward new power systems has led to the massive integration of heterogeneous terminal devices, including smart meters, power sensing terminals, and distributed energy resources. While these IoT devices enable bi-directional communication and ’source–grid–load–storage’ synergistic control, they also introduce unprecedented security risks to the critical energy infrastructure. Due to the lack of unified standards for identity declaration and the massive scale of cross-vendor hardware, these power terminals often expose vulnerabilities during deployment, becoming potential entry points for sophisticated cyber-attacks that could jeopardize the stability of the entire grid [1,2]. In this context, improving network visibility across the power dispatching and distribution networks has become a central requirement. Precise IoT device identification is fundamental for grid operators to maintain an accurate asset inventory, track anomalous device behavior, and implement zero-trust security policies to mitigate emerging threats at an early stage [3].
Researchers have explored automated device identification methods over the past decade. Early approaches primarily relied on handcrafted feature engineering combined with traditional machine learning classifiers, extracting multi-dimensional statistical features from network sessions for classification [4]. In recent years, with the rise of deep learning, architectures such as CNNs, RNNs, and Transformers have been widely adopted to automatically learn high-level representations of network traffic in an end-to-end manner, significantly improving identification accuracy [5,6]. However, these methods are generally built upon a strict closed-set assumption, which presumes that all device classes encountered during testing have already been seen during training. In real-world network environments, IoT device models evolve continuously as manufacturers frequently release firmware updates and new hardware iterations, making it impractical for static training datasets to encompass all dynamically emerging device types. When encountering unseen classes during inference, traditional closed-set models tend to misclassify them as one of the seen classes with high confidence [7], thereby undermining system reliability and security. Although some studies have attempted to incorporate open-set recognition (OSR) mechanisms [8] to improve security by rejecting unknown samples, such approaches can only determine whether a device is unknown, without further inferring its specific category. This limitation makes them insufficient for practical network management scenarios that require precise identification and tracing of emerging threats.
In recent years, zero-shot learning (ZSL) has achieved significant progress in computer vision and natural language processing [9], and has been applied to the field of IoT device identification [10,11]. Its core idea is to leverage semantic auxiliary information, such as attribute vectors, to build a semantic bridge between seen and unseen classes, enabling models to infer categories that were not observed during training. This paradigm provides a promising direction for addressing the generalization challenges in device identification. However, directly applying existing ZSL methods to IoT device identification exposes two critical limitations. First, IoT traffic data is characterized by high dimensionality, sparsity, subtle inter-class differences, and significant protocol noise [4,12,13], lacking the intuitive visual semantics (e.g., shape, color) present in image data. Existing generative models, such as Variational Autoencoders (VAEs), are prone to the over-smoothing effect of KL divergence when handling such high-dimensional traffic features [14]. This often leads to mode collapse and makes it difficult to establish a strong alignment between abstract traffic features and semantic attributes. As a result, the synthesized pseudo-samples for unseen classes may exhibit significant semantic deviations and lack sufficient discriminative power. Second, in the more realistic generalized zero-shot learning (GZSL) setting, the test set contains a mixture of both seen and unseen devices. Since the classifier is trained only on real samples from seen classes, its decision boundary tends to be biased toward seen classes (seen-class bias) [15]. This bias causes the model to misclassify unseen samples—especially hard examples—as seen classes, leading to a sharp decline in recall for unseen classes and limiting its effectiveness in real-world network environments where heterogeneous devices coexist.
To address the above challenges, this paper proposes a GZSL framework for IoT device identification, termed HALO (Hierarchical Attribute-guided Learning with Offset Calibration). Specifically, HALO addresses the problem across three hierarchical levels: feature extraction, pseudo-sample generation, and classification decision. At the feature extraction level, a lightweight Transformer architecture is designed to accommodate the structural characteristics of network traffic data, improving feature discriminability while controlling computational overhead. At the generation level, multi-scale distribution alignment constraints [16] and attribute-feature contrastive learning [17] are introduced to overcome the limitations of existing methods in modeling semantic consistency, thereby enhancing the semantic fidelity of generated pseudo-samples. At the decision level, an adaptive bias calibration mechanism is employed to dynamically correct the imbalance between seen and unseen classes, effectively mitigating the prediction bias in GZSL. Together, these components enable HALO to achieve superior zero-shot learning performance in complex network environments.
The main technical contributions of this work are summarized as follows:
(1)
A lightweight Transformer architecture, named NetFormer, is proposed for traffic feature extraction. By removing complex components in conventional Transformers and introducing a stream mapping mechanism, the model achieves efficient discriminative feature learning while significantly reducing computational cost, and effectively captures temporal dependencies and statistical patterns in traffic data.
(2)
A Weighted Conditional Variational Autoencoder (W-CVAE) generation module is proposed, integrating multi-scale Maximum Mean Discrepancy (MMD) and attribute-feature contrastive learning. The multi-scale MMD constraint alleviates mode collapse, while the contrastive loss reduces the semantic gap between attributes and traffic features, enabling the generation of high-quality pseudo-samples with strong semantic fidelity for unseen classes.
(3)
An adaptive bias-calibrated hybrid prototype classification strategy is introduced. By dynamically adjusting the decision boundaries between seen and unseen classes, the proposed method effectively mitigates the seen-class bias in GZSL and achieves a more balanced allocation of prediction confidence.
(4)
Extensive experiments are conducted on real-world IoT traffic datasets. The results demonstrate that HALO significantly outperforms state-of-the-art baselines, across multiple evaluation metrics achieving a ZSL accuracy of 97.6% and a GZSL harmonic mean of 90.9%—representing a 16.7% and 8.1% absolute improvement over the state-of-the-art baseline (i.e., ZEST [10]), respectively, validating the effectiveness and superiority of the proposed framework.
The rest of the paper is organized as follows. In Section 2, we introduce the related literature for IoT fingerprinting and ZSL. Section 3 presents the overall architecture of the proposed HALO framework. Section 4 elaborates the technical details of our ZSL framework for identifying both seen and unseen IoT devices. Section 5 reports the experimental setup and results. Finally, we conclude our work in Section 7.

2. Related Work

2.1. IoT Device Identification

IoT device identification aims to automatically infer device types by analyzing network traffic characteristics, serving as a fundamental task in network security management. In the early stage of development, device fingerprint construction in this field heavily relied on the combination of expert-driven feature engineering and traditional machine learning classifiers [4,12,18]. For instance, ProfilIoT [18] requires manual extraction of multi-level TCP session features across the network, transport, and application layers, followed by training device-specific classifiers such as Random Forest and XGBoost. Similarly, IoT Sentinel [12] depends on 23 predefined packet attributes, transforming packets collected during the device setup phase into fixed-dimensional handcrafted feature vectors, which are then fed into a Random Forest classifier. These studies indicate that the effectiveness of early approaches largely depends on complex and poorly generalizable manual feature extraction rules.
With the rise of deep learning, researchers began to explore architectures such as CNNs and RNNs to automatically learn high-level representations from raw traffic, reducing reliance on manual feature engineering while substantially advancing identification performance. For example, Martin et al. [5] proposed a CNN-LSTM hybrid architecture that processes truncated packet header sequences to perform end-to-end IoT traffic service classification. Aneja et al. [19] converted packet inter-arrival times into two-dimensional image representations and applied CNN-based image classification to identify device types. In recent years, Transformer-based models have been increasingly introduced due to their strong sequence modeling capabilities. Compared to RNN-based methods, the self-attention mechanism enables parallel modeling of long-range dependencies within packet sequences, enhancing representation power for variable-length traffic. Luo et al. [6] designed a Transformer-based feature extraction framework for heterogeneous IoT traffic, leveraging global attention to learn high-level behavioral representations directly from traffic data, significantly improving accuracy and robustness in real-world scenarios. Sharma et al. [20] similarly demonstrated the effectiveness of Transformers by modeling long-term communication patterns, achieving substantial performance gains over CNN and RNN baselines.
Despite these advances, existing methods share two key limitations. First, the growing complexity of deep models entails considerable computational overhead, limiting their practicality in resource-constrained deployment scenarios. Second, and more fundamentally, these approaches are built under the closed-set assumption, where the device categories in the testing phase are identical to those seen during training. This assumption limits their applicability in real-world environments, where new device types continuously emerge. To address this issue, some studies [8,21,22] have introduced open-set recognition mechanisms to detect and reject unknown samples, thereby improving system reliability in open environments. However, such methods can only determine whether a device belongs to known categories, without assigning specific labels to unseen devices. This limitation restricts their usefulness in practical network management scenarios, where precise identification and categorization of newly emerging devices are required. This fundamental gap has motivated the exploration of ZSL approaches, which leverage semantic information to enable the recognition of unseen device categories.

2.2. Zero-Shot Learning

Zero-shot learning (ZSL) introduces semantic information of classes to enable models to recognize categories that are unseen during training, and has recently emerged as an important paradigm for addressing open-world recognition problems. Early ZSL methods mainly focused on learning a direct mapping between visual features and semantic spaces to achieve knowledge transfer across categories [23,24]. However, these approaches commonly suffer from the hubness problem [25] and domain shift [26], which significantly limit their generalization ability in real-world scenarios.
With the development of generative models, feature synthesis-based methods have gradually become the dominant paradigm. These approaches transform the ZSL problem into a conventional supervised learning task by synthesizing pseudo-features for unseen classes, achieving substantial performance improvements on standard benchmarks. Under this paradigm, a generative model is trained on seen classes using paired visual features and semantic descriptors; at inference time, the class semantics of unseen categories are used to drive the generator in producing pseudo-features, which are then used to train a standard classifier. Existing generative methods mainly follow the lines of Generative Adversarial Networks (GANs), Variational Autoencoders (VAEs), and their variants. Nevertheless, the quality and semantic fidelity of generated samples remain the core bottlenecks, with common challenges in training stability and semantic alignment.
Along the GAN-based line, the core idea is to frame feature generation as a minimax game between a generator G and a discriminator D, optimized via min G max D E [ log D ( x | a ) ]   + E [ log ( 1 D ( G ( z , a ) ) ) ] , where the generator maps a latent code z conditioned on class semantics a to synthetic visual features [27]. In practice, a is typically concatenated with a noise vector z as the generator input, while the discriminator receives both the feature and the corresponding semantic vector to enforce semantic consistency between generated samples and the target class. Despite their expressive generation capacity, GAN-based methods are inherently prone to training instability and mode collapse, particularly when operating over high-dimensional feature spaces. To alleviate this, some studies adopt Wasserstein GAN (WGAN) [28,29], which replaces the Jensen–Shannon divergence with the Wasserstein-1 distance and enforces a Lipschitz constraint via gradient penalty, yielding more stable and informative gradient signals. While this improves training stability to some extent, such methods often incur substantial computational overhead when handling high-dimensional features.
In the VAE-based line, VAEs [30] learn a probabilistic encoder ϕ ( z | x ) and decoder θ ( x | z ) , jointly optimized via the Evidence Lower Bound (ELBO): L = E q ϕ [ log p θ ( x | z ) ] KL ( q ϕ ( z | x ) p ( z ) ) , where the KL divergence term regularizes the latent space toward a standard Gaussian prior. In high-dimensional settings, this KL divergence often leads to over-smoothing, restricting the expressiveness of the latent space. The CADA-VAE model [31] introduces a dual-VAE architecture, maintaining separate encoders for visual features x and class semantics a, and enforcing alignment by minimizing the KL divergence between their respective latent distributions while applying cross-modal reconstruction. However, due to the limitations of its optimization objectives, the generated samples, while numerically close to real data distributions, still exhibit discrepancies at the fine-grained semantic level, making it difficult to achieve strict alignment between attribute descriptions and high-dimensional features [32].
Recently, diffusion-based generative methods [33] have also been explored for feature generation. Diffusion models define a forward process that gradually corrupts data x 0 into Gaussian noise over T steps via q ( x t | x t 1 ) = N ( x t ; 1 β t x t 1 , β t I ) , and learn a reverse denoising network p θ ( x t 1 | x t , a ) conditioned on class semantics a to recover clean features. The class semantic a is injected into the reverse network at each denoising step, typically via cross-attention or feature concatenation, steering the generation trajectory toward the target category. These models demonstrate promising potential for generating high-quality pseudo-features. However, their stability and efficiency in complex scenarios remain to be further validated.
Even when generation quality is improved, bias in the classification stage remains another independent challenge in GZSL. Under the GZSL setting, the test set contains both seen and unseen classes. Existing methods often exhibit severe prediction bias toward seen classes [15], leading to significant degradation in unseen class recognition performance. This issue arises because seen classes benefit from abundant real samples during training, resulting in more accurate prototype estimation, whereas unseen classes rely solely on synthesized pseudo-samples, creating an imbalance in the decision space. Dynamically adjusting decision boundaries according to the confusion between seen and unseen classes remains a critical unresolved problem.
The challenges of generation quality and classification bias are further amplified in the specific application scenario of IoT device identification. On one hand, IoT traffic data are characterized by high dimensionality, sparsity, subtle inter-class differences, and significant noise interference [4,12,13], which fundamentally differ from structured data such as natural images. This makes generative models more prone to instability and semantic deviation, exacerbating the issue of pseudo-sample quality. On the other hand, IoT networks continuously evolve with the introduction of new device types, where seen and unseen devices coexist over long periods. The bias toward seen classes directly impacts system usability and is more severe than in closed-set scenarios such as visual recognition. As a result, despite the extensive progress of ZSL in computer vision, its application to IoT device identification remains at an early stage.
Refs. [10,11] are two representative exploration of ZSL in IoT device identification. ZEST [10] adopts a VAE-based framework, integrating a self-attention mechanism for effective traffic feature extraction and leveraging a conditional VAE to synthesize pseudo-samples for unseen classes. Ref. [11] adopts a similar method, but adopts a GAN-based framework. These designs demonstrate the viability of generative zero-shot learning paradigms in IoT device identification. However, they still inherit limitations in its generative module: regarding generation quality, first, its single KL divergence constraint lacks targeted handling of mode collapse and is insufficient for capturing the multimodal structure of high-dimensional traffic features, which limits the authenticity and diversity of generated pseudo-samples; second, its distribution matching and semantic alignment design is rather basic, lacking a robust cross-modal alignment mechanism, leading to insufficient semantic consistency between the generated features and the target device identity. Moreover, in the face of a mixed real-world network environment, ZEST has not yet established an effective classification decision mechanism to mitigate seen-class bias. Its classification module is not specifically designed to address prediction bias under the GZSL setting, and the seen-class bias problem has not been effectively alleviated, resulting in limited performance in unseen-class recognition. How to achieve stable feature generation, precise semantic alignment, and unbiased classification decisions simultaneously in traffic data scenarios remains a core issue that needs to be addressed, which motivates this work.

3. The HALO Overview

In IoT device identification, let the training set contain samples only from seen classes Y s , while the test set includes both seen classes Y s and unseen classes Y u , where Y s Y u = . Each class is associated with a semantic attribute vector a A . Given an input network traffic sample x , the model aims to learn a mapping function f : x y that can correctly predict labels from the joint label space y Y s Y u under the GZSL setting. The core objective is to improve recognition performance on unseen classes using only seen-class training data, while mitigating prediction bias toward seen classes, thereby enhancing overall classification performance.
To achieve precise identification of both known and unseen IoT devices in complex and open network environments, and to fundamentally address feature distortion and seen-class bias inherent in GZSL, our work proposes HALO (Hierarchical Attribute-guided Learning with Offset Calibration), a GZSL framework for device recognition. As shown in Figure 1, HALO consists of three core modules, organized as feature extraction, conditional generation, and unbiased decision classification.
First, in the feature extraction stage, HALO adopts per-packet sequence modeling to capture fine-grained temporal behaviors of device communications. Raw network traffic, after removing sensitive identifiers that could lead to model shortcuts, is transformed into fixed-length packet sequences and mapped into unified input embeddings. These embeddings are then fed into a lightweight Transformer architecture, NetFormer. NetFormer introduces a globally learnable [CLS] token and aggregates the session-level global context efficiently via multi-head self-attention. NetFormer maps the extracted traffic representations into a unified latent space (L) to support both discriminative tasks and zero-shot feature generation, providing high-quality representations for subsequent modules.
Second, in the conditional generation stage, to compensate for the absence of real data for unseen classes under the GZSL setting, HALO designs a W-CVAE. This module learns a deep mapping between traffic features and device attributes to synthesize highly discriminative pseudo-features for unseen devices. Structurally, the encoder fuses seen-class features (L) with attribute vectors (A) and compresses them into a latent space, while the decoder reconstructs features conditioned on the attributes. To overcome common generative issues such as mode collapse and semantic misalignment, two core constraints are introduced in the latent space: (1) replacing the conventional KL divergence with multi-scale MMD to better match higher-order statistics and align distributions; (2) applying InfoNCE-based attribute-feature contrastive learning to enforce tight semantic binding between latent features and corresponding device attributes. With this structured and semantically consistent latent space, the model can generate large volumes of high-fidelity, diverse pseudo-features for unseen classes using only their semantic attributes and random noise.
Finally, in the prototype-based classification stage, to fully address the bias of conventional classifiers toward seen classes in mixed-device scenarios, HALO constructs a hybrid prototype decision mechanism with adaptive bias calibration. The system first builds hybrid prototypes: prototypes for seen classes are directly computed from real feature samples to preserve distribution purity, while unseen-class prototypes are computed from the abundant pseudo-samples generated by W-CVAE, ensuring reliable prototype estimation in the absence of real data. An adaptive bias calibration mechanism is then triggered, dynamically adjusting classification bias based on distances between unseen-class prototypes and their nearest seen-class prototypes in the feature space. Unseen classes that are easily confused with known devices are automatically assigned larger bias compensation. This mechanism dynamically expands decision boundaries for unseen classes, prioritizing recognition sensitivity for unknown devices and enabling accurate, unbiased classification decisions in complex traffic environments where known and unknown devices coexist.

4. The Design Details

4.1. Feature Extraction with NetFormer

To capture the fine-grained temporal dynamics of network traffic, we propose NetFormer, a Transformer-based architecture designed for per-packet sequence modeling. Unlike traditional flow-statistical methods, NetFormer processes raw packet sequences to learn discriminative and semantic representations simultaneously. The overall workflow of the feature extraction process is summarized in Algorithm 1.
Algorithm 1 NetFormer: training and feature extraction
  • Require: Traffic sessions S , Sequence length T, Encoder layers L.
  • Ensure: Trained NetFormer F , Latent features { I } , Semantic features { a x } .
1:
Phase 1: Pre-training
2:
while not converged do
3:
      Sample a batch of sessions { S } from seen classes.
4:
      Input Embedding:
5:
      for each packet p t S  do
6:
            Extract raw features x t (size, time, protocol, etc.).
7:
            Embed: e t = W e x t + b e .
8:
      end for
9:
      Add CLS token and Positional Encoding:
10:
     Z ( 0 ) = [ e cls ; e 1 + e 1 p o s ; ; e T + e T p o s ] .       ▹
11:
    Transformer Encoding:
12:
    for  l = 1 to L do
13:
           Z ˜ = MHSA ( LN ( Z ( l 1 ) ) ) + Z ( l 1 ) .     ▹
14:
           Z ( l ) = FFN ( LN ( Z ˜ ) ) + Z ˜ .          ▹
15:
    end for
16:
    Global Pooling:
17:
     h ¯ = AvgPool ( Z ( L ) ) .             ▹
18:
    Stream Mapping & Classification:
19:
     I = f L ( h ¯ ) .                 ▹
20:
     O = f A ( I ) .                 ▹
21:
     y ^ = Classifier ( O ) .
22:
    Update F via L CE ( y ^ , y t r u e ) .         ▹
23:
end while
24:
Phase 2: Feature Extraction
25:
Remove classification head; Freeze parameters.
26:
for each sample in dataset do
27:
      Forward pass to obtain Z ( L ) and h ¯ .
28:
      Compute I = f L ( h ¯ ) .
29:
      Compute a x = f A ( I ) .
30:
      Store ( I , a x ) .
31:
end for
32:
return Extracted features.
Given a traffic session represented as a sequence of packets S = { p 1 , , p T } , we first extract a raw feature vector x t for each packet, comprising dynamic behaviors (e.g., size, inter-arrival time) and static protocol features. These raw features are then projected into a high-dimensional hidden space via a linear layer and combined with learnable positional encodings to preserve sequential order. A learnable [CLS] token is prepended to the sequence to aggregate global information. The embedded sequence is fed into a stack of L Transformer encoder layers, where multi-head self-attention mechanisms capture long-range dependencies between packets. After encoding, we apply average pooling over all token outputs to obtain a compact global representation h ¯ , which serves as the unified feature of the traffic sample.
To serve the dual objectives of the HALO framework, NetFormer employs a stream mapping mechanism that projects the global representation h ¯ into two distinct latent spaces. Specifically, h ¯ is first mapped to a discriminative latent space via a dense layer f L ( · ) to obtain the feature I. This feature serves two purposes: it acts as the input for a standard Softmax classifier to perform device classification, and simultaneously, it is further projected into a semantic feature space via another dense layer f A ( · ) to yield the semantic embedding a x (i.e., a x = f A ( I ) ). During the pre-training phase, the model is optimized using cross-entropy loss on seen classes. In the inference phase (Phase 2), the final classification head is discarded, and NetFormer functions as a feature extractor that sequentially maps the global representation h ¯ to the latent feature I and subsequently to the semantic representation a x for downstream tasks.

4.2. Conditional Generation Module with W-CVAE

To mitigate the scarcity of unseen class samples in zero-shot learning, we propose the W-CVAE, a module designed to construct a structured and semantically aligned latent space. Let I s = { I 1 , I 2 , , I N } denote the set of discriminative traffic features extracted by the preceding NetFormer module for seen classes, and let A s = { a x 1 , a x 2 , , a x N } represent the corresponding set of semantic attribute vectors, where a x i is the attribute associated with feature I i . The overall workflow of the proposed generation framework is summarized in Algorithm 2. By learning a robust mapping between traffic features and semantic attributes, W-CVAE generates discriminative pseudo-feature samples, thereby providing substantial data support for unseen classes.
Algorithm 2 W-CVAE: training and generation
  • Require: Seen features I s , Attributes A s ; Unseen attributes A u .
  • Ensure: Generated pseudo-features P .
1:
Initialize Encoder E , Decoder D , Projectors f I , f A .
2:
while not converged do
3:
      Sample batch ( x , a ) ( I s , A s ) .
4:
       μ , σ E ( x , a ) .
5:
       z μ + σ ϵ , ϵ N ( 0 , 1 ) .
6:
       x ˜ tanh ( D ( z , a ) ) .
7:
       L r e c o n x ˜ x 2 2 .
8:
       L M M D MMD ( q ( z ) N ( 0 , 1 ) ) .
9:
       a x f A ( f I ( x ˜ ) ) .
10:
     L c o n log exp ( sim ( a x , a ) / τ ) a A exp ( sim ( a x , a ) / τ ) .
11:
     L t o t a l L r e c o n + λ MMD L M M D + λ con L c o n .
12:
    Update E , D via L t o t a l .
13:
end while
14:
P u .
15:
for each a u A u  do
16:
      Sample z N ( 0 , 1 ) .
17:
       x ˜ u tanh ( D ( z , a u ) ) .
18:
       P u P u { x ˜ u } .
19:
end for
20:
return  P u .

4.2.1. Architecture of Attribute-Conditioned VAE

The W-CVAE consists of an encoder and a decoder, with the overall process conditioned on class attribute vectors. In the encoding stage, the conditional encoder concatenates the feature vector extracted by NetFormer with its corresponding attribute vector a, and maps the concatenation to a latent space via an MLP, outputting the mean μ and log-variance log σ 2 of the distribution. To ensure differentiability and training stability, we adopt the reparameterization trick to sample the latent variable z.
In the decoding stage, the decoder takes the concatenation of the latent variable z and the attribute vector a as input to generate realistic and distribution-consistent feature samples. Notably, we apply a Tanh activation function at the output layer of the decoder. This design forces the generated feature values to be constrained within the interval [ 1 , 1 ] , consistent with the normalization range of the input features, thereby effectively preventing numerical divergence and improving the quality of generated samples.

4.2.2. Composite Objective Function

To enforce a well-structured latent space and semantic alignment, we design a composite loss function consisting of the following terms:
  • Reconstruction Loss. We use mean squared error (MSE) to measure the difference between the generated feature x ˜ and the real feature x, ensuring that the generated samples preserve the distributional characteristics of the original data:
    L recon = x ˜ x 2 2 .
  • Maximum Mean Discrepancy (MMD) Loss. To overcome the posterior collapse problem commonly associated with traditional KL divergence, we introduce MMD with multi-scale Gaussian kernels to constrain the distribution of the latent variable z to approximate a standard normal distribution. This ensures that during the testing phase, sampling z from the standard normal distribution and conditioning on unseen class attributes can decode valid pseudo-samples:
    L MMD = MMD ( q ( z ) N ( 0 , I ) ) .
  • Attribute-Feature Contrastive Loss. To bridge the heterogeneity gap between the feature space and the semantic attribute space, we adopt the InfoNCE contrastive loss. By maximizing the mutual information between the projected feature vector and its corresponding projected attribute vector, the model learns a consistent attribute-feature representation, significantly improving generalization to unseen classes:
    L contrast = log exp ( sim ( a x , a ) / τ ) a A exp ( sim ( a x , a ) / τ ) ,
    where sim ( · , · ) denotes cosine similarity and τ is a temperature parameter.
The total loss for the W-CVAE is
L total = L recon + λ MMD L MMD + λ con L con ,
where λ MMD and λ contrast are hyperparameters introduced to balance the contributions of the respective loss terms. In our implementation, we empirically set λ MMD = 10 and λ con = 0.1 . A comprehensive sensitivity analysis regarding these parameters is provided in the Evaluation section (Section 5.2.4) to justify these choices.

4.2.3. Pseudo-Sample Generation

After the training phase, the W-CVAE is used for data augmentation. For each unseen class, we randomly sample latent vectors z from the standard normal distribution, condition on the semantic attribute vector of that class, and generate a large number of pseudo-feature samples via the decoder. These generated samples, together with the real samples of seen classes, form a mixed training set that provides sufficient data support for the subsequent prototype classification module.

4.3. Hybrid Prototype Classification with Adaptive Bias Calibration

The hybrid prototype classifier and its adaptive bias calibration are built directly upon the outputs of NetFormer and W-CVAE. NetFormer maps raw traffic sessions into a discriminative latent space, providing the feature vectors I from which all seen-class prototypes are computed. The W-CVAE then generates pseudo-feature samples for unseen classes conditioned on their semantic attribute vectors, enabling the construction of reliable unseen-class prototypes. The adaptive bias exploits the geometric relationship between these two sets of prototypes: it measures the minimum distance from each unseen prototype to its nearest seen prototype, and assigns a larger calibration bonus to those unseen classes that are semantically close to seen ones and therefore most prone to misclassification. This design fundamentally relies on the representation quality of NetFormer and the generation fidelity of W-CVAE, forming a tightly coupled three-stage pipeline.
  • Hybrid Prototype Construction
For seen classes, prototypes are computed as the cluster centers of real samples only, avoiding contamination by generated noise. For unseen classes, prototypes are computed as the cluster centers of the large number of pseudo-samples generated by the W-CVAE, providing sufficient statistical support.
  • Adaptive Bias Calibration
The classification bias is dynamically adjusted according to the distance between an unseen class prototype and its nearest seen class prototype. The closer the distance (i.e., the higher the risk of confusion), the larger the bias correction, prioritizing the recognition sensitivity of unseen classes and balancing the bias problem in GZSL. The calibrated logit for class c is
y ^ c = Softmax sim ( I , p c ) τ c + γ c ,
where the adaptive bias γ c is defined as
γ c = 0 , if c is seen , λ · exp d c σ , if c is unseen ,
with d c being the distance from the unseen class prototype to the nearest seen class prototype, and λ , σ hyperparameters. This mechanism effectively mitigates the classification bias problem in GZSL, ensuring that unseen classes are not overwhelmed by seen classes.

5. Evaluation

5.1. Experimental Setup

In this section, we present a comprehensive experimental comparison between HALO and existing representative methods. The experimental platform used in this study has the following specifications: 25 vCPU Intel(R) Xeon(R) Platinum 8470Q, 90 GB DRAM, and one NVIDIA RTX 5090 (32 GB VRAM). The software environment consists of Ubuntu 22.04, Python 3.12, CUDA 12.8, and PyTorch 2.7.0. The Adam optimizer is employed for model training, with an initial learning rate of 5 × 10−4 and a weight decay coefficient of 1 × 10−5. The maximum number of training epochs is set to 50, and the batch size is 256. To prevent overfitting, an early stopping mechanism is adopted during training.
Evaluation Metrics. To thoroughly evaluate model performance, we conduct experiments under two classic zero-shot learning settings: (1) ZSL (zero-shot learning), where the model is tested exclusively on unseen classes to assess its generalization to novel concepts; (2) GZSL (generalized zero-shot learning), where the test set contains both seen and unseen classes, reflecting real-world scenarios. Under the ZSL setting, we report unseen class accuracy. Under the GZSL setting, we adopt three metrics: accuracy on seen classes (S), accuracy on unseen classes (U), and their harmonic mean (H), defined as H = 2 × S × U S + U , which provides a balanced measure of model performance across both class types.
Datasets. Experiments are conducted on the public UNSW dataset [4], which contains network traffic data (pcap format) collected over 20 consecutive days from real-world consumer IoT devices, covering 30 device types. To mitigate class imbalance, device categories with fewer than 10,000 samples are removed. For the remaining devices, 20% are randomly selected as unseen classes and the remaining 80% as seen classes, forming the required splits for ZSL and GZSL settings. At present, our evaluation focuses exclusively on the UNSW dataset, as it is the only publicly available dataset providing the requisite device diversity, standardized feature representations, and device-level labels necessary for ZSL and GZSL partitioning.
Baseline. To evaluate the performance of HALO, we compare it against three representative generative ZSL methods and one classical few-shot learning approach. For a fair comparison, all baselines utilize the same feature extractor as HALO:
1.
ZEST [10]: A pioneering and complete ZSL framework specifically designed for IoT device identification. It employs a Conditional Variational Autoencoder (CVAE) to map semantic attribute vectors into the feature space for pseudo-sample synthesis. We treat it as the state of the art.
2.
Diff-K: In this variant, we replace the generative part of HALO with a conditional diffusion model [33] currently used in the ZSL field, which generates features via a denoising network conditioned on attribute vectors.
3.
WGAN-GP: In this variant, we replace the generative part of our method with a Wasserstein GAN with gradient penalty [28] currently used in the ZSL field, where the generator produces features conditioned on noise and attributes.
4.
ProNet [34]: A classical few-shot method that learns a metric space through episodic training on seen classes. Each class is represented by its prototype (the mean embedding of support samples), and classification follows the nearest prototype in Euclidean distance. During testing, for each k-shot scenario ( k { 1 , 5 , 10 } ), k unseen support samples are randomly drawn to compute unseen prototypes, while seen prototypes are obtained from all seen training embeddings.

5.2. Experimental Results

5.2.1. Comparison with Baselines

Table 1 presents the performance comparison zero-shot learning (ZSL) baselines under both ZSL and GZSL settings. HALO achieves the highest scores across all metrics. Under ZSL, it attains 0.9757 unseen class accuracy, substantially outperforming the best baseline (WGAN-GP, 0.8151). Under GZSL, HALO reaches 0.9866 on seen classes, 0.8430 on unseen classes, and 0.9091 harmonic mean, demonstrating superior balance between seen and unseen categories.
The lower unseen class accuracy under GZSL compared to ZSL is expected, as the mixed test set contains both seen and unseen samples, and feature similarity may cause misclassification. Nevertheless, HALO maintains the best overall performance, indicating strong discriminative power and class separability. ZEST, despite near-perfect seen class accuracy, suffers from severe domain shift (low U and H), showing a tendency to over-predict seen classes.
In addition, we compare the efficiency of each method (see Figure 2). The reported times include three components: model training, pseudo-sample generation, and final classification inference. As shown, WGAN-GP and Diff-K require substantially longer times, whereas HALO and ZEST are comparably more efficient. Specifically, ZEST achieves the lowest overall time (1× baseline), followed by HALO (1.9×), while Diff-K (5.4×) and WGAN-GP (10.9×) are considerably slower. The high cost of WGAN-GP stems from its gradient penalty computation and the need for many critic iterations per generator update. Diff-K’s overhead is mainly due to the kernel matrix operations involved in its diffusion-like process. In contrast, ZEST benefits from a lightweight architecture and fast sampling. Although HALO is slightly less efficient than ZEST, it achieves significantly better classification performance.
To further evaluate HALO against a few-shot baseline, we compare it with Prototypical Networks (ProtoNet) [34] under 1-, 5-, and 10-shot settings. As shown in Table 2, ProtoNet’s unseen-class accuracy (U) and harmonic mean (H) consistently improve as more labeled support samples become available, reaching 0.8259 in U and 0.9001 in H at the 10-shot setting. Notably, even without using any labeled unseen-class samples, HALO achieves 0.8430 in U and 0.9091 in H under the GZSL setting (as shown in Table 1), surpassing ProNet’s best few-shot performance. These results demonstrate that the semantic–visual alignment learned by HALO yields highly transferable representations and strong discriminative capability, enabling it to compete favorably with methods that explicitly rely on labeled unseen data.

5.2.2. Comparison of Feature Extractors

To evaluate the effectiveness and efficiency of different feature extraction architectures, we conducted a supervised learning experiment comparing the proposed NetFormer with two representative feature extractors: a Bi-LSTM and a CNN-based encoder. All models were trained on the same labeled dataset under identical conditions (e.g., optimizer, learning rate, batch size, and number of epochs). We report two types of metrics: (1) classification accuracy (AC) and F1 score to assess effectiveness, and (2) inference time per sample and number of parameters to assess efficiency.
As shown in Table 3, NetFormer achieves the highest accuracy (98.91%) and F1 score (98.87%) among all compared methods, while maintaining competitive inference time (0.0130 ms) and a compact parameter count (0.12M). In contrast, Bi-LSTM yields slightly lower accuracy (98.05%) and F1 (97.99%), and the CNN-based encoder, though faster in inference (0.0112 ms) and smaller in size (0.08M), lags behind in both accuracy and F1 score. These results demonstrate that NetFormer strikes a favorable balance between discriminative capability and computational cost.

5.2.3. Ablation Study

We design five variants to evaluate the contribution of each component in HALO:
(a)
NetFormer only: Directly test the NetFormer trained on a closed set on an open set containing unseen classes.
(b)
Bi-LSTM replacement: Replace NetFormer with Bi-LSTM as the feature extractor.
(c)
Remove MMD and contrastive losses: Omit both losses from the generation module.
(d)
Remove bias calibration: Disable the bias calibration mechanism in the hybrid prototype classifier.
(e)
Replace hybrid prototype with MLP/SVM: Substitute the hybrid prototype classifier with a standard MLP or SVM.
As shown in Figure 3, the complete HALO model achieves the highest accuracy (96.70%) on the GZSL task, significantly outperforming all variants. The largest drop occurs when using only NetFormer without zero-shot learning (62.83%), which is about 34 percentage points lower than the full model. This confirms that zero-shot learning is essential for generalizing to unseen categories. Replacing NetFormer with Bi-LSTM also degrades performance, validating the effectiveness of NetFormer for feature modeling. Removing MMD/contrastive losses or bias calibration reduces accuracy, demonstrating their positive contributions. Using an MLP or SVM instead of the hybrid prototype classifier leads to inferior results, highlighting the importance of the proposed classification structure.

5.2.4. Sensitivity Analysis

To investigate the impact of different hyperparameter combinations on final model performance, we conducted a grid search on the validation set, analyzing how the distribution alignment weight λ m m d and the contrastive loss weight λ c o n affect the GZSL overall accuracy. The results, visualized as a heatmap with λ c o n on the x-axis and λ m m d on the y-axis (Figure 4), reveal several key insights. The optimal configuration (highlighted by a red box) yields a peak overall accuracy of 97.70% at λ m m d = 5 and λ c o n = 0.5 , indicating that a more balanced weight assignment outperforms our previous setting ( λ m m d = 10 , λ c o n = 0.1 ). The model further demonstrates strong robustness: a large dark blue region shows that accuracy stays above 0.97 over a wide range, specifically λ m m d [ 5 , 50 ] and λ c o n [ 0.01 , 5 ] , meaning the method is not overly sensitive to hyperparameter choices within this reasonable interval. In contrast, a significant performance drop occurs when λ m m d is too small (e.g., 0.1 or 1), regardless of the value of λ c o n , which validates the necessity of the MMD loss for effective distribution alignment and confirms that insufficient weight leads to suboptimal feature alignment between source and target domains.

5.2.5. Visualization with t-SNE

We apply t-SNE to visualize feature embeddings under the GZSL setting. Four seen classes and two unseen classes are selected for clarity. The results (Figure 5) show that HALO generates features with high diversity and does not overfit to seen classes. For comparison, ground-truth samples of unseen classes are also plotted.

6. Discussion

Vulnerability to Attribute Poisoning. In practical smart-grid deployments, the semantic attribute vectors that HALO relies upon to describe unseen devices must be sourced from diverse third-party vendors or network operators. This cross-vendor operational pipeline inherently introduces trust and security challenges. While HALO demonstrates high efficacy in identifying evolving devices under normal conditions, its reliance on these external semantic descriptions creates a potential attack surface for adversarial attribute poisoning. Specifically, malicious actors could inject misleading attribute vectors to intentionally cause misclassification or mask unauthorized devices. Currently, our framework assumes benign attribute inputs. In future work, we plan to investigate secure operational pipelines for attribute acquisition and maintenance—potentially integrating verifiable vendor signatures or robust anomaly detection mechanisms—to ensure the integrity of the semantic space against such malicious injections.
Performance on Encrypted Payloads. In modern UEIoT environments, stringent security protocols mandate traffic encryption, rendering traditional Deep Packet Inspection (DPI) ineffective. While our empirical evaluation utilizes the UNSW dataset, HALO is well-suited for practical deployment. Because NetFormer relies exclusively on packet-level side-channel features—such as packet size, inter-arrival time, and direction—rather than payload contents, its feature extraction capabilities remain fully viable even when payloads are encrypted. Because these statistical patterns remain largely intact post-encryption, extensive recent literature [35,36,37] in encrypted traffic analysis demonstrates their high efficacy for device fingerprinting. Consequently, we anticipate that our sequence model will transfer reasonably well to modern encrypted UEIoT scenarios.
Vulnerability to Adversarial Evasion. The transition to statistical feature analysis, however, introduces potential vulnerabilities to adversarial manipulation. Malicious actors may employ traffic-shaping techniques, such as packet padding or deliberate timing delays, to obscure dynamic behaviors and evade identification. While complete obfuscation is generally cost-prohibitive for resource-constrained IoT devices and may trigger standard anomaly detection alerts, defending against sophisticated adversarial evasion remains an open challenge. Future work will investigate adversarial training and robust feature calibration to enhance the model’s resilience against such traffic manipulation.
Operational Impact in Zero-Trust Environments. In critical smart-grid applications, the misclassification of a benign, unseen device can lead to unwarranted access-control disruptions, potentially compromising synergetic grid control. Within a zero-trust architecture, HALO is intended to function as an intelligent preliminary identification layer rather than an autonomous, unilateral blocking system. To mitigate the operational impact of classification bias on legitimate but unrecognized devices, HALO’s predictive outputs should be integrated with secondary verification mechanisms. Devices yielding low-confidence predictions or exhibiting entirely novel feature distributions can be flagged for step-up authentication—such as cryptographic challenge-responses or temporary isolation in a behavioral sandbox—rather than being immediately disconnected from the grid. By utilizing the framework for probabilistic triage, grid operators can maintain rigorous security without sacrificing operational reliability. Future iterations of this work will explore open-set recognition equipped with confidence-calibrated decision thresholds to systematically manage the identification of novel benign terminals.
Hardware Constraints in Edge Deployment. While HALO provides robust GZSL performance, deploying the NetFormer backbone directly onto field-level power-sensing terminals introduces practical hardware challenges. Because the current framework prioritizes identification accuracy and domain alignment, it is not yet optimized for the strict memory footprints and power-consumption limits inherent to resource-constrained IoT edge devices. Deploying complex Transformer-based architectures in these environments requires careful balancing of computational overhead and predictive performance. Future work will investigate model compression techniques, such as knowledge distillation and quantization, alongside federated learning paradigms, to achieve highly efficient, power-aware on-device adaptation suitable for widespread smart-grid deployment.

7. Conclusions

This paper presents a generalized zero-shot learning method to address the challenge of generalizing to unseen classes in network device identification (especially IoT devices). Unlike traditional ZSL methods that are directly transferred from the vision domain, HALO introduces NetFormer to extract discriminative features. Furthermore, HALO uses a Weighted Conditional Variational Autoencoder based on multi-scale Maximum Mean Discrepancy (MMD) and attribute–feature contrastive learning, which alleviates mode collapse in generative models and achieves deep alignment between the feature space and semantic attributes. In addition, a hybrid prototype construction and an adaptive bias calibration mechanism are introduced to effectively balance the recognition confidence between seen and unseen classes, thereby mitigating the classification bias problem in generalized zero-shot recognition. Experiments on the UNSW dataset, comparing with existing ZSL methods, demonstrate that HALO efficiently recognizes unseen classes. In the future, we plan to collect additional datasets to comprehensively study the cross-dataset generalization capabilities of HALO. Furthermore, we aim to explore highly efficient implementations of HALO on edge devices to evaluate its practical applicability and scalability within real-world power grid environments.

Author Contributions

Z.W.: Conceptualization, Methodology, Resources. M.J.: Conceptualization, Resources, Project administration. Z.T.: Methodology, Software, Validation, Investigation, Data Curation, Visualization. D.C.: Software, Validation, Investigation, Data Curation, Visualization, Writing—original draft preparation. X.W.: Supervision, Resources, Supervision, Project administration. L.Y.: Supervision, Formal analysis, Investigation, Writing—review and editing, Supervision. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by the Science and Technology Project of State Grid Corporation of China: Research on Key Technologies and Equipment Development for Cybersecurity Protection of Power Monitoring Systems under the New Situation (Grant No. 5700-202417382A-3-2-ZX).

Data Availability Statement

The data presented in this study are available in the respective public repositories. These data are derived from the following resources available in the public domain: UNSW dataset: https://iotanalytics.unsw.edu.au/iottraces.html (accessed on 23 March 2026).

Conflicts of Interest

Authors (Zhihua Wang and Minghui Jin) are employed by the State Grid Shanghai Electric Power Company, Shanghai, China. Author (Xinsheng Wei) is employed by the State Grid Electric Power Research Institute Co., Ltd., Nanjing, China. The authors declare that this study received funding partially from the Science and Technology Project of State Grid Corporation of China. The funder was not involved in the study design, collection, analysis, interpretation of data, the writing of this article or the decision to submit it for publication.

References

  1. Antonakakis, M.; April, T.; Bailey, M.D.; Bernhard, M.; Bursztein, E.; Cochran, J.; Durumeric, Z.; Halderman, J.A.; Invernizzi, L.; Kallitsis, M.; et al. Understanding the Mirai Botnet. In Proceedings of the 26th USENIX Security Symposium, USENIX Security 2017, Vancouver, BC, Canada, 16–18 August 2017; Kirda, E., Ristenpart, T., Eds.; USENIX Association: Berkeley, CA, USA, 2017; pp. 1093–1110. [Google Scholar]
  2. Herwig, S.; Harvey, K.; Hughey, G.; Roberts, R.; Levin, D. Measurement and Analysis of Hajime, a Peer-to-peer IoT Botnet. In Proceedings of the 26th Annual Network and Distributed System Security Symposium, NDSS 2019, San Diego, CA, USA, 24–27 February 2019; The Internet Society: Reston, VA, USA, 2019. [Google Scholar]
  3. Chowdhury, R.R.; Che-Idris, A.; Abas, P.E. A Deep Learning Approach for Classifying Network Connected IoT Devices Using Communication Traffic Characteristics. J. Netw. Syst. Manag. 2023, 31, 26. [Google Scholar] [CrossRef]
  4. Sivanathan, A.; Gharakheili, H.H.; Loi, F.; Radford, A.; Wijenayake, C.; Vishwanath, A.; Sivaraman, V. Classifying IoT Devices in Smart Environments Using Network Traffic Characteristics. IEEE Trans. Mob. Comput. 2019, 18, 1745–1759. [Google Scholar] [CrossRef]
  5. Martín, M.L.; Carro, B.; Sánchez-Esguevillas, A.; Lloret, J. Network Traffic Classifier with Convolutional and Recurrent Neural Networks for Internet of Things. IEEE Access 2017, 5, 18042–18050. [Google Scholar] [CrossRef]
  6. Luo, Y.; Chen, X.; Ge, N.; Feng, W.; Lu, J. Transformer-Based Device-Type Identification in Heterogeneous IoT Traffic. IEEE Internet Things J. 2023, 10, 5050–5062. [Google Scholar] [CrossRef]
  7. Hendrycks, D.; Gimpel, K. A Baseline for Detecting Misclassified and Out-of-Distribution Examples in Neural Networks. In Proceedings of the 5th International Conference on Learning Representations, ICLR 2017, Toulon, France, 24–26 April 2017. Conference Track Proceedings. [Google Scholar]
  8. Ortiz, J.; Crawford, C.H.; Le, F. DeviceMien: Network device behavior modeling for identifying unknown IoT devices. In Proceedings of the International Conference on Internet of Things Design and Implementation, IoTDI 2019, Montreal, QC, Canada, 15–18 April 2019; Landsiedel, O., Nahrstedt, K., Eds.; ACM: New York, NY, USA, 2019; pp. 106–117. [Google Scholar] [CrossRef]
  9. Xian, Y.; Lampert, C.H.; Schiele, B.; Akata, Z. Zero-Shot Learning—A Comprehensive Evaluation of the Good, the Bad and the Ugly. IEEE Trans. Pattern Anal. Mach. Intell. 2019, 41, 2251–2265. [Google Scholar] [CrossRef] [PubMed]
  10. Wu, B.; Gysel, P.; Divakaran, D.M.; Gurusamy, M. ZEST: Attention-based Zero-Shot Learning for Unseen IoT Device Classification. In Proceedings of the NOMS 2024 IEEE Network Operations and Management Symposium, Seoul, Republic of Korea, 6–10 May 2024; IEEE: New York, NY, USA, 2024; pp. 1–9. [Google Scholar] [CrossRef]
  11. Kim, T.; Oh, D.H.; Lee, D.; Kim, S.; Choi, S.; Lee, S.; Kim, T. A Framework for ZSL-based Asset Identification using Multi-modal Data. In Proceedings of the 3rd International Conference on Foundation and Large Language Models, FLLM 2025, Vienna, Austria, 25–28 November 2025; IEEE: New York, NY, USA, 2025; pp. 600–605. [Google Scholar] [CrossRef]
  12. Miettinen, M.; Marchal, S.; Hafeez, I.; Asokan, N.; Sadeghi, A.; Tarkoma, S. IoT SENTINEL: Automated Device-Type Identification for Security Enforcement in IoT. In Proceedings of the 37th IEEE International Conference on Distributed Computing Systems, ICDCS 2017, Atlanta, GA, USA, 5–8 June 2017; Lee, K., Liu, L., Eds.; IEEE Computer Society: New York, NY, USA, 2017; pp. 2177–2184. [Google Scholar] [CrossRef]
  13. Liu, C.; He, L.; Xiong, G.; Cao, Z.; Li, Z. FS-Net: A Flow Sequence Network For Encrypted Traffic Classification. In Proceedings of the 2019 IEEE Conference on Computer Communications, INFOCOM 2019, Paris, France, 29 April–2 May 2019; IEEE: New York, NY, USA, 2019; pp. 1171–1179. [Google Scholar] [CrossRef]
  14. Lucas, J.; Tucker, G.; Grosse, R.B.; Norouzi, M. Understanding Posterior Collapse in Generative Latent Variable Models. In Proceedings of the Deep Generative Models for Highly Structured Data, ICLR 2019 Workshop, New Orleans, LA, USA, 6 May 2019. [Google Scholar]
  15. Chao, W.; Changpinyo, S.; Gong, B.; Sha, F. An Empirical Study and Analysis of Generalized Zero-Shot Learning for Object Recognition in the Wild. In Proceedings of the Computer Vision-ECCV 2016-14th European Conference, Amsterdam, The Netherlands, 11–14 October 2016; Leibe, B., Matas, J., Sebe, N., Welling, M., Eds.; Proceedings, Part II; Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 2016; pp. 52–68. [Google Scholar] [CrossRef]
  16. Wynne, G.; Duncan, A.B. A Kernel Two-Sample Test for Functional Data. J. Mach. Learn. Res. 2022, 23, 1–51. [Google Scholar]
  17. van den Oord, A.; Li, Y.; Vinyals, O. Representation Learning with Contrastive Predictive Coding. arXiv 2018, arXiv:1807.03748. [Google Scholar]
  18. Meidan, Y.; Bohadana, M.; Shabtai, A.; Guarnizo, J.D.; Ochoa, M.; Tippenhauer, N.O.; Elovici, Y. ProfilIoT: A machine learning approach for IoT device identification based on network traffic analysis. In Proceedings of the Symposium on Applied Computing, SAC 2017, Marrakech, Morocco, 3–7 April 2017; Seffah, A., Penzenstadler, B., Alves, C., Peng, X., Eds.; ACM: New York, NY, USA, 2017; pp. 506–509. [Google Scholar] [CrossRef]
  19. Aneja, S.; Aneja, N.; Islam, M.S. IoT Device Fingerprint using Deep Learning. In Proceedings of the IEEE International Conference on Internet of Things and Intelligence System, IOTAIS 2018, Bali, Indonesia, 1–3 November 2018; IEEE: New York, NY, USA, 2018; pp. 174–179. [Google Scholar] [CrossRef]
  20. Sharma, H.; Kumar, P.; Sharma, K. Identification of Device Type Using Transformers in Heterogeneous Internet of Things Traffic; Springer: Berlin/Heidelberg, Germany, 2023; pp. 471–481. [Google Scholar] [CrossRef]
  21. Wang, X.; Wang, Y.; Lai, Y.; Hao, Z.; Liu, A.X. Reliable Open-Set Network Traffic Classification. IEEE Trans. Inf. Forensics Secur. 2025, 20, 2313–2328. [Google Scholar] [CrossRef]
  22. Yang, Q.; He, W.; Chen, M.; Du, H.; Shao, S.; Wu, F.; Liu, S.; Ji, Y.; Ren, K. End-to-End Open-Set Semi-Supervised Learning for Fine-Grained Encrypted Traffic Classification. IEEE Trans. Inf. Forensics Secur. 2026, 21, 1347–1362. [Google Scholar] [CrossRef]
  23. Frome, A.; Corrado, G.S.; Shlens, J.; Bengio, S.; Dean, J.; Ranzato, M.; Mikolov, T. DeViSE: A Deep Visual-Semantic Embedding Model. In Proceedings of the Advances in Neural Information Processing Systems 26: 27th Annual Conference on Neural Information Processing Systems 2013, Lake Tahoe, NV, USA, 5–8 December 2013; Burges, C.J.C., Bottou, L., Ghahramani, Z., Weinberger, K.Q., Eds.; ACM: New York, NY, USA, 2013; pp. 2121–2129. [Google Scholar]
  24. Akata, Z.; Reed, S.E.; Walter, D.; Lee, H.; Schiele, B. Evaluation of output embeddings for fine-grained image classification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2015, Boston, MA, USA, 7–12 June 2015; IEEE Computer Society: Washington, DC, USA, 2015; pp. 2927–2936. [Google Scholar] [CrossRef]
  25. Radovanovic, M.; Nanopoulos, A.; Ivanovic, M. Hubs in Space: Popular Nearest Neighbors in High-Dimensional Data. J. Mach. Learn. Res. 2010, 11, 2487–2531. [Google Scholar]
  26. Fu, Y.; Hospedales, T.M.; Xiang, T.; Gong, S. Transductive Multi-View Zero-Shot Learning. IEEE Trans. Pattern Anal. Mach. Intell. 2015, 37, 2332–2345. [Google Scholar] [CrossRef] [PubMed]
  27. Mirza, M.; Osindero, S. Conditional Generative Adversarial Nets. arXiv 2014, arXiv:1411.1784. [Google Scholar] [CrossRef]
  28. Gulrajani, I.; Ahmed, F.; Arjovsky, M.; Dumoulin, V.; Courville, A.C. Improved Training of Wasserstein GANs. In Proceedings of the Advances in Neural Information Processing Systems 30: Annual Conference on Neural Information Processing Systems 2017, Long Beach, CA, USA, 4–9 December 2017; Guyon, I., von Luxburg, U., Bengio, S., Wallach, H.M., Fergus, R., Vishwanathan, S.V.N., Garnett, R., Eds.; ACM: New York, NY, USA, 2017; pp. 5767–5777. [Google Scholar]
  29. Mu, Z.; Shi, X.; Dogan, S. GMA-SAWGAN-GP: A Novel Data Generative Framework to Enhance IDS Detection Performance. arXiv 2026, arXiv:2603.28838. [Google Scholar]
  30. Kingma, D.P.; Welling, M. Auto-Encoding Variational Bayes. In Proceedings of the International Conference on Learning Representations (ICLR), Banff, AB, Canada, 14–16 April 2014. [Google Scholar]
  31. Schönfeld, E.; Ebrahimi, S.; Sinha, S.; Darrell, T.; Akata, Z. Generalized Zero- and Few-Shot Learning via Aligned Variational Autoencoders. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2019, Long Beach, CA, USA, 16–20 June 2019; IEEE: New York, NY, USA, 2019; pp. 8247–8255. [Google Scholar] [CrossRef]
  32. Chen, S.; Wang, W.; Xia, B.; Peng, Q.; You, X.; Zheng, F.; Shao, L. FREE: Feature Refinement for Generalized Zero-Shot Learning. In Proceedings of the 2021 IEEE/CVF International Conference on Computer Vision, ICCV 2021, Montreal, QC, Canada, 10–17 October 2021; IEEE: New York, NY, USA, 2021; pp. 122–131. [Google Scholar] [CrossRef]
  33. Ye, Z.; Gowda, S.N.; Chen, S.; Huang, X.; Xu, H.; Khan, F.S.; Jin, Y.; Huang, K.; Jin, X. ZeroDiff: Solidified Visual-semantic Correlation in Zero-Shot Learning. In Proceedings of the Thirteenth International Conference on Learning Representations, ICLR 2025, Singapore, 24–28 April 2025. [Google Scholar]
  34. Snell, J.; Swersky, K.; Zemel, R. Prototypical Networks for Few-shot Learning. In Proceedings of the Advances in Neural Information Processing Systems 30 (NeurIPS 2017), Long Beach, CA, USA, 4–9 December 2017; Curran Associates, Inc.: Red Hook, NY, USA, 2017. [Google Scholar]
  35. Dai, J.; Xu, X.; Gao, H.; Wang, X.; Xiao, F. SHAPE: A Simultaneous Header and Payload Encoding Model for Encrypted Traffic Classification. IEEE Trans. Netw. Serv. Manag. 2023, 20, 1993–2012. [Google Scholar] [CrossRef]
  36. Zhou, G.; Guo, X.; Liu, Z.; Li, T.; Li, Q.; Xu, K. TrafficFormer: An Efficient Pre-trained Model for Traffic Data. In Proceedings of the 2025 IEEE Symposium on Security and Privacy (SP), San Francisco, CA, USA, 12–15 May 2025; pp. 1844–1860. [Google Scholar] [CrossRef]
  37. Peng, L.; Xie, X.; Huang, S.; Wang, Z.; Cui, Y. Ptu: Pre-Trained Model for Network Traffic Understanding. In Proceedings of the 2024 IEEE 32nd International Conference on Network Protocols (ICNP), Charleroi, Belgium, 28–31 October 2024; pp. 1–12. [Google Scholar] [CrossRef]
Figure 1. HALO architecture and workflow overview.
Figure 1. HALO architecture and workflow overview.
Electronics 15 02320 g001
Figure 2. Comparison of total runtime for HALO, ZEST, Diff-K, and WGAN-GP.
Figure 2. Comparison of total runtime for HALO, ZEST, Diff-K, and WGAN-GP.
Electronics 15 02320 g002
Figure 3. Ablation study results: accuracy of different variants on the GZSL task.
Figure 3. Ablation study results: accuracy of different variants on the GZSL task.
Electronics 15 02320 g003
Figure 4. Hyperparameter sensitivity analysis of λ m m d and λ c o n on GZSL overall accuracy.
Figure 4. Hyperparameter sensitivity analysis of λ m m d and λ c o n on GZSL overall accuracy.
Electronics 15 02320 g004
Figure 5. t-SNE visualization of feature embeddings (seen and unseen classes).
Figure 5. t-SNE visualization of feature embeddings (seen and unseen classes).
Electronics 15 02320 g005
Table 1. Comparison with zero-shot learning (ZSL) baseline methods under ZSL and generalized zero-shot learning (GZSL) settings.
Table 1. Comparison with zero-shot learning (ZSL) baseline methods under ZSL and generalized zero-shot learning (GZSL) settings.
MethodZSL-AccGZSL-SGZSL-UGZSL-H
HALO0.97570.98660.84300.9091
ZEST0.80890.99720.70820.8282
DIFF-K0.78910.96240.78870.8669
WGAN-GP0.81510.96160.79960.8732
Table 2. Performance of the few-shot baseline (ProNet).
Table 2. Performance of the few-shot baseline (ProNet).
ShotsZSL-AccGZSL-SGZSL-UGZSL-H
1-shot0.97560.99240.70640.8253
5-shot0.97670.98350.82310.8962
10-shot0.98280.98900.82590.9001
Table 3. Performance comparison of different feature extractors under supervised learning.
Table 3. Performance comparison of different feature extractors under supervised learning.
Feature ExtractorAC (%)F1 (%)Inference Time (ms)Params (M)
Bi-LSTM98.0597.990.01500.16
CNN-based96.3696.260.01120.08
NetFormer (ours)98.9198.870.01300.12
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Wang, Z.; Jin, M.; Tang, Z.; Chen, D.; Wei, X.; You, L. Generalized Zero-Shot Learning for Evolving Network Device Identification. Electronics 2026, 15, 2320. https://doi.org/10.3390/electronics15112320

AMA Style

Wang Z, Jin M, Tang Z, Chen D, Wei X, You L. Generalized Zero-Shot Learning for Evolving Network Device Identification. Electronics. 2026; 15(11):2320. https://doi.org/10.3390/electronics15112320

Chicago/Turabian Style

Wang, Zhihua, Minghui Jin, Zhenyu Tang, Duo Chen, Xingshen Wei, and Lizhao You. 2026. "Generalized Zero-Shot Learning for Evolving Network Device Identification" Electronics 15, no. 11: 2320. https://doi.org/10.3390/electronics15112320

APA Style

Wang, Z., Jin, M., Tang, Z., Chen, D., Wei, X., & You, L. (2026). Generalized Zero-Shot Learning for Evolving Network Device Identification. Electronics, 15(11), 2320. https://doi.org/10.3390/electronics15112320

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop