Submitted:
13 December 2024
Posted:
17 December 2024
You are already at the latest version
Abstract
Keywords:
1. Introduction
- We propose InvMOE, a novel fault detection algorithm that combines invariant representation learning and a mixture of experts framework to address the challenges of limited generalization and sparse supervision.
- We introduce a causal-inspired approach for disentangling task-relevant features from environmental noise, enabling robust and reliable fault detection across diverse and unpredictable converter station environments.
- We develop a multi-task training strategy with MOE, which improves model efficiency and effectiveness, particularly in handling tasks with limited data, and demonstrate its superiority through extensive experiments on real-world datasets.
2. Related Works
2.1. Converter Station Fault Detection
2.2. Out-of-Distribution Generalization
2.3. Multi-task Learning
3. The Proposed InvMOE Framework

3.1. Image Feature Extraction
- Patch Tokenization: The input image x is divided into non-overlapping patches of size . Each patch is flattened into a vector, and a linear embedding layer maps these vectors into a d-dimensional feature space. This produces an initial set of tokens .
- Hierarchical Feature Extraction: The tokenized patches are passed through multiple transformer layers. Each layer consists of shifted window-based self-attention modules and feed-forward networks, enabling efficient computation and the capture of long-range dependencies within the image [23].
- Feature Aggregation: As the processing progresses through hierarchical stages, features are aggregated and down-sampled to reduce spatial dimensions while increasing semantic richness. This results in a compact feature vector , encapsulating the key visual information of the input image.
3.2. MOE-Based Multi-Task Learning
3.2.1. Adaptive Expert Routing
3.2.2. Multi-task learning
3.3. Invariant Learning-based Optimization
| Algorithm 1:InvMOE Framework for Fault Detection |
|
3.3.1. Causal Framework for Invariance
3.3.2. IRM-Based Regularization
4. Experimental Results
4.1. Dataset Preprocessing
4.1.1. Data Collection
4.1.2. Data Augmentation
- Random cropping: Randomly cropping regions of the image to simulate variations in object size and position.
- Color jittering: Random adjustments to the image’s brightness, contrast, and saturation to simulate varying lighting conditions.
- Rotation and flipping: Random rotations and horizontal flips to simulate different camera angles.
- Noise injection: Adding random noise to images to simulate real-world disturbances and background complexities.
4.1.3. Normalization and Standardization
4.2. Experimental Settings
4.2.1. Training Setup
- The model is trained using mini-batch gradient descent with a batch size of 32.
- Early stopping is employed to prevent overfitting, with a patience of 10 epochs. Training stops if the validation loss does not improve for 10 consecutive epochs.
- The learning rate is initialized at 0.001 and decreased by a factor of 0.1 after every 20 epochs.
- The Adam optimizer is used for model optimization, which adapts the learning rate based on first and second moments of the gradients.
4.2.2. Evaluation Baselines
- ResNet: ResNet (Residual Networks) [6] is a deep convolutional neural network architecture known for its use of residual connections, which help mitigate the vanishing gradient problem by allowing gradients to flow through the network more effectively. It is particularly effective in image classification tasks and has been widely used in various computer vision applications. ResNet is commonly employed as a baseline model for comparison in tasks requiring deep learning architectures.
- Swin Transformer: The Swin Transformer [23] is a state-of-the-art vision transformer architecture that uses shifted windows for efficient self-attention and hierarchical feature representation. It overcomes the limitations of traditional Vision Transformers (ViTs) by processing images in smaller, non-overlapping patches and dynamically adjusting attention regions, making it highly effective for capturing both local and global features. It has shown superior performance in various vision tasks compared to CNN-based architectures.
- IRM (Invariant Risk Minimization): IRM [8] focuses on learning representations that generalize across multiple environments by enforcing invariance in the learned features. In the context of fault detection, this method would remove the multi-task learning component, resulting in a model variant that learns invariant representations across different environmental conditions without task-specific adaptation. This approach helps in addressing environmental variability, but without the benefit of multi-task learning shared across tasks.
4.2.3. Evaluation Metrics
- Accuracy (ACC): The accuracy of a model is the proportion of correct predictions out of the total number of predictions. It is computed as:where TP, TN, FP, and FN are the true positives, true negatives, false positives, and false negatives, respectively. Accuracy provides a general measure of how well the model is performing across all classes.
-
F1-Score: The F1-score is the harmonic mean of precision and recall, providing a balance between the two metrics. It is defined as:whereThe F1-score is especially useful when the dataset is imbalanced, as it accounts for both false positives and false negatives.
4.3. Performance Comparisons with Baselines
- Accuracy Performance: InvMOE consistently outperforms all baseline models across all tasks, achieving the highest accuracy in each task. Notably, InvMOE achieves an accuracy of 97.5% in Task 1 (metal corrosion detection), which is higher than the next best model, IRM (97.0%), and significantly higher than ResNet (94.0%) and Swin Transformer (96.5%). In Task 5 (valve cooling water leakage), InvMOE maintains an impressive accuracy of 88.0%, surpassing all baseline models, with IRM coming in second at 85.5%.
- F1-Score Performance: The trend observed in the accuracy results is reflected in the F1-scores. InvMOE again leads with the highest F1 scores across all tasks. For example, in Task 1, InvMOE achieves an F1-score of 97.3%, outperforming IRM (97.1%), Swin Transformer (96.2%), and ResNet (93.5%). In Task 5, InvMOE maintains its superior performance with an F1-score of 87.5%, which is considerably higher than IRM (82.5%) and Swin Transformer (80.1%).
- Comparison to Baselines: ResNet, while a strong baseline, generally falls behind both Swin Transformer and IRM in terms of both accuracy and F1-score. This is expected given that ResNet is a convolutional neural network, which may not capture the fine-grained relationships and long-range dependencies in the data as effectively as transformer-based models. Swin Transformer and IRM perform similarly on most tasks, with IRM slightly outperforming Swin Transformer. This indicates that enforcing invariance across different environments (as done by IRM) offers some benefits over the self-attention mechanism used in Swin Transformer, particularly in tasks with varied environmental conditions. Overall, InvMOE demonstrates the most robust performance, suggesting that the integration of multi-task learning and the model’s ability to handle diverse fault detection scenarios contribute to its superior results.
5. Ablation Study
- InvMOE (full model): The complete model that incorporates multi-task learning, IRM, and the Swin Transformer backbone.
- No Multi-Task Learning: In this variant, the multi-task learning component is removed, and the model is trained in a single-task learning setup.
- No IRM: This variant removes the IRM mechanism, leaving the model to train without enforcing invariant risk minimization.
- Swin Transformer Backbone: In this variant, we keep the multi-task learning and IRM components but replace the Swin Transformer backbone with a simpler architecture for comparison.
5.1. Ablation Study Results
- Impact of Multi-Task Learning: When multi-task learning is removed, the model’s accuracy and F1-score decrease by around 1-2% for all tasks. This demonstrates the importance of leveraging shared information from multiple tasks to improve generalization and performance across different fault detection scenarios.
- Impact of Invariant Risk Minimization (IRM): Similarly, removing the IRM component causes a noticeable reduction in accuracy and F1-score (around 1-2%), which suggests that the IRM mechanism is crucial for mitigating the effects of variability across different environments. Its absence leads to slightly less stable performance on some tasks.
- Impact of Swin Transformer Backbone: Replacing the Swin Transformer backbone with a simpler architecture causes the largest performance drop, particularly in the more complex tasks. The decrease in accuracy and F1-score highlights the strength of the self-attention mechanism and hierarchical feature extraction of the Swin Transformer, which allows the model to capture long-range dependencies and contextual information more effectively than simpler architectures.
6. Conclusion
Funding
References
- Jovcic, D.; Ahmed, K. High Voltage Direct Current (HVDC) Transmission Systems; Wiley, 2015.
- Adamson, C.; Hingorani, N.G. High-voltage direct-current power transmission; Garraway, 1960.
- Bu, S.; et al. Feature-based fault detection in converter stations. IEEE Transactions on Industrial Electronics 2017, 64, 7800–7808. [Google Scholar]
- Sun, C.; et al. Hybrid methods for converter station monitoring. Energy Reports 2018, 4, 202–209. [Google Scholar]
- Krizhevsky, A.; Sutskever, I.; Hinton, G.E. ImageNet classification with deep convolutional neural networks. In Proceedings of the NeurIPS; 2012; pp. 1097–1105. [Google Scholar]
- He, K.; Zhang, X.; Ren, S.; Sun, J. Deep residual learning for image recognition. In Proceedings of the CVPR; 2016; pp. 770–778. [Google Scholar]
- Gulrajani, I.; Lopez-Paz, D. In search of lost domain generalization. In Proceedings of the ICLR; 2021. [Google Scholar]
- Arjovsky, M.; Bottou, L.; Gulrajani, I. Invariant Risk Minimization. arXiv preprint arXiv:1907.02893 2019. arXiv:1907.02893 2019.
- Ren, S.; He, K.; Girshick, R.B.; Sun, J. Faster R-CNN: Towards real-time object detection with region proposal networks. In Proceedings of the NeurIPS; 2015; pp. 91–99. [Google Scholar]
- Dosovitskiy, A.; Beyer, L.; Kolesnikov, A.; et al. Image is worth 16x16 words: Transformers for image recognition at scale. In Proceedings of the ICLR; 2020. [Google Scholar]
- Rojas-Carulla, M.; Schölkopf, B.; Turner, R.; Peters, J. Invariant models for causal transfer learning. Journal of Machine Learning Research 2018, 19, 1–34. [Google Scholar]
- Li, Z.; et al. Deep learning-based fault diagnosis in HVDC systems. IEEE Transactions on Power Electronics 2019. [Google Scholar]
- Liu, W.; et al. Image-based fault detection in converter stations using deep learning. IEEE Access 2020. [Google Scholar]
- Li, Y.; et al. Advanced deep learning models for converter station fault detection. IEEE Transactions on Industrial Informatics 2021. [Google Scholar]
- Peng, C.; et al. . Out-of-Distribution Generalization: A Survey. ACM Computing Surveys (CSUR) 2021, 54, 1–35. [Google Scholar] [CrossRef]
- Pearl, J.; et al. Causal Representation Learning: An Overview. arXiv preprint arXiv:2001.09991 2020. arXiv:2001.09991 2020.
- Creager, E.; Jacobsen, J.H.; Zemel, R. Environment inference for invariant learning. In Proceedings of the ICML. PMLR; 2021; pp. 2189–2200. [Google Scholar]
- Krueger, D.; Caballero, E.; Jacobsen, J.H.; Zhang, A.; Binas, J.; Zhang, D.; Le Priol, R.; Courville, A. Out-of-distribution generalization via risk extrapolation (rex). In Proceedings of the ICML. PMLR; 2021; pp. 5815–5826. [Google Scholar]
- Li, H.; Zhang, Z.; Wang, X.; Zhu, W. Learning invariant graph representations for out-of-distribution generalization. NeurIPS 2022, 35, 11828–11841. [Google Scholar]
- Ajra, Y.; Hoblos, G.; Al Sheikh, H.; Moubayed, N. A Literature Review of Fault Detection and Diagnostic Methods in Three-Phase Voltage-Source Inverters. Machines 2024, 12, 631. [Google Scholar] [CrossRef]
- Wu, F.; Chen, K.; Qiu, G.; Zhou, W. Robust Open Circuit Fault Diagnosis Method for Converter Using Automatic Feature Extraction and Random Forests Considering Nonstationary Influence. IEEE Transactions on Industrial Electronics 2024. [Google Scholar] [CrossRef]
- Zhang, Y.; Yang, Q. A survey on multi-task learning. IEEE transactions on knowledge and data engineering 2021, 34, 5586–5609. [Google Scholar] [CrossRef]
- Liu, Z.; Lin, Y.; Cao, Y.; Hu, H.; Wei, Y.; Zhang, Z.; Lin, S.; Hu, H. Swin Transformer: Hierarchical Vision Transformer using Shifted Windows. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV); 2021; pp. 10012–10022. [Google Scholar]


