Semi-supervised Vision Transformer with Contrastive Learning and OOD Filtering for Fault Diagnosis of Rotating Machinery
摘要
Semi-supervised learning has emerged as a promising paradigm for rotating machinery fault diagnosis with limited annotations. However, real world industrial scenarios are inevitably plagued by severe class imbalance and the emergence of out-of-distribution (OOD) faults, which significantly undermine the reliability of standard SSL methods. Existing approaches often implicitly assume balanced distributions or closed-set conditions, leading to biased predictions and confident errors on unknown faults. To bridge this gap, this paper proposes SemiViT-CL, a unified semi-supervised framework that integrates a Vision Transformer (ViT) backbone with contrastive learning to ensure robust diagnosis under such complex conditions. Specifically, we introduce a class-progress-aware pseudo labeling strategy that dynamically calibrates confidence thresholds to mitigate the bias toward majority classes. Furthermore, to prevent the model from overfitting to OOD samples, we design a consistency-guided OOD filtering mechanism, which leverages the discrepancy between weak and strong augmentations to detect and reject unknown faults effectively. Extensive experiments on the SEU and PU benchmarks demonstrate that SemiViT-CL outperforms state-of-the-art methods, achieving an average accuracy of