Next Article in Journal
Physical Match Performance of Professional Men’s Football Players from Different Competitive Levels During Direct Competition
Previous Article in Journal
Nano–Micronutrients of Iron and Copper for Improved Human Nutrition: A Narrative Review
Previous Article in Special Issue
Classification of Multiple Partial Discharge Sources Using Time-Frequency Analysis and Deep Learning
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Classification and Recognition of Ultra-High-Frequency Partial Discharge Signals in Transformers Based on AHAFN

1
College of Electronic and Information Engineering, Lanzhou Jiaotong University, Lanzhou 730070, China
2
Institute of Digital Signal Processing and Software Defined Radio, Lanzhou Jiaotong University, Lanzhou 730070, China
*
Author to whom correspondence should be addressed.
Appl. Sci. 2026, 16(3), 1479; https://doi.org/10.3390/app16031479
Submission received: 25 December 2025 / Revised: 27 January 2026 / Accepted: 30 January 2026 / Published: 2 February 2026

Abstract

Insulation defects are the main cause of transformer faults, and the partial discharge phenomenon generated by defects under high-voltage excitation can reflect the internal characteristics of the defects. Therefore, studying the characteristics of partial discharge signals can provide an important basis for the analysis of transformer partial discharge problems. This article proposes a transformer partial discharge ultra-high-frequency signal classification and recognition method based on the Adaptive Hybrid Attention Fusion Network. The feature extraction of partial discharge waveform is carried out through a dual flow network structure, where the ResNet branch focuses on extracting local features and the Swin Transformer branch focuses on extracting global features. Then, a new Adaptive Hybrid Attention Fusion Network fusion model is used to weight the extracted features according to adaptive allocation weights, ultimately achieving the classification and recognition of transformer partial discharge ultra-high-frequency signals. The experiment shows that this method achieves a fault detection accuracy of 99.58%, with a loss rate of only 0.73%. Compared to various existing network models, the accuracy of the proposed model reached 99.58%, the recall was 99.58%, and the F1 score was 99.58%, which is significantly better than other model methods, indicating that the model has significant advantages in detection performance.

1. Introduction

As a critical hub in modern power systems, power transformers play a vital role in ensuring the reliable operation of the entire grid. The operational status and stability of a transformer upon deployment directly influence the performance of the power system as a whole [1]. Partial discharge (PD) in power transformers typically arises from defects within the insulating materials. When the electric field strength exceeds a certain threshold, localized dielectric breakdown occurs within these materials, resulting in partial discharge phenomena [2,3]. Although a single PD event may not immediately lead to complete insulation failure, repeated discharges can progressively degrade the insulation, eventually causing transformer malfunction and jeopardizing the stable operation of the entire system [4]. Therefore, as an early indicator of insulation faults, accurate classification and detection of PD signals is essential for preventing potential equipment failure and ensuring the continued reliability of power systems.
So far, mainstream partial discharge signal pattern recognition methods have primarily relied on handcrafted statistical features combined with traditional machine learning techniques, such as feature-based classifiers and data mining approaches [5,6,7,8,9,10,11,12]. These methods can achieve a certain degree of classification and identification of partial discharge signals. However, due to their excessive reliance on expert experience in selecting feature thresholds during feature design, these algorithms are strongly subjective and inevitably ignore some important features of signal data. In recent years, with the rapid development of recognition technologies in image and video analysis, convolutional neural networks (CNNs) have demonstrated strong capability in automatic feature extraction and representation learning [13]. Inspired by these advances, CNN-based methods have been increasingly introduced into transformer partial discharge pattern recognition, effectively alleviating the limitations of manual feature selection and improving recognition accuracy and generalization performance [14]. Adam et al. applied Long Short-Term Memory (LSTM) networks to the identification of different types of PD defects in insulating oil. The experiment uses time-domain single pulse electrical signals as input data. The results indicate that LSTM-based models can achieve competitive recognition performance while eliminating the need for manual feature extraction, thereby reducing overall modeling complexity [15]. However, traditional feature-based methods and shallow machine learning models often struggle to maintain robust performance under complex operating conditions, as partial discharge (PD) characteristics are strongly affected by noise, stress states, and insulation conditions [16]. To overcome these limitations, Zhao et al. employed convolutional neural networks (CNNs) to automatically learn discriminative features from PD signals, demonstrating improved recognition performance compared with conventional approaches [17]. Nevertheless, the effectiveness of CNN-based methods may still be influenced by strong noise and varying operating environments commonly encountered in practical power systems. To further exploit temporal information, Wang et al. proposed a hybrid CNN–LSTM framework for partial discharge identification, which enhances modeling capability for sequential signal characteristics [18]. Although this approach improves robustness compared with single-network structures, LSTM-based models still face challenges in capturing very long-term dependencies and maintaining stable performance under highly complex and noisy conditions.
However, due to the limitations of various single deep learning models, some feature information may be overlooked in the task of identifying and classifying ultra-high-frequency signals of partial discharge. In recent years, the Two-Stream Neural Network has achieved significant results in image recognition, action recognition, and other fields due to its ability to simultaneously utilize multiple points of information, and has achieved remarkable success in image and video analysis [19], which has inspired its gradual introduction into partial discharge (PD) signal recognition. This structure typically consists of two parallel feature extraction branches that model features for different data representations (such as time-domain signals and time–frequency maps), and then performs weighted fusion, cascaded fusion, or attention mechanism fusion in the fusion stage to obtain a more comprehensive feature representation [20]. Compared with a single model, the dual flow structure can capture global information while retaining local details, thus improving the robustness and generalization ability of the model in the complex power system environment. Previous studies have shown that combining convolutional neural networks with attention mechanisms or introducing fusion strategies can further enhance feature extraction performance. For example, the fusion of spatiotemporal features between two-stream networks has shown outstanding performance in video action recognition tasks [21]. Further multi-level feature fusion strategies can capture richer spatiotemporal information and improve classification performance [22]. In addition, combining the two-stream structure with attention mechanisms can adaptively adjust the weights of different branch features, thus maintaining high recognition accuracy even in complex noise or limited samples [23].
Therefore, this article proposes a solution based on an AHAFN dual-stream neural network. The main contributions of this work are summarized as follows:
(1)
Rather than proposing a completely new backbone architecture, this work investigates a problem-oriented dual-stream learning paradigm tailored to partial discharge pattern recognition, where local texture characteristics and global contextual dependencies are jointly modeled.
(2)
An AHAFN is designed to dynamically balance and recalibrate local and global features, which differs from existing attention-based fusion methods that rely on fixed or single-scale attention mechanisms. It addresses the feature heterogeneity between CNN-extracted local representations and transformer-extracted global representations.
(3)
Extensive comparative and ablation experiments are conducted to critically analyze the effectiveness and limitations of dual-stream attention-based models, providing deeper insights into their applicability for UHF partial discharge recognition tasks.

2. Materials and Methods

2.1. Characteristic Analysis of Partial Discharge Ultra-High-Frequency Signal

The ultra-high-frequency signals of partial discharge in transformers are traditionally classified into four categories: air-gap discharge; creeping discharge; metal discharge; and needle discharge, as shown in Figure 1. The frequency spectrum of air-gap discharge is relatively narrow and the energy distribution is relatively concentrated, while the frequency spectrum of creeping discharge is wider and has obvious continuity, with a wider energy distribution. The frequency spectrum of needle discharge is relatively narrow, and there are obvious amplitude anomalies in the initial stage. The frequency spectrum of metal discharge has a wide range of components and a large proportion of high-frequency energy, often manifested as secondary or multiple changes in amplitude. Based on the above differentiation of ultra-high-frequency signals for the four discharge modes, it is found that they have a more excellent representation method in time-domain images, which is more suitable for neural network extraction and learning. At the same time, it also avoids further processing of partial discharge ultra-high-frequency signal data, which to some extent saves the time and computational cost required for recognition. The ResNet branch is responsible for capturing local details of PD signals, such as spikes, local textures, polarity structures, and transient oscillations; the Swin Transformer branch is responsible for modeling the overall morphological features of PD signals, including envelope trends, attenuation structures, long-range dependencies, and global energy distribution. After the fusion of the two, multi-scale feature expression from micro local to macro overall has been achieved, thus more accurately distinguishing different discharge types.
Due to the fact that partial discharge faults in power transformers are rare events in power equipment, the time interval between detecting a partial discharge in actual power system operation may be very long. Therefore, the number of partial discharge samples obtained through on-site detection will be very scarce. This article establishes a laboratory-scale transformer PD experimental platform to generate controlled PD signals under different defect conditions. A high-voltage AC transformer with a rated capacity of 10 kVA/100 kV is used to energize the transformer defect models. The applied voltage is gradually increased until partial discharge inception is observed. PD activity is monitored in real time using a digital oscilloscope connected to a log-periodic antenna with an operating frequency range of 300–3000 MHz, enabling effective acquisition of UHF PD signals. The experiment used a R&S RTE1054 oscilloscope (Rohde & Schwarz, Munich, Germany). In addition, an AC current transformer with a rated input current of 100 A is employed to assist in discharge monitoring and synchronization. Once repetitive discharge pulses with stable amplitude and repetition characteristics are observed on the oscilloscope, the applied voltage is maintained at a constant level to ensure steady discharge conditions. After the discharge behavior stabilizes, UHF PD signals corresponding to different defect types are continuously acquired. The oscilloscope sampling rate is set to 250 MSa/s, ensuring accurate capture of the transient characteristics of PD pulses. The collected raw time-domain signals are subsequently processed and transformed into two-dimensional representations for further analysis and model training. And the dataset was obtained as shown in Table 1. The dataset was randomly divided into training, validation, and test sets with a ratio of 7:1:2. Stratified sampling was adopted to ensure that the class distribution remained consistent across all subsets. The validation set was used for hyperparameter tuning and early stopping, while the test set was strictly reserved for final performance evaluation.

2.2. AHAFN Method

ResNet is a classical deep convolutional neural network that employs local convolution operations and introduces residual connections which enable shortcut pathways across convolutional layers to facilitate direct gradient propagation to earlier layers, thereby alleviating the vanishing gradient problem. However, its capacity for modeling long-range dependencies and capturing global information remains limited. In contrast, the Swin Transformer leverages a shifted-window attention mechanism that partitions an image into uniformly sized patches and enables cross-window information interaction, making it more effective in capturing long-range dependencies. Nonetheless, due to computational constraints, the downsampling stride is typically large, and the patch partitioning process may lead to the loss of certain local image details.
To enhance the classification accuracy of transformer partial discharge (PD) ultra-high-frequency (UHF) signal recognition, this study introduces a dual-stream neural network that integrates global features extracted by a Swin Transformer branch with local features extracted by a ResNet branch. According to the characteristics of UHF PD signal time-domain images, the ResNet branch is employed to extract fine-grained local information such as amplitude oscillations and initial abnormal fluctuations in the discharge signals. Meanwhile, accurate PD classification also relies on global morphological characteristics of the time-domain images. Thus, the Swin branch is utilized to extract global feature relationships, including the bandwidth and energy distribution of UHF PD signals, while simultaneously improving computational efficiency. Finally, the AHAFN module is used to fuse the local features extracted by the ResNet branch with the global features obtained from the Swin branch, yielding comprehensive UHF PD signal representations that incorporate both fine-grained and global information.
The overall architecture of the proposed dual-stream network is illustrated in Figure 2, and consists of a ResNet module based on ResNet18, a Swin Transformer module, and the AHAFN fusion module. The input local discharge signal map undergoes processing through the ResNet module, which progressively reduces feature map dimensions and increases channel count via convolutional layers and max pooling layers. It then enters the ResNet residual module composed of four residual blocks, where multi-level local feature details are extracted through residual connections to obtain local features. Another module performs Patch Partition on the input local discharge signal map, followed by Linear Embedding mapping to a high-dimensional feature space. Through four stages of hierarchical resolution reduction and global modeling enhancement, the channel dimension is adjusted via linear layers to output global features. Finally, the local features from the ResNet module and global features from the Swin module are input into the AHAFN adaptive hybrid attention feature fusion network. By integrating complementary local and global information, the network generates more discriminative joint features, which are output through fully connected layers to complete local discharge type recognition.

2.2.1. The ResNet Module

The convolutional neural network’s local perception capability enables effective extraction of localized information from time-domain images of transformer partial discharge (PD) ultra-high-frequency signals. Accordingly, the dual-stream network incorporates a ResNet module based on convolutional neural networks. Considering the limited volume of PD data and network training efficiency, ResNet18 was selected as the backbone network for the ResNet module. This architecture primarily captures local spatial features by extracting localized characteristics from the two-dimensional time-domain image of PD ultra-high-frequency signals through each convolutional pooling layer.
F 1 = P o o l ( σ 1 ( W c X + b c ) )
Here, Pool is the pooling operation, σ 1 is the ReLU activation function, W c is the convolution kernel weight, X is the original input, and b c is the bias. Then, the original input features are preserved through skip connections in the residual module:
F i = F i 1 + R ( F i 1 )
Here, F i denotes the i-th layer feature, and R represents the residual mapping function composed of convolution, batch normalization, and ReLU activation. The final output is obtained after passing through four layers of residual structure.
F R e s N e t = F 4

2.2.2. The Swin Module

The ResNet module utilizes the residual structure of the ResNet18 network to extract local feature information, but largely ignores the long-distance global feature information of transformer partial discharge ultra-high-frequency signals. In order to compensate for this deficiency and further preserve the complete features of partial discharge ultra-high-frequency signals, the Swin module is introduced to supplement the feature extraction of time-domain images of partial discharge ultra-high-frequency signals.
A Swin Transformer is a sliding window-based structure that can capture multi-scale window information while reducing computational complexity. Firstly, convert the PD ultra-high-frequency signal into a two-dimensional time–frequency map and perform window partitioning:
X patch   =   PatchPartition ( X )
Here, X denotes the original input. The segmented patches undergo a linear projection layer to increase their data dimensionality, enabling compatibility with transformer computations.
F 1 = W e X p a t c h + b e
Here, F 1 represents the input to the S-T Block within 1 stage. W e denotes the weight matrix of the linear transformation, and b e represents the bias. The process is then implemented through a Swin-Transformer Block (S-T Block).
F s w i n i = S w i n T r a n s f o r m e r B l o c k ( F i )
Here, F swin i denotes the output of the i-th stage, while F i represents the input to the S-T Block within i stage. The S-T Block performs computations through the S-T Block operation, which calculates self-attention within a local window using W-MSA.
Attentio n ( Q ,   K ,   V ) = SoftMax ( Q K T D )
Q, K, V are the embedded vector matrices of the feature images after linear transformation, and D is the dimension of the feature vector set by the experimental model. In order to enhance the information exchange between windows, the local features are connected to the global features, the window is shifted in the even layer, and the cross-window information interaction is realized by SW-MSA.
Attentio n ( Q ,   K ,   V ) = SoftMax ( Q K T D + B ) V
Here, B denotes the relative positional offset. Subsequently, each self-attention layer applies layer normalization and residual connections. The final three stages initially employ Patch Merging for progressive downsampling, reducing spatial dimensions while enhancing feature dimensions to improve the model’s expressive power.
F i = PatchMerging ( F i 1 )
Here, F i denotes the output of Patch Merging in stage i (i > 1) and serves as the input for the S-T Block in stage i, while F i 1 represents the output of stage i − 1. After four stages, the result from the Swin branch is obtained. Given its 768-dimensional output and the 512-dimensional feature dimension of the ResNet branch, a linear layer is applied to transform the Swin branch output into 512 dimensions for subsequent feature fusion.
F s w i n = L i n e a r 768 512 ( F 4 )

2.2.3. The AHAFN Module

To integrate the local and global features extracted by the ResNet and Swin branches, this article proposes an AHAFN module. By fully combining the advantages of both branch architectures, the proposed method enhances the classification accuracy of ultra-high-frequency signals from transformer partial discharges. The overall architecture is illustrated in Figure 3.
The global feature F s w i n obtained from the Swin branch is processed by average pooling and max pooling, respectively, through a 3 × 3 convolution. The weights are generated using the Sigmoid activation function and added together. The result is then Hadamard multiplied with the initial global feature.
X g = F s w i n ( σ 2 ( A v g P o o l ( F s w i n ) k 3 × 3 ) σ 2 ( M a x P o o l ( F s w i n ) k 3 × 3 ) )
Here, F s w i n denotes the initial global features extracted from the Swin branch, k 3 × 3 represents the 3 × 3 convolution kernel, σ 2 is the Sigmoid activation function, represents convolution operation, denotes matrix addition, denotes the Hadamard product operator, AvgPool refers to average pooling, and MaxPool refers to max pooling. By further aggregating the contextual information within the initial receptive field, the receptive field is effectively expanded, enabling more efficient and optimized modeling of global spatial relationships.
The local features F R e s N e t obtained from the ResNet branch are processed through a 1 × 1 convolution, followed by average pooling and max pooling. The results are then fed through a linear layer, where the weights generated by the Sigmoid activation function are multiplied by the original local features via Hadamard product.
X l = F R e s N e t σ 2 ( A v g P o o l ( k 1 × 1 F R e s N e t ) + M a x P o o l ( k 1 × 1 F R e s N e t ) )
Here, F R e s N e t denotes the initial global feature extracted by the ResNet branch, while k 1 × 1 represents a 1 × 1 convolution kernel. This design ensures that average pooling compresses information while maximizing the prominence of target features through max pooling, thereby enhancing spatial details and minimizing the influence of irrelevant regions on weight calculations.
Finally, the two results are weighted and adaptively fused through an attention mechanism.
w g = σ 2 ( W g [ X g , X l ] + b g )
w l = 1 w g
F f u s i o n = w g · X g + w l · X l
Here, w g and w l represent the weight ratios of the Swin branch and ResNet branch, [ X g , X l ] denotes the feature vector concatenated from fully connected layers, and W g and b g are learnable parameters. The architecture employs fully connected layers with Sigmoid activation functions to enable the model to automatically learn the weight distribution of features from both branches in the fused feature. This adaptive mechanism ensures appropriate contributions from features of different origins. The final fused feature F f u s i o n is thus obtained.
Although AHAFN is mathematically formulated, its design is guided by the physical and signal characteristics of UHF PD signals, which are non-stationary and impulsive, exhibiting localized high-energy patterns and global contextual dependencies in time–frequency representations. ResNet-based extractors capture local impulsive features, while transformer-based architectures model global energy distributions. Since the relative importance of these characteristics varies with discharge mechanisms and operating conditions, AHAFN employs an adaptive fusion strategy that dynamically reweights local and global features according to their responses. Average and max pooling are used to extract complementary energy-related statistics, which are mapped through a Sigmoid function to generate adaptive weights for response-driven feature recalibration.

2.2.4. Algorithm Evaluation Indicators

In deep learning neural networks (especially for classification tasks), accuracy and recall are two very important performance indicators, especially in scenarios where sample categories are imbalanced, as they are more meaningful than pure accuracy. The most commonly used performance indicators in this article are Accuracy, Precision, Recall, and F1 score. The calculation formula is as follows:
Accuracy   =   i TP i T o t a l   s a m p l e   s i z e
Precision i = T P i T P i + j F P j i
R e c a l l i = T P i T P i + j F N i j
F 1   S c o r e i = 2 × Precision i × R e c a l l i Precision i   +   R e c a l l i

3. Results

3.1. Experimental Details

The experiments were conducted on Windows 11 (HP, Lanzhou, Gansu, China; CPU: Intel® Core™ i9-14900HX @ 2.20 GHz, GPU: NVIDIA GeForce RTX 4070) using PyTorch 1.9.1. All experiments were conducted under the same software and hardware environment. In addition, to ensure reproducibility, a fixed random seed was used for all experiments, including data shuffling, network initialization, and training procedures.
The basic parameter configurations are listed in Table 2.
As summarized in Table 2, the proposed network adopts a dual-stream architecture consisting of a ResNet branch and a Swin transformer branch. The ResNet branch strictly follows the standard ResNet18 configuration, including a 7 × 7 convolution with stride 2, a 3 × 3 max pooling layer, and four residual stages composed of BasicBlocks with channel sizes of 64, 128, 256, and 512, respectively, each repeated twice, and followed by global average pooling to obtain high-level semantic features. In parallel, the Transformer branch employs the official Swin-Tiny architecture, where the inputted RGB image of size 224 × 224 is partitioned into non-overlapping 4 × 4 patches and projected into tokens with an initial embedding dimension of 96. Hierarchical feature modeling is achieved through four Swin stages with depths of [2, 2, 6, 2] and attention heads of [3, 6, 12, 24], using 7 × 7 window-based self-attention with shifted windows and Patch Merging to progressively increase the embedding dimensions. The feed-forward network expansion ratio is set to four. All backbone configurations strictly follow their official implementations without structural modifications, and the model is optimized using the Adam optimizer with a weight decay of 0.05. ResNet18 and Swin-Tiny are selected as the backbone networks to achieve a balanced trade-off between representation capability and computational efficiency. For partial discharge time–frequency images, discriminative patterns are mainly characterized by localized impulsive structures as well as global energy distribution differences. ResNet18 provides a stable and efficient local feature extractor without introducing excessive model depth, which is particularly suitable for datasets of limited scale. Meanwhile, Swin-Tiny preserves the complete hierarchical window-based self-attention mechanism of Swin Transformer while maintaining moderate computational cost, enabling effective global context modeling across different time–frequency scales. Compared with deeper CNNs or larger Swin variants, the selected configurations avoid feature redundancy and overfitting while delivering competitive recognition performance. Moreover, both backbones strictly follow their official implementations, ensuring reproducibility and fair comparison, with architectural innovation focused on the proposed feature fusion strategy.
To enhance the model’s generalization ability and performance, the learning rate of the dual-stream network was optimized, while other parameters were set according to the Table 2 in Section 3.1. The experimental results are shown in Figure 4 and Figure 5, as well as Table 3. When the learning rate was set to 0.0001 or 0.0002, the accuracy remained largely consistent and significantly higher than other rates. Overall, the learning rate of 0.0001 achieved the best balance between accuracy, precision, recall, F1 score, and loss, and was therefore selected as the optimal learning rate for subsequent experiments. Therefore, 0.0001 was selected as the optimal learning rate.

3.2. Ablation Experiment

To address the challenge of accurately integrating local features with global representations, this study evaluated various feature fusion methods on the transformer partial discharge UHF signal time-domain image dataset. The comparison included FUS-C (Fusion via Concatenation), AVG-F (Average Fusion), weighted feature fusion (WAVG-F), Squeeze-and-Excitation Network (SENet), Convolutional Block Attention Module (CBAM), and our proposed AHAFN. As shown in Table 4, AHAFN achieved a recognition accuracy of 99.57% for transformer partial discharge UHF signal time-domain images, demonstrating significant improvements over FUS-C and AVG-F.
The proposed AHAFN differs fundamentally from existing attention modules. Instead of refining features within a single backbone, the proposed method constructs branch-specific attention weights for heterogeneous CNN and Swin Transformer features. By leveraging dual pooling statistics and lightweight convolutional transformations, the attention mechanism is explicitly designed to facilitate cross-branch feature alignment and weighted fusion of local and global representations. This design enables effective complementary exploitation of CNN-based local discriminative patterns and Transformer-based global contextual information, which is not addressed by conventional attention-based fusion strategies.
In comparison, SENet, AvgPool and MaxPool are introduced simultaneously to replace single pooling, remove fully connected layers, and use convolution to model channel relationships. Compared to the serial enhancement of features in CBAM, this method adopts a parallel weighted structure to facilitate cross-branch feature alignment, resulting in accuracy improvements of 2.35% and 1.55% respectively.
In addition, to further validate the effectiveness of the ResNet stream and the Swin Transformer stream in the proposed dual-stream network, comprehensive ablation experiments were conducted on the UHF partial discharge signal image dataset. The experimental results are presented in Figure 6 and Table 5. Compared with using only the CNN stream or only the Swin stream, the AHAFN dual-stream network achieves improvements of 7.98% and 3.97% in classification accuracy, respectively, while the F1 score increases by 9.11% and 3.74%. These results demonstrate that the dual-stream architecture can effectively extract and fuse both local and global information, resulting in more discriminative feature representations and further improving the accuracy of UHF partial discharge signal classification.

3.3. Comparative Experiment

To further validate the effectiveness and superiority of the proposed method, we compared our algorithm with mainstream image classification techniques on the transformer partial discharge UHF signal time-domain image dataset. For fair comparison, all baseline and competing models were trained and evaluated under the same experimental settings, including identical training–validation–test splits, input resolution, data preprocessing, optimizer, batch size, and number of training epochs. For each comparison model, hyperparameters were tuned within the commonly adopted ranges reported in the original papers. The best-performing configuration on the validation set was selected for final evaluation. The display of each experimental result is the average of multiple experimental results.
The results are shown in Figure 7. The images demonstrate that the AHAFN dual-stream network achieves higher training accuracy than other networks, with the lowest and most stable loss rate. As shown in Figure 7, the proposed AHAFN exhibits fast and stable convergence behavior without noticeable oscillations or performance degradation in the later training stage, which is a strong indicator against overfitting.

3.3.1. Compared to a Single Network

Figure 8 and Table 6 demonstrate that the AHAFN dual-stream network proposed in this article shows significant improvements over Base on RF and ResNet, the hybrid of VGG16 and ResNet50 [24], DRSwin-ST [25], ResNet34 [18], and the single LSTM model [15]. The accuracy rates increased by 1.78%, 1.92%, 1.81%, 8.75%, and 10.96% respectively. The recall rates improved by 1.82%, 2.01%, 1.88%, 8.75%, and 10.87%, respectively. The F1 scores rose by 1.81%, 1.97%, 1.85%, 8.73%, and 10.92%, respectively. By employing dual branches for feature extraction and fusion, the dual-stream network achieves higher accuracy compared to single-network architectures while effectively avoiding issues like incomplete or lost feature extraction in single-network models. For instance, DRSwin-ST tends to overlook long-term dependencies, whereas LSTM networks exhibit strong sequence dependency. In contrast, the proposed AHAFN achieves the highest accuracy of 99.57% with a moderate computational cost of 6.3 GFLOPs, demonstrating a favorable trade-off between accuracy and efficiency. This confirms that effective global–local feature fusion, rather than brute-force model scaling, is crucial for high-performance PD pattern recognition.

3.3.2. Compared to Other Dual-Stream Networks

Figure 9 and Table 7 demonstrate that the AHAFN dual-stream network proposed in this study outperforms existing architectures including CNN-SVM hybrid networks, CNN-Transformer [26], RNE-DSNet [27], and CNN-BiLSTM-Attention dual-stream networks [28]. It achieves 4.01%, 2.16%, 0.51%, and 2.10% improvements in accuracy, 4.34%, 2.46%, 0.54%, and 2.13% gains in recall, and 4.18%, 2.32%, 0.53%, and 2.12% enhancements in F1 score. This model overcomes the limitations of CNN-SVM hybrid networks in processing high-dimensional features by leveraging dynamic attention fusion to boost representation capabilities. While CNN-Transformer employs a serial structure instead of parallel dual-stream architecture, its fixed fusion points result in inefficient information utilization. RNE-DSNet lacks explicit global modeling modules, and its fusion strategy is less flexible compared to the AHAFN approach. CNN-BiLSTM-Attention demonstrates limited spatial modeling capacity and weaker image representation. The AHAFN dual-stream network effectively addresses these shortcomings, significantly improving the accuracy of transformer partial discharge detection. Compared with the RNE DSNet, which performs the best among the other models, the proposed AHAFN achieves higher recognition accuracy while slightly increasing computational cost. Specifically, adding two additional GFLOPs can increase accuracy by 0.48%, which is equivalent to an approximately 0.24% efficiency improvement per GFLOPs. This indicates that the additional computation is effectively utilized to enhance discriminative feature representation in high-accuracy regimes.
Notably, several competing models achieve performance close to their reported results in the original literature, indicating that the implementations and hyperparameter settings are reasonable. The superior performance of the proposed AHAFN is therefore attributed to its architectural advantages rather than unfair experimental settings.

3.3.3. Two-Dimensional Confusion Matrix

In this study, we further classified and identified 300 signal diagrams of four types of partial discharge using an optimized model, and generated a two-dimensional confusion matrix as shown in Figure 10. The proposed AHAFN model achieves the highest concentration of samples along the main diagonal, indicating superior classification accuracy and robustness compared with the other methods: the accuracy has reached 99.2%. The cross judgment between categories is basically controlled within 0–1 samples. In particular, AHAFN effectively suppresses misclassification among easily confused PD types, such as Creeping and Metal, with only a few incorrectly predicted samples. This performance gain can be attributed to the complementary feature learning mechanism, where the ResNet branch captures discriminative local spatial features while the Swin branch models global contextual dependencies. The results demonstrate that the proposed AHAFN architecture can more effectively exploit multi-scale PD characteristics, leading to improved pattern recognition performance.

4. Conclusions

This article proposed the AHAFN dual-stream network for partial discharge pattern recognition by effectively integrating the complementary strengths of a CNN-based local feature extraction branch and a Swin Transformer-based global feature modeling branch. Through the designed dual-stream architecture and attention-guided fusion mechanism, the proposed method is capable of capturing both fine-grained local characteristics and long-range contextual dependencies in UHF discharge images. Extensive experiments were conducted to validate the effectiveness of the proposed approach. Comparative results against multiple baseline and state-of-the-art models demonstrate that AHAFN consistently achieves superior recognition performance across multiple evaluation metrics, including accuracy, precision, recall, and F1 score. In addition, convergence analysis indicates stable training behavior. Regularization strategies such as weight decay and global average pooling were further employed to mitigate overfitting and enhance generalization capability.
Despite these encouraging results, several limitations of the proposed method should be acknowledged. First, the experimental evaluation was primarily conducted on data collected under controlled laboratory conditions, which may not fully reflect the variability and noise characteristics encountered in real transformer environments. Second, although the proposed dual-stream architecture improves recognition accuracy, it inevitably introduces additional computational overhead compared to single-stream models, which may limit its deployment on resource-constrained devices. Furthermore, the impact of severe class imbalance and extremely limited training data was not exhaustively investigated in the current study.
Future work will focus on addressing these limitations in several directions. Specifically, robustness analyses under more challenging conditions, such as strong noise interference, reduced training data, and imbalanced class distributions, will be systematically explored. In addition, model compression and acceleration strategies, including lightweight transformer variants, pruning, and knowledge distillation, will be studied to reduce computational cost and enhance inference efficiency for real-time monitoring applications. Finally, the proposed framework will be further validated on larger-scale datasets and real-world transformer monitoring systems to assess its long-term reliability and practical applicability.

Author Contributions

Conceptualization, Y.Z.; Methodology, Y.Z.; Validation, Y.Z.; Formal analysis, Y.Z. and T.Y.; Resources, Y.Z. and T.Y.; Data curation, Y.Z.; Writing—original draft, Y.Z.; Writing—review and editing, Y.Z. and T.Y.; Visualization, Y.Z.; Supervision, T.Y.; Project administration, T.Y. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data presented in this study are available on request from the corresponding author due to data related to the implementation of major projects at the provincial level, it has not been made public yet.

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

The following abbreviations are used in this manuscript:
AHAFNAdaptive Hybrid Attention Fusion Network
PDPartial discharge
UHFUltra-high-frequency

References

  1. Zhou, X.; Wu, X.; Ding, P.; Li, X.; He, N.; Zhang, G.; Zhang, X. Research on transformer partial discharge UHF pattern recognition based on CNN–LSTM. Energies 2020, 13, 61. [Google Scholar] [CrossRef] [Scilit]
  2. Mondal, M.; Kumbhar, B.G.; Kulkarni, V.S. Localization of partial discharges inside a transformer winding using a ladder network constructed from terminal measurements. IEEE Trans. Power Deliv. 2018, 33, 1035–1043. [Google Scholar] [CrossRef] [Scilit]
  3. Jan, T.S.; Afzal, R.; Khan, Z.A. Transformer failures: Causes and impact. In Proceedings of the International Conference on Data Mining, Civil and Mechanical Engineering (ICDMCME 2015), Bali, Indonesia, 1–2 February 2015; USAID Funded Center for Advance Studies in Energy at NUST (CAS-EN): Islamabad, Pakistan; pp. 50–53. [Google Scholar]
  4. Klein, L.; Seidl, D.; Fulneček, J.; Prokop, L.; Mišák, S.; Dvorský, J. Antenna contactless partial discharge detection in covered conductors using ensemble stacking neural networks. Expert Syst. Appl. 2023, 213, 118910. [Google Scholar] [CrossRef] [Scilit]
  5. Darabad, V.P.; Vakilian, M.; Phung, B.T.; Blackburn, T.R. An efficient diagnosis method for data mining on single PD pulses of transformer insulation defect models. IEEE Trans. Dielectr. Electr. Insul. 2013, 20, 2061–2072. [Google Scholar] [CrossRef] [Scilit]
  6. Qin, C.; Zhu, X.; Zhu, P.; Lin, W.; Liu, L.; Che, C.; Liang, H.; Hua, H. Partial Discharge Signal Pattern Recognition of Composite Insulation Defects in Cross-Linked Polyethylene Cables. Sensors 2024, 24, 3460. [Google Scholar] [CrossRef] [Scilit]
  7. Mirjalili, S.; Gandomi, A.H.; Mirjalili, S.Z.; Saremi, S.; Faris, H.; Mirjalili, S.M. Salp swarm algorithm: A bio-inspired optimizer. Adv. Eng. Softw. 2017, 114, 163–191. [Google Scholar] [CrossRef] [Scilit]
  8. Yang, X.S.; Deb, S.; Fong, S.; Heidari, A.A.; Mirjalili, S. Metaheuristic algorithms in artificial intelligence. Neural Comput. Appl. 2021, 33, 843–852. [Google Scholar]
  9. Gulski, E.; Kreuger, F.H. Computer-aided recognition of discharge sources. IEEE Trans. Dielectr. Electr. Insul. 1992, 27, 82–92. [Google Scholar] [CrossRef] [Scilit]
  10. Khan, Y.; Refaat, S.S.; Abu-Rub, H. Machine learning approaches for partial discharge diagnosis: A review. IEEE Access 2020, 8, 208800–208816. [Google Scholar]
  11. Khodaveisi, F.; Karami, H.; Karimpour, M.Z.; Rubinstein, M.; Rachidi, F. Partial discharge localization in power transformer tanks using machine learning methods. Sci. Rep. 2024, 14, 11785. [Google Scholar] [CrossRef] [Scilit]
  12. Karthikeyan, B.; Gopal, S. Partial discharge pattern recognition using wavelet transform and neural networks. IEEE Trans. Dielectr. Electr. Insul. 2005, 12, 570–579. [Google Scholar]
  13. Simonyan, K.; Zisserman, A. Two-stream convolutional networks for action recognition in videos. Adv. Neural Inf. Process. Syst. 2014, 27, 568–576. [Google Scholar]
  14. Tang, J.; Zhou, J.; Sheng, G.; Jiang, X. Partial discharge pattern recognition using deep convolutional neural networks. IEEE Trans. Dielectr. Electr. Insul. 2018, 25, 1476–1484. [Google Scholar]
  15. Adam, B.; Tenbohlen, S. Classification of multiple PD sources by signal features and LSTM networks. In Proceedings of the IEEE International Conference on High Voltage Engineering and Application (ICHVE), Athens, Greece, 10–13 September 2018; pp. 1–4. [Google Scholar]
  16. Cavallini, A.; Montanari, G.C. Effect of different stress conditions on partial discharge activity. IEEE Trans. Dielectr. Electr. Insul. 2001, 8, 971–979. [Google Scholar]
  17. Zhao, Z.; Liu, H.; Wang, Y.; Li, C.; Zhang, X.; Tang, J. Convolutional neural network based feature learning for partial discharge pattern recognition. IEEE Access 2019, 7, 47904–47913. [Google Scholar]
  18. Wang, J.; Li, Y.; Zheng, H.; Zhang, G.; Zhang, L.; Zhang, L.J. Partial discharge identification based on CNN–LSTM hybrid neural network. Electr. Power Syst. Res. 2020, 189, 106635. [Google Scholar]
  19. Feichtenhofer, C.; Pinz, A.; Zisserman, A. Convolutional two-stream network fusion for video action recognition. arXiv 2016, arXiv:1604.06573. [Google Scholar] [CrossRef] [Scilit]
  20. Qiao, H.; Liu, S.; Xu, Q.; Liu, S.; Yang, W. Two-stream convolutional neural network for video action recognition. KSII Trans. Internet Inf. Syst. 2021, 15, 3668–3684. [Google Scholar] [CrossRef] [Scilit]
  21. Tran, A.; Cheong, L.F. Two-stream flow-guided convolutional attention networks for action recognition. arXiv 2017, arXiv:1708.09268. [Google Scholar]
  22. Paul, A.; De, D.; Chatterjee, P.; Das, S. Two-stream convolutional network with multi-level feature fusion for categorization of human action from videos. In Pattern Recognition and Machine Intelligence; Springer: Cham, Switzerland, 2017; pp. 758–765. [Google Scholar]
  23. Zhu, Y.; Lan, Z.; Newsam, S.; Hauptmann, A.G. Hidden two-stream convolutional networks for action recognition. arXiv 2017, arXiv:1704.00389. [Google Scholar]
  24. Zaman, W.; Siddique, F.M.; Ullah, S.; Saleem, F.; Kim, J.-M. Hybrid deep learning model for fault diagnosis in centrifugal pumps: A comparative study of VGG16, ResNet50, and wavelet coherence analysis. Machines 2024, 12, 905. [Google Scholar] [CrossRef] [Scilit]
  25. Zhou, T.; Yao, D.; Yang, J.; Meng, C.; Li, A.; Li, X. DRSwin-ST: An intelligent fault diagnosis framework based on dynamic threshold noise reduction and sparse transformer with shifted windows. Reliab. Eng. Syst. Saf. 2024, 250, 110327. [Google Scholar] [CrossRef] [Scilit]
  26. Liang, X.M.; An, J.M.; Cao, X.H.; Zeng, K.; Wang, F.B.; Liu, H.F. Classification of sintering flame combustion state based on a CNN–Transformer dual-stream network. Appl. Opt. 2023, 44, 1030–1036. [Google Scholar]
  27. Zhou, T.; Liu, F.; Ye, X.; Guo, Y.; Niu, Y.; Lu, H. RNE-DSNet: A re-parameterization neighborhood enhancement-based dual-stream network for CT image recognition. Eng. Sci. Technol. Int. J. 2024, 56, 101760. [Google Scholar] [CrossRef] [Scilit]
  28. Fu, Z.; Wang, Y.; Zhou, L.; Li, K.; Rao, H. Partial discharge recognition of transformers based on data augmentation and CNN–BiLSTM–attention mechanism. Electronics 2025, 14, 193. [Google Scholar] [CrossRef] [Scilit]
Figure 1. Example waveforms of various types of partial discharge.
Figure 1. Example waveforms of various types of partial discharge.
Applsci 16 01479 g001
Figure 2. Based on the overall framework flowchart of AHAFN dual-stream network.
Figure 2. Based on the overall framework flowchart of AHAFN dual-stream network.
Applsci 16 01479 g002
Figure 3. The AHAFN module structure flowchart ( denotes matrix addition, denotes the Hadamard product operator).
Figure 3. The AHAFN module structure flowchart ( denotes matrix addition, denotes the Hadamard product operator).
Applsci 16 01479 g003
Figure 4. Recognition accuracy of each learning rate.
Figure 4. Recognition accuracy of each learning rate.
Applsci 16 01479 g004
Figure 5. Recognition loss rate of each learning rate.
Figure 5. Recognition loss rate of each learning rate.
Applsci 16 01479 g005
Figure 6. Comparison of recognition accuracy in ablation experiments.
Figure 6. Comparison of recognition accuracy in ablation experiments.
Applsci 16 01479 g006
Figure 7. Training results of each model: (a) Identification Accuracy of each method; and (b) Identification Loss Rate of each method.
Figure 7. Training results of each model: (a) Identification Accuracy of each method; and (b) Identification Loss Rate of each method.
Applsci 16 01479 g007
Figure 8. Comparison results of a single network.
Figure 8. Comparison results of a single network.
Applsci 16 01479 g008
Figure 9. Comparison results of dual-stream networks.
Figure 9. Comparison results of dual-stream networks.
Applsci 16 01479 g009
Figure 10. Two-dimensional confusion matrix for optimal model recognition results.
Figure 10. Two-dimensional confusion matrix for optimal model recognition results.
Applsci 16 01479 g010
Table 1. Partial discharge dataset.
Table 1. Partial discharge dataset.
Partial Discharge TypesNumber
Air-Gap discharge1526
Creeping discharge1420
Metal discharge872
Needle discharge842
total4660
Table 2. Experimental parameter configuration.
Table 2. Experimental parameter configuration.
TypeConfiguration
Parameters
TypeConfiguration
Parameters
Conv17 × 7, Stride = 2Patch_Size4 × 4
Max Pooling3 × 3, Stride = 2Window_Size7 × 7
Block 13 × 3, 64 × 2Embed_Dim96
Block 23 × 3, 128 × 2Depths[2, 2, 6, 2]
Block 33 × 3, 256 × 2Heads[3, 6, 12, 24]
Block 43 × 3, 512 × 2MLP_Ratio4
GAP7 × 7Weight_Decay0.05
BlockBasicBlockInputRGB (224 × 224)
inplanes64optimizerAdam
Table 3. Comparison of recognition accuracy and loss rate among different learning rates.
Table 3. Comparison of recognition accuracy and loss rate among different learning rates.
Accuracy (%)Precision (%)Recall (%)F1 ScoreLoss (%)
0.00199.2199.1899.200.99202.88
0.000199.5799.5899.570.99580.73
0.000299.5799.5699.570.99560.93
0.000599.2899.3099.270.99281.23
0.0000199.5799.5299.570.99542.67
Table 4. Comparison of recognition accuracy of various feature fusion methods.
Table 4. Comparison of recognition accuracy of various feature fusion methods.
PD TypeFUS-C/%AVG-F/%SENet/%CBAM/%AHAFN (Ours)/%
RateAverageRateAverageRateAverageRateAverageRateAverage
Air-Gap95.9695.7896.5796.6997.1597.2298.2198.0299.7299.57
Creeping95.7696.7897.2397.9099.47
Metal95.5996.7097.0197.8899.40
Needle95.6896.7597.5598.0299.64
Table 5. Comparison of ablation experiment results.
Table 5. Comparison of ablation experiment results.
ModelsTrain Accuracy (%)Precision (%)F1 Score
ResNet1891.2190.530.9047
Swin Transformer95.9894.540.9421
AHAFN (Ours)99.5799.580.9958
Table 6. Comparison results of a single network.
Table 6. Comparison results of a single network.
ModelsAccuracy (%)Precision (%)Recall (%)F1 ScoreFLOPs (G)
AHAFN (Ours)99.5799.5899.570.99586.3
Base on RF and ResNet97.8097.8097.750.97771.8
ResNet50 with VGG1697.5997.6697.560.976119.6
DRSwin-ST97.8197.7797.690.97736.4
ResNet34 [18]90.9190.8390.820.90853.7
LSTM [15]88.7888.6288.700.88660.4
Table 7. Comparison results of dual-stream networks.
Table 7. Comparison results of dual-stream networks.
ModelsAccuracy (%)Precision (%)Recall (%)F1 ScoreFLOPs (G)
AHAFN(Ours)99.57 ± 0.0899.5899.570.99586.3
CNN-SVM95.9895.5795.230.95401.82
CNN-Transformer97.2897.4297.110.97267.52
RNE-DSNet99.0999.0799.030.99054.34
CNN-BiLSTM-Attention97.4897.4897.440.97464.04
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

Zhang, Y.; Yan, T. Classification and Recognition of Ultra-High-Frequency Partial Discharge Signals in Transformers Based on AHAFN. Appl. Sci. 2026, 16, 1479. https://doi.org/10.3390/app16031479

AMA Style

Zhang Y, Yan T. Classification and Recognition of Ultra-High-Frequency Partial Discharge Signals in Transformers Based on AHAFN. Applied Sciences. 2026; 16(3):1479. https://doi.org/10.3390/app16031479

Chicago/Turabian Style

Zhang, Yishu, and Tianfeng Yan. 2026. "Classification and Recognition of Ultra-High-Frequency Partial Discharge Signals in Transformers Based on AHAFN" Applied Sciences 16, no. 3: 1479. https://doi.org/10.3390/app16031479

APA Style

Zhang, Y., & Yan, T. (2026). Classification and Recognition of Ultra-High-Frequency Partial Discharge Signals in Transformers Based on AHAFN. Applied Sciences, 16(3), 1479. https://doi.org/10.3390/app16031479

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