| Task | Number of Images |
|---|---|
| Task 1: Metal Corrosion | 500 |
| Task 2: Silica Gel Discoloration | 500 |
| Task 3: Insulator Breakage | 500 |
| Task 4: Overhead Suspension | 500 |
| Task 5: Valve Cooling Water Leak | 100 |
| Model | Task 1 | Task 2 | Task 3 | Task 4 | Task 5 |
|---|---|---|---|---|---|
| ResNet | 94.0 | 93.2 | 91.5 | 92.0 | 80.0 |
| Swin Transformer | 96.5 | 95.3 | 94.1 | 94.5 | 84.2 |
| IRM | 97.0 | 96.5 | 95.0 | 94.8 | 85.5 |
| InvMOE | 97.5 | 96.8 | 95.6 | 95.1 | 88.0 |
| Model | Task 1 | Task 2 | Task 3 | Task 4 | Task 5 |
|---|---|---|---|---|---|
| ResNet | 93.5 | 92.0 | 90.3 | 90.8 | 75.2 |
| Swin Transformer | 96.2 | 94.4 | 93.0 | 93.2 | 80.1 |
| IRM | 97.1 | 96.4 | 94.9 | 94.7 | 82.5 |
| InvMOE | 97.3 | 96.5 | 95.4 | 94.9 | 87.5 |
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. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).