A Few-Shot Fault Diagnosis Algorithm for Rotating Machinery Based on Time-Frequency Dual-Stream Mamba and Joint Metric Learning
Yan Xu, Boning Wu, Yingnan Gao, Zhenzhen Jin
Rotating machinery plays a critical role in transmission systems, while the scarcity of fault samples and labeled data limits the performance of existing diagnostic methods under few-shot conditions. This paper proposes a few-shot fault diagnosis method for rotating machinery based on a time-frequency dual-stream Mamba architecture and joint metric learning. Raw vibration signals and multi-scale short-time Fourier transform time-frequency views are constructed to characterize transient impacts and frequency-band energy distributions from complementary perspectives. A dual-stream feature extraction network is developed, where the time-domain branch captures impulsive fault patterns, and the time-frequency spatial Mamba and channel attention branches extract spatial dependencies and fault-sensitive responses. Moreover, a hierarchical selective fusion mechanism is introduced to adaptively integrate complementary features across different domains. Finally, a covariance-based joint metric learning module is designed to model class distributions using second-order statistics of support samples and classify query samples through local similarity aggregation. Experimental results show that the proposed method consistently outperforms comparison methods under different rotational speeds, training sample scales, and 8-way 1-shot/5-shot tasks, validating its effectiveness and robustness for few-shot rotating machinery fault diagnosis.