Skip to Content
SensorsSensors
  • Article
  • Open Access

20 November 2026

22 Pages

A Lightweight and Robust Bearing Fault Diagnosis Model Integrating Long-Term Memory and Multi-Attention Mechanisms

,
,
and
1
School of Artificial Intelligence, Taizhou University, Taizhou 318000, China
2
School of Computer Science and Artificial Intelligence, Hubei University of Technology, Wuhan 430068, China
3
School of Computer Science, Wuhan Donghu University, Wuhan 430212, China
*
Author to whom correspondence should be addressed.
This article belongs to the Section Fault Diagnosis & Sensors

Abstract

Accurate bearing fault diagnosis under strong noise interference and limited training data remains challenging, particularly when computational resources are constrained. Existing methods often struggle to capture long-range dependencies while preserving informative features during multilevel extraction, and complex attention architectures can introduce substantial computational overhead. To address these challenges, this study proposes a lightweight and robust bearing fault diagnosis model integrating long-term memory and multiple attention mechanisms. A long-term memory pathway is introduced to retain informative features across successive extraction stages and mitigate feature attenuation. A multilevel shared-attention feature extractor computes an attention matrix from the main channel and reuses it across the remaining channels to enhance cross-channel feature correlations and improve robustness to noise interference. Convolutional and causal attention modules are further combined to capture local fault patterns and long-range temporal dependencies efficiently. Experiments on the CWRU and JNU bearing datasets evaluate the model under different noise levels and training-set sizes. With 0.073 million parameters and 11.308 million FLOPs, the proposed model achieves 82.5% accuracy on the CWRU dataset at a signal-to-noise ratio of −10 dB. The results demonstrate improved diagnostic performance over the compared methods under noisy and limited-data conditions while maintaining low computational complexity.

1. Introduction

Early fault diagnosis methods were chiefly predicated on physical modeling or signal-processing techniques, frequently entailing the utilization of expert a priori knowledge for feature screening [1]. These methods generally necessitate a profound comprehension of the internal architecture of the equipment, consequently constraining their practical application in industrial real-world scenarios [2]. In recent years, the emergence of data-driven technologies, such as deep learning, has led to the development of intelligent diagnostic methods. These methods are capable of automatically extracting features without relying on prior knowledge, and they have gradually become the mainstream direction of research [3].
In comparison with conventional machine learning methodologies, deep learning has been shown to markedly reduce the reliance on a priori knowledge and possesses the capacity to automatically learn effective features from complex data [4]. In this context, convolutional neural networks (CNNs) [5] and their variants are employed extensively for the efficient extraction of local details and spatial patterns in vibration signals, a process facilitated by the structural properties of local connectivity and weight sharing. For instance, Cai et al. [6] proposed an integrated dilated convolutional neural network framework for the purpose of obtaining feature responses at different scales by fusing multiple 1D CNN sub-networks with different dilation rates. However, CNNs are challenging to directly model global dependencies across long distances in long sequences due to their local receptive field limitations. In contrast, the attention mechanism [7] is able to capture long-range correlations between sequence elements through dynamic weight assignment, thus achieving global focus on critical information. For instance, Liu et al. [8] enhanced the diagnostic robustness and accuracy of deep learning models under noise interference by introducing a multi-attention mechanism to achieve enhanced attention to key signals. Xu et al. [9] proposed LTFAFormer, a lightweight time–frequency dual-channel Transformer for noise-robust bearing fault diagnosis. In recent years, researchers increasingly combine CNNs with attention mechanisms to balance local feature extraction. The combination aims to construct model architectures that are more expressive and computationally efficient. For instance, Feng et al. [10] improved diagnostic performance by using an attention mechanism to enhance key fault feature weights after multi-scale convolutional feature extraction. However, the majority of extant methods are deficient in their failure to adequately integrate the domain with prior and analytical properties of sensor signals. Moreover, these methods frequently employ the global attention mechanism [11], which disregards the intrinsic temporal structure and local correlation of signals, whilst concomitantly introducing a high computational overhead. Furthermore, the extant research on the multi-stage feature extraction process of long sequence sensor signals is deficient in its provision of an effective solution mechanism for the inevitable feature transfer attenuation and information forgetting problem [12]. Concurrently, the prevalence of noise interference in industrial sites engenders further challenges to the practical deployment of fault diagnosis models [13].
In industrial environments, acoustic interference, commonly referred to as industrial noise, arises from a variety of sources, including equipment, operational processes, and environmental factors. This noise encompasses a wide frequency range: high-frequency components typically result from mechanical friction or electronic artifacts, which can mask subtle fault signatures. In contrast, low-frequency disturbances are often caused by resonance or environmental vibrations. [14]. Such conditions severely compromise generalization and accuracy. While previous studies suggest that scaling up model complexity can mitigate these effects [15,16], this strategy introduces deployment bottlenecks. Specifically, resource-constrained industrial scenarios with strict real-time demands often struggle to accommodate computationally heavy models [17]. Consequently, there is an urgent need for an innovative architecture that balances robustness against complex noise with computational efficiency.
In recent years, researchers have proposed various attention-based robust diagnosis strategies to enhance this field. For instance, Siddique et al. [18] proposed a hybrid deep learning framework that combines continuous wavelet transform, multi-head self-attention and a bidirectional long short-term memory (BiLSTM) [19] network with a convolutional residual network for bearing fault diagnosis. This approach enhances spatial–temporal feature extraction capabilities via multi-head attention and demonstrates robust performance in non-stationary vibration signals. However, this method still relies on a Transformer structure with a BiLSTM module, which increases model complexity and poses challenges for real-time deployment. In addition, Tian et al. [20] proposed Wavelet SANet, an anti-noise fault diagnosis network based on wavelets and self-attention. This network suppresses noise interference by fusing frequency- and time-domain attentional mechanisms. Its anti-noise performance advantages were verified on multiple bearing datasets. However, this method primarily focuses on frequency-domain noise suppression and is limited in its ability to model long-term timing information dependencies. Additionally, the Transformer component incurs significant computational overhead. Duan et al. [21] proposed BEAM-Net, a lightweight bearing fault diagnosis network integrating spectral trend decomposition, residual gating, and weighted convolution. This work highlights the value of compact spectral feature processing for noise-robust diagnosis.
Although current methods have improved anti-noise diagnostic performance to some extent, they generally have the following problems: (1) Multi-scale feature extraction-based methods are prone to feature forgetting when dealing with sensor vibration signals involving obvious temporal and long-term sequences. It is also difficult to capture long-term dependencies efficiently. (2) Existing CNN attentional fusion strategies mainly focus on local-scale feature enhancement. It is therefore difficult to take into account global long-term information and fine-grained local features. (3) Complex attentional structures and multi-module combinations lead to high model complexity. This is not conducive to real-time deployment in industrial sites.
To address these challenges, this study develops a compact bearing fault diagnosis architecture that coordinates multiscale feature extraction, attention-based feature refinement, and cross-stage information transfer. The main contributions are as follows:
  • A multilevel channel-sharing attention feature extractor combines multiscale convolution with attention reuse across temporal resolutions. Query–key attention is computed at the primary resolution, and pooled, row-normalized versions are reused at coarser resolutions with level-specific value projections. This design avoids independently constructing query–key attention at every level while retaining distinct feature transformations across scales.
  • A backbone integrates parallel convolutional channel attention and causal temporal attention with a long-term feature pathway. The attention branches provide complementary channel and temporal feature refinement, while the feature pathway carries earlier-stage representations into subsequent processing. Their combination is designed to support feature selection and information retention across extraction stages.
  • A compact end-to-end architecture couples the shared-attention extractor and memory-assisted backbone with a grouped MLP classifier. Attention reuse and grouped feature transformations control computational and parameter overhead at different stages.
This study analyzed two distinct sets of experimental data, demonstrating that the proposed method successfully reduces reliance on samples and enhances the ability to extract features under various conditions.

3. Method

The model proposed in this study comprises three key components. Firstly, the Multi-level Channel-Sharing Attention Feature Extractor (MCSAFE, see Figure 2) converts the input sensor signals into effective feature maps for subsequent processing. The core module is constituted by a three-stage CBAM architecture attention neural operator (see Figure 3), which has been demonstrated to significantly enhance the extraction of critical information in diagnostic tasks by precisely capturing and amplifying key features. In conclusion, the classifier’s function is to combine feature information from all stages to produce the final result for fault diagnosis. The design of this classifier is based on a grouped multi-layer perceptron, which amplifies key features effectively. The structural scale of the proposed model and detailed output information for each module are shown in Table 1. The components are organized around complementary requirements of vibration signal classification. Multiscale convolution extracts local patterns over different receptive fields, while shared attention introduces dependencies across temporal resolutions without independently computing query–key attention at every level. The backbone subsequently refines channel and temporal responses, and its long-term pathway provides an additional route for transferring features across stages. Finally, grouped linear transformations constrain the classifier parameter count. This organization combines multiscale feature extraction, attention-based refinement, and cross-stage feature propagation in a compact architecture.
Figure 2. Multi-Layer channel-sharing attention feature extractor.
Figure 3. Convolutional attention module.
Table 1. Scale of our model architecture.
In the table, “Embedding” refers to the method of encoding sensor signals into feature maps. MCSAFE i denotes the frequency feature extracted using MCSAFE with range i. Module i → j indicates the channel dimension transformation from i to j using this module. SC represents the optimized separable convolutional block.

3.1. Multi-Layer Channel-Sharing Attention Feature Extractor

The objective of this study is to tackle a significant challenge in learning feature representations for one-dimensional vibration signals. This challenge involves the effective extraction and fusion of multi-scale discriminative features while ensuring model compactness. Existing approaches typically treat the design of multi-receptive fields and global modeling as two relatively independent stages. This separation leads to inconsistent and uncoordinated features across different scales, which, in turn, compromises the model’s resilience in complex and noisy environments. In this paper, we propose a novel solution: the Multi-level Channel-Shared Attention Feature Extractor (MCSAFE). The core idea of this module is to unify multi-scale feature extraction and cross-scale dependency modeling within a single, end-to-end learnable attention architecture. Our findings demonstrate that a shared attention mechanism facilitates the simultaneous extraction of local features at various scales while establishing real-time global semantic correlations across these scales. This approach is crucial for achieving multi-level enhancement and intrinsic alignment of the original signal. The functionality of the MCSAFE module is characterized by the generation of a multi-channel feature tensor that exhibits a well-defined structural arrangement and a strong discriminative capacity. This design enhances the extraction process and improves overall performance.
Specifically, let the sensor-collected input be X ∈ R B × 1 × L , where B denotes the batch size and L denotes the sequence length. MCSAFE comprises two parallel paths: the multi-sensory field feature enhancer (MSFE) and the channel-shared attention feature extractor (CSAFE). The final output is obtained through element-wise fusion of these two components:
F out = MSFE X + CSAFE X ∈ R B × C × L
where C denotes the number of output channels.
To extract information from different receptive-field ranges, the MSFE branch is composed of C parallel one-dimensional convolutions. In the i-th branch, a kernel with width k i is adopted, and the padding is selected such that the output sequence length is unchanged. Afterward, the outputs of all branches are stacked by concatenation in the channel dimension to produce a unified multi-scale feature map. Furthermore, a learnable parameter vector w = [ w 1 , … , w C ] is used to dynamically balance the influence of features from different scales. The MSFE module is formulated as follows:
F mfe = δ GELU Concat i = 1 C Conv1D k i X ⊙ w
where δ ( · ) denotes the normalization layer and ⊙ represents the multiplication of elements by channel. The activation function GELU ( x ) ≈ 0.5 x 1 + tanh 2 π x + 0.044715 x 3 enables the network to automatically select more efficient scale responses during end-to-end training. By stabilizing feature distributions through nonlinearity and normalization, this design yields robust multi-scale enhanced representations. Rotational-speed changes alter the temporal spacing and frequency components of periodic fault signatures. MSFE employs convolutional kernels of different widths to extract features over multiple time intervals, providing complementary temporal contexts for characterizing these signatures under the evaluated operating conditions.
The CSAFE path aims to introduce global dependency modeling across multiple hierarchical scales while controlling computational overhead. To achieve this, a sequence of length L is rearranged into a two-dimensional structure across C levels satisfying T i · F i = L for i = 0 , 1 , … , C − 1 , where T i denotes the time step, F i represents the feature dimension per segment, and the reordered tensor at the i-th level is denoted as X ( i ) ∈ R B × T i × F i .
The key to CSAFE lies in explicitly computing self-attention only at the highest temporal resolution level i = 0 to obtain the shared attention matrix A 0 ∈ R B × T 0 × T 0 , thereby avoiding the computational overhead of repeatedly computing Q/K across all levels:
A 0 = softmax X 0 W 0 Q X 0 W 0 K ⊤ d , Y 0 = A 0 X 0 W 0 V W 0 O
where d is the dimension of the attention latent space, and W 0 Q , W 0 K , W 0 V , W 0 O are the linear projection parameters. Subsequently, for the remaining levels i ≥ 1 , the shared attention structure is reused: A 0 is downsampled via 2D average pooling to obtain the attention matrix A i ∈ R B × T i × T i matching the target level, followed by row normalization to preserve the probabilistic meaning of attention weights. Each level uses its own value and output projections without recomputing query–key attention:
A i = RowNorm Down A 0 ; i , Y i = A i X i W i V W i O , i = 1 , … , C − 1
where Down ( · ; i ) denotes the downsampling operator for the i-th level and RowNorm ( · ) represents normalization along the last dimension. Average pooling aggregates neighboring attention entries along the query and key axes, followed by row-wise normalization to obtain coarse-grained temporal relationships. With aligned temporal grouping and locally consistent attention relationships, the pooled attention matrices summarize dependencies between temporal groups at coarser resolutions. Each level retains its own value and output projections to construct scale-specific representations. The finest-resolution attention output is retained and combined with the coarse-scale outputs, while the parallel MSFE branch provides local convolutional features. This arrangement combines coarse temporal context with fine-scale responses for fault characterization. Finally, the outputs Y ( i ) from each level are transformed to dimension L and stacked along the channel dimension to yield the CSAFE output:
F afe = Stack i = 0 C − 1 Reshape Y i ∈ R B × C × L
The final MCSAFE features fuse the multiscale convolutional representation with the shared-attention representations. The convolution branch extracts local patterns at different receptive fields, while the attention branch supplies approximate cross-scale temporal relationships without independently computing query–key attention at every level. Reusing the primary attention matrix avoids recomputing query–key attention at the coarser levels. Each level still performs its own value projection, attention-weighted aggregation, and output projection.

3.2. Convolutional Attention Module

In feature representation for fault diagnosis, channel dimensions often encapsulate response information across different frequency bands, scales, or semantics. Reasonably mining inter-channel correlations helps highlight discriminative channels while suppressing redundant and noisy ones. Traditional attention mechanisms typically model channel dependencies globally through fully connected mappings. However, in feature maps reconstructing one-dimensional signals, channel correlations often exhibit pronounced locality: adjacent channels are more likely to share similar response patterns. Therefore, this study employs a convolutional approach to model local interactions within the channel dimension, enabling adaptive allocation of channel attention with lightweight parameters.
Figure 3 illustrates the convolutional attention module proposed in this study. Given an input feature tensor X ∈ R B × C × H × W , its spatial dimensions are first flattened to obtain a sequence feature X s = Reshape X ∈ R B × C × L , with L = H · W . Next, a one-dimensional convolution with kernel size k is performed along the channel axis to model local channel correlations. By aggregating neighboring channel responses within a local window, this operation generates the convolutionally enhanced sequence representation U = Conv1D k X s + X ∈ R B × C ′ × L , where C ′ is the number of output channels.
In terms of implementation, the convolution operation does not rely on explicitly fully connected layers, and the parameter scale is linearly related to the convolution kernel size k. This is more conducive to lightweight deployments compared to the global coupling of fully connections. Subsequently, the U is fed into subsequent attention or normalized nonlinear modules to obtain a more stable and discriminative representation of the channel enhancement.

3.3. Causal Multi-Head Attention Module

For temporal feature modeling in fault diagnosis, signal evolution naturally follows a causal order, meaning that the state at each time step depends only on the present and the past. If the conventional self-attention mechanism is directly adopted for global feature aggregation, information from future positions may be introduced into the representation of the current step. Such information leakage violates the causal consistency required between training and inference and may further degrade the model’s generalization ability. To address this issue, a Causal Multi-head Self-Attention Module (CMSA) is developed in this work. By imposing a strict causal mask during the computation of attention weights, each position is allowed to attend only to itself and preceding positions, thereby satisfying the temporal causality constraint. In addition, the multi-head design projects channel features into several parallel subspaces, which improves the capability of the model to capture diverse temporal dependency patterns while keeping the computational cost manageable.
The architecture of the proposed CMSA module is shown in Figure 4. Let the input feature tensor be denoted by X ∈ R B × C × H × W , where B is the batch size and C is the number of channels. To perform temporal modeling, the spatial dimensions are first flattened, yielding the sequence length L = H × W . The feature tensor is then reshaped into a sequence representation X s = Reshape ( X ) ∈ R B × L × C . Based on this sequence form, the query, key, and value matrices are obtained through linear projections, i.e., Q = X s W Q , K = X s W K , and V = X s W V , where W Q , W K , W V ∈ R C × C are learnable parameter matrices. To realize multi-head attention, the channel dimension is evenly split into h heads, and the feature dimension of each head is defined as d h = C / h . For each head, scaled dot-product attention is calculated separately. Meanwhile, a causal mask matrix M ∈ R L × L is introduced to block future positions, where M t , τ = − ∞ for τ > t and M t , τ = 0 otherwise. In this way, the attention aggregation satisfies the causality constraint and can be expressed as follows:
Attn j X s = softmax Q j K j ⊤ d h + M V j , j = 1 , … , h
where Q j , K j , V j ∈ R B × L × d h denote the query, key, and value tensors of the j-th head.
Figure 4. Causal multi-head self-attention module.
This constraint ensures that the output of the t-th position in the sequence depends only on the historical and current information of 1 , 2 , … , t , thus satisfying the causal modeling requirements. Subsequently, the outputs of each attention head are spliced in the channel dimension and linearly mapped to obtain the multi-head output:
Y a = Concat j = 1 h Attn j X s W O
where W O ∈ R C × C is the output projection matrix. Finally, to stabilize the training and enhance the nonlinear representation, the output is processed via regularization δ ( · ) and activation ϕ ( · ) , and then restored to the original 2D structure as Y map = Reshape − 1 ϕ δ ( Y a ) ∈ R B × C × H × W .
The convolutional attention module has been demonstrated to highlight the correlation modeling capability of the nearest-neighbour channels by introducing local windowed convolutional interactions in the channel dimension. This enhancement in the local discriminative properties of the features is achieved by suppressing the redundant noise response with low parameter overhead. Furthermore, the causal multi-head attention module has been shown to achieve global timing dependency aggregation across locations under causal mask constraints. This has been demonstrated to both avoid future information leakage and capture long-range evolutionary patterns. Consequently, this results in the final front-end features being both locally robust and globally timing consistent.

3.4. Architectural Design of Backbone Modules

In the CBAM, channel and spatial attention modulate features sequentially through successive layers. The computational process can be expressed as follows: CBAM X = Z ⊙ Y ⊙ X , where Y represents the channel attention weights (i.e., Y ∈ R B × C × 1 × 1 ), Z represents the spatial attention weights (i.e., Z ∈ R B × 1 × H × W ), and X denotes the input feature. The serial modulation mechanism necessitates two element-wise multiplication operations on the input, exhibiting a computational complexity that approaches 2 × B × C × H × W . Through the restructuring of the fusion order of the two attention types to Z ⊙ Y ⊙ X , it is possible to integrate spatial and channel attention prior to modulation, thereby forming a unified attention mask. This results in a reduction in the number of element-wise modulations on the input to a single operation. This approach reduces the modulation stage complexity to 1 × B × C × H × W , thereby reducing the theoretical computational load by approximately half without compromising attention representation capabilities. Consequently, the substitution of serial attention branches with a parallel fusion structure in module design results in a substantial reduction in computational overhead during inference and an enhancement in model operational efficiency.
As illustrated in Figure 5, this paper proposes the convolutional attention module (CAM) and the causal multi-head attention module (CMAM) as two parallel branches. The output from the preceding layer is utilised as the shared input for both branches, thereby facilitating complementary modeling of channel-wise local interactions and temporal global dependencies.
Figure 5. Backbone module structure.
Furthermore, given the potential variability in the amplitude distribution of attention responses across various stages and operating conditions, this paper proposes a learnable layer scaling mechanism [33] to recalibrate the dual-branch attention outputs, thus enhancing the module’s adaptability to shifts in input data distributions. The module input is defined as X ∈ R B × C × H × W , where CAM ( X ) and CMAM ( X ) represent the outputs of CAM and CMAM, respectively. The scaled attention features can then be expressed as follows:
Y ca ′ = α · CAM X + b , Y cm ′ = α · CMAM X + b
where α and b are learnable scaling and translation factors. By applying learnable affine transformations to parallel branch outputs, the attention operator can adaptively learn appropriate response scales during training, enhancing the stability and effectiveness of feature modulation. Therefore, the joint attention feature map W cs of the backbone module adopts the following fusion strategy:
W cs = Y ca ′ ⊙ Y cm ′
where ⊙ denotes element-wise multiplication, used to highlight key regions and key channels where both types of attention consistently emphasized, while suppressing inconsistent redundant responses.
The long-term memory pathway carries earlier-stage features forward during the processing of each input sample, providing a depth-wise information route that complements the current-stage attention features. Channel and spatial dimensions are matched through the inter-stage point-wise convolution and pooling operations shown in Figure 5 before feature fusion. The long-term memory input is denoted by X L ∈ R B × C × H × W , while the short-term feature of the current stage is represented by X ∈ R B × C × H × W . Based on this design, the backbone output is given by:
Y L = X L + X , Y = PWC ( Concat [ W cs + Y L , Y L ] ) + X
where Y L denotes the updated memory representation and Y denotes the current-stage output. Y L is fused with W cs and enters the channel-wise concatenation directly. The point-wise convolution (PWC) maps the concatenated 2 C channels back to C channels, and the final addition of X forms a local residual connection. This structure combines carried features, attention-refined features, and the current-stage input. Through the combination of the CAM-CMAM dual-attention structure and the long-term memory mechanism, the backbone module can simultaneously model local channel correlations, global temporal relationships, and information transfer across different stages while introducing only a small computational burden. This design therefore improves the robustness and discriminative ability of the learned fault features.

3.5. Classifier

A grouped MLP is used for classification. The input features are divided into groups and transformed separately before being concatenated and mapped to the diagnostic classes.
Specifically, let the features obtained by global average pooling be x ∈ R B × N , which are uniformly divided into k groups along the feature dimensions, each of which is x i ∈ R B × ( N / k ) i = 1 , 2 , … , k . Each group is linearly transformed separately:
L i ( x i ) = x i W i ⊤ + b i
where W i ∈ R ( 2 N / k ) × ( N / k ) is the grouping weight matrix. The output of each grouping is spliced by batch normalization with GELU activation function to get the hidden layer representation:
Y H = GELU BN Concat L 1 ( x 1 ) , L 2 ( x 2 ) , … , L k ( x k )
Eventually, the diagnostic results are output through a global fully connected layer calculated as Y out = Y H W out ⊤ + b out , where W out ∈ R D × 2 N denotes the output layer weight matrix and D represents the number of fault categories.
In comparison with the parameter scale 2 N ( N + D ) of the conventional two-layer MLP, the proposed grouped MLP classifier possesses a parameter count of approximately 2 N ( N k + D ) . Considering the linear weight matrices, grouping reduces the parameter count by 2 N 2 ( 1 − 1 / k ) compared with the corresponding dense MLP.

4. Case Study

4.1. Case 1: Fault Diagnosis Testing with High Noise and Few Samples Using CWRU Dataset

4.1.1. Data Preparation of Case 1

As a representative benchmark in bearing fault diagnosis, the Case Western Reserve University (CWRU) dataset has been extensively used in related studies [34,35]. In addition, three defect diameters are considered for each fault type: 0.007, 0.014, and 0.021 inches, corresponding to 0.1778, 0.3556, and 0.5334 mm, respectively. The bearing conditions are organized into four groups: the healthy condition (Normal), ball fault (BO), inner race fault (IR), and outer race fault (OR). Each fault group includes three defect diameters: 0.007, 0.014, and 0.021 inches, corresponding to 0.1778, 0.3556, and 0.5334 mm, respectively. Each fault type–diameter combination is assigned a distinct class label, while the healthy condition constitutes one additional class. Therefore, the experiment involves ten diagnostic classes: one healthy class and nine fault classes. The four motor load levels represent operating conditions within each class and do not introduce additional class labels.
A major advantage of the CWRU dataset is that its original signals are collected under relatively clean conditions, with limited background noise. This characteristic allows researchers to flexibly construct more complex diagnosis scenarios by injecting additional noise of different strengths or statistical properties. As a result, the dataset has long served as a common benchmark for performance comparison in bearing fault diagnosis studies. For each combination of diagnostic class and motor load, one original single-channel vibration recording was used. Each recording was split chronologically at 70% and 90% of its length. The first 70% was used for training, the next 20% for validation, and the final 10% for testing. Sliding windows of 1,024 sampling points were generated independently within each portion with a stride of 512 sampling points (50% overlap). No window crossed a split boundary. For each class–load combination, 35, 10, and 5 windows were used for training, validation, and testing, respectively, as shown in Table 2.
Table 2. Division of the CWRU dataset.
For robustness verification, each sample is corrupted by additive Gaussian white noise at five SNR levels, namely − 10 dB, − 8 dB, − 4 dB, 0 dB, and 4 dB. Additional tests use pink noise and Laplace noise at an SNR of 0 dB to extend the evaluation to colored and non-Gaussian noise conditions.
SNR dB = 10 · log 10 P signal P noise
where P signal indicates the effective power of the input signal, and P noise represents the power of the added random noise.

4.1.2. Result Analysis of Case 1

In order to systematically evaluate the diagnostic effectiveness of the proposed approach, five end-to-end fault diagnosis baseline models are selected for comparison: MANANR [36], CLFormer [37], MGE [38], LTFAFormer [9], and Transformer [7]. MANANR, MGE, CLFormer, and LTFAFormer provide task-specific comparisons, while Transformer serves as a general attention-based baseline. An additional control, Transformer-PM, is constructed by reducing the number of Transformer encoder layers to obtain a parameter scale comparable to that of the proposed model. Baseline models without publicly available implementations were reimplemented based on their original papers. For each dataset, all compared models used the same data splits, training budget, and evaluation protocol. The experiments were conducted using an NVIDIA GeForce RTX 4090 GPU.
In order to reduce the chance effects of random initialization and training fluctuations, all comparison experiments were repeated five times independently under the same configuration; the training process of each experiment was fixed at 300 epochs. In the proposed optimization strategy, AdamW is selected as the optimizer, and the gradient is calculated using the cross-entropy loss function for parameter updating. Simultaneously, the cosine annealing learning rate scheduling is introduced in order to dynamically adjust the learning rate, i.e., lr = min_lr + 0.5 · max_lr − min_lr · 1 + cos epoch num_epochs π .
As shown in Figure 6 and Table 3, diagnostic accuracy generally decreases as the SNR decreases. The proposed model achieves the highest accuracy among the compared methods across all five SNR levels. Under relatively mild noise conditions, its accuracy reaches 99.2% at 4 dB and 97.3% at 0 dB. As noise intensity increases, the accuracy decreases to 89.3% at − 8 dB and 82.5% at − 10 dB. These results demonstrate that the proposed model maintains comparatively high diagnostic accuracy even when vibration signals are subject to strong noise interference.
Figure 6. Comparison of the accuracy of various models in the same noise environment.
Table 3. Diagnostic accuracy of the compared methods under different noise conditions.
The mean accuracy over the four SNR settings of − 10 , − 8 , − 4 , and 0 dB is 90.65% for the proposed model, compared with 69.57–87.57% for the other methods in Table 3. LTFAFormer gives the highest baseline mean of 87.57%, leaving a difference of 3.08 percentage points. At 0 dB, the proposed model achieves 98.51% accuracy under pink noise and 85.74% under Laplace noise, compared with 97.85% and 84.83% for LTFAFormer.
As shown in Figure 7 and Table 3, the proposed model achieves a mean accuracy of 90.65% under SNR ≤ 0 dB, with 0.073 million parameters and 11.308 million FLOPs. On the NVIDIA GeForce RTX 4090, its single-sample inference time is approximately 1.17 ms. Among the compared methods, CLFormer has the lowest latency of 0.06 ms, while Transformer has the highest latency of 4.10 ms. Compared with Transformer, the proposed model reduces inference latency by 71.46%, demonstrating a favorable balance between diagnostic accuracy and inference efficiency. Reducing the encoder depth lowers the mean accuracy of Transformer from 74.56% to 69.57% under SNR ≤ 0 dB. At a comparable parameter scale, the proposed model achieves 90.65%, exceeding Transformer-PM by 21.08 percentage points and maintaining its diagnostic accuracy advantage in the parameter-matched comparison.
Figure 7. Comparison of model accuracy and computational resource consumption in high-noise environments.
In order to further analyze the category discrimination details of each method under strong noise interference, this study plots the confusion matrix under the condition of strong noise environment and compares the classification results of different models, as shown in Figure 8. As is evident from the overall distribution, the prediction results of the proposed methods are primarily concentrated on the diagonal, and the recognition rates of the majority of categories are maintained above 90%, indicating that the models retain the capacity to extract more stable discriminative features under conditions of significant noise. In contrast, the remaining methods demonstrate a more dispersed array of off-diagonal terms across multiple categories. A notable conflation of low-numbered categories with certain analogous fault categories is evident, signifying that their capacity for feature separation is inadequately optimized in environments characterized by substantial noise.
Figure 8. Confusion matrix of model prediction results in high-noise environments.

4.2. Case 2: Fault Diagnosis Evaluation Using the JNU Dataset

4.2.1. Data Preparation of Case 2

The JNU bearing dataset, published by Jiangnan University, is a publicly accessible benchmark for bearing fault diagnosis [39]. The vibration signals were collected at a sampling rate of 50 kHz and cover four operating states, including the healthy condition and three common fault categories: rolling element fault, inner race fault, and outer race fault. Unlike datasets that provide multiple defect sizes for each fault type, JNU assigns only one defect size to each fault category. The JNU dataset contains vibration signals recorded at three discrete shaft speeds: 600, 800, and 1000 rpm. At each speed, the raw signals were partitioned into disjoint portions before sliding-window segmentation. Data from all three speeds were represented in the training, validation, and test subsets, with the window counts following a 7:2:1 ratio at each speed, as shown in Table 4.
Table 4. Numbers of training, validation, and test samples at different rotational speeds in the JNU dataset.

4.2.2. Result Analysis of Case 2

The JNU experiments use the five original baseline models introduced in Section 4.1.2. In order to ensure the comparability of experimental settings, it was necessary to undertake 200 epochs of each training session. All other training strategies and parameter configurations were adopted from Case 1.
With regard to the evaluation metrics, in addition to overall accuracy, this paper further introduces precision and recall to complement the assessment of model performance. Precision is defined as the proportion of samples correctly classified as positive among those predicted as positive by the model, thereby reflecting false positives. The recall metric is defined as the proportion of all true positive samples that are correctly detected, thus indicating the extent to which positive instances were missed. The corresponding definitions are as follows:
Precision = TP TP + FP , Recall = TP TP + FN
where TP denotes true positive, FP denotes false positive, and FN denotes false negative.
Figure 9 summarizes the average accuracy, precision and recall of each method. The results show that the proposed model in this study achieves the optimal performance in all three indicators, with an average accuracy of 96.20%, an average precision of 96.80%, and an average recall of 95.90%, which is better than the rest of the comparative methods as a whole, indicating that the method of this paper has a more stable recognition performance and a better comprehensive discriminative capability under the dataset and experimental settings.
Figure 9. Test results of each method on the JNU dataset.
In order to evaluate the feature extraction and characterization ability of each method, this study adopts t-SNE to downscale the high-dimensional features for visualization, and the results are shown in Figure 10. As is evident from the visualized distributions, the features extracted by the model proposed in this study demonstrate enhanced separability between different classes, characterized by compact intra-class sample aggregation and relatively clear inter-class boundaries, reflecting strong discriminative ability. In contrast, the feature distributions obtained by the remaining comparison methods exhibit varying degrees of overlap, and samples from different health states are challenging to adequately differentiate.
Figure 10. Visualization of the feature extraction capability of each model using T-SNE technique.
To further assess the performance of the proposed approach in small-sample conditions, experiments were conducted using reduced proportions of the full training set. As reported in Table 4, each class at each rotational speed contains 350 training samples, which constitute the 100% training-set setting. The reduced-data experiments retained 50%, 25%, and 5% of this training subset, respectively. The following analysis compares performance across these training-set proportions.
As shown in Figure 11, when the training set is sufficiently large, all models achieve consistently high recognition accuracy. After the training data are reduced to 50% of the original scale, the performance of different methods declines at varying rates; nevertheless, the proposed approach still preserves an accuracy above 94%, whereas several baselines exhibit a more noticeable drop. When only 25% of the training samples are retained, the performance gap among methods becomes more apparent: most competing methods fall to around 80% or even lower, while the proposed method remains close to 90%. The most severe degradation occurs under the smallest-sample setting. In this case, the accuracies of the comparison methods drop to approximately 40–70%. Transformer suffers the largest reduction, reaching only 42.29%, while MGE and CLFormer both decrease to below 57%. In contrast, the proposed method still achieves 76.71% accuracy, which is substantially higher than the results of the other approaches. These observations suggest that the proposed method exhibits a slower performance decay and stronger robustness in small-sample scenarios.
Figure 11. Test accuracy with different training-set proportions.

5. Conclusions

In this paper, an end-to-end diagnostic model integrating long-term memory and multiple attention mechanisms is proposed to address the requirements for mechanical fault diagnosis in conditions of strong noise and limited data. Firstly, a feature channel with long-term memory capability is constructed to retain historical key information during multilevel feature computation. This is done in order to mitigate information loss and feature decay. Secondly, a multilevel channel shared-attention feature extractor is proposed to generate the attention matrix from the main channel and share it among channels. This is done to achieve explicit modeling of cross-channel correlation and to improve the perception and suppression of multi-frequency-domain noise. Finally, the parallel branches of convolutional and causal attention are introduced to model local fine-grained features and long-range global dependencies, respectively, so that local pattern expression and temporal correlation depiction can be optimized under a unified framework while avoiding the high computational burden of a single global attention. The experimental results demonstrate that the proposed method maintains a more stable diagnostic performance under different noise levels, especially when the training samples are significantly reduced, and still maintains a higher accuracy rate. The proposed model achieves a favorable balance between diagnostic accuracy and computational complexity under the evaluated noise and reduced-training-data conditions.The effect of continuously varying shaft speed on diagnostic performance was not evaluated. Future work will examine whether order tracking improves diagnostic performance under such conditions. In addition, generalization to unseen operating conditions remains to be assessed using a leave-one-group-out protocol.

Author Contributions

Conceptualization, M.Z. and L.Z.; methodology, M.Z. and Y.Y.; software and validation, Y.Y. and Z.X.; writing—original draft preparation, M.Z. and Z.X.; writing—review and editing, all authors; supervision, L.Z. All authors have read and agreed to the published version of the manuscript.

Funding

This study was supported by the Hubei Provincial Science and Technology Program Project (2023BEB024).

Institutional Review Board Statement

Not applicable.

Data Availability Statement

The datasets used and analyzed during the current study are available from the corresponding author upon reasonable request.

Acknowledgments

During the preparation of this manuscript, the authors used ChatGPT (OpenAI, GPT-6.1 Sol) to assist with translation and English-language editing. The authors have reviewed and edited the output and take full responsibility for the content of this publication.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Gao, Z.; Cecati, C.; Ding, S.X. A survey of fault diagnosis and fault-tolerant techniques—Part I: Fault diagnosis with model-based and signal-based approaches. IEEE Trans. Ind. Electron. 2015, 62, 3757–3767. [Google Scholar] [CrossRef] [Scilit]
  2. Jiang, R.; Fang, F.; Rodríguez-Andina, J.J.; Song, Z.; Liu, J.; Chen, Y.; Wang, H. Artificial intelligence in wind turbine fault diagnosis: A systematic knowledge mapping and trend analysis. Renew. Sustain. Energy Rev. 2026, 226, 116321. [Google Scholar] [CrossRef] [Scilit]
  3. Xu, Z.; Jia, Z.; Wei, Y.; Gao, Z.; Sun, J.; Tian, L.; Liu, J. A Multisensor Fault Diagnosis Model With Adaptive Spatial-Temporal Dual-Scale Remodeling. IEEE Sens. J. 2024, 25, 3030–3047. [Google Scholar] [CrossRef] [Scilit]
  4. Zhao, S.; Liang, X.; Wang, L.; Zhang, H.; Li, G.; Chen, J. A fault diagnosis method for analog circuits based on EEMD-PSO-SVM. Heliyon 2024, 10, e37209. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  5. Fukushima, K. Neocognitron: A self-organizing neural network model for a mechanism of pattern recognition unaffected by shift in position. Biol. Cybern. 1980, 36, 193–202. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  6. Cai, Y.; Wang, Z.; Yao, L.; Lin, T.; Zhang, J. Ensemble dilated convolutional neural network and its application in rotating machinery fault diagnosis. Comput. Intell. Neurosci. 2022, 2022, 6316140. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  7. Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, Ł.; Polosukhin, I. Attention is all you need. Adv. Neural Inf. Process. Syst. 2017, 30, 5998–6008. [Google Scholar]
  8. Liu, Y.; Zheng, W.; Du, Y.; Wang, Y.; Jin, J.; Yu, M. Bearing fault diagnosis based on cross image multi-attention mechanism. Sci. Rep. 2025, 15, 21100. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  9. Xu, Z.; Jia, Z.; Wei, Y.; Zhang, S.; Jin, Z.; Dong, W. A strong anti-noise and easily deployable bearing fault diagnosis model based on time–frequency dual-channel transformer. Measurement 2024, 236, 115054. [Google Scholar] [CrossRef] [Scilit]
  10. Dengfeng, Z.; Chaoyang, T.; Zhijun, F.; Yudong, Z.; Junjian, H.; Wenbin, H. Multi scale convolutional neural network combining BiLSTM and attention mechanism for bearing fault diagnosis under multiple working conditions. Sci. Rep. 2025, 15, 13035. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  11. Xu, Z.; Jia, Z.; Kang, X.; Li, Y.; Tian, L.; Liu, J. SS-DDPM: A novel denoising diffusion probabilistic model for industrial sensor signal data augmentation. Clust. Comput. 2025, 28, 869. [Google Scholar] [CrossRef] [Scilit]
  12. Yang, M.; Zhao, L.; Wang, Y.; Liang, Y.; Zhao, X.; Yang, S. Motion condition monitoring of underwater gliders based on deep learning and dynamic identification. Ocean Eng. 2023, 272, 113793. [Google Scholar] [CrossRef] [Scilit]
  13. He, D.; Zhang, Z.; Jin, Z.; Zhang, F.; Yi, C.; Liao, S. RTSMFFDE-HKRR: A fault diagnosis method for train bearing in noise environment. Measurement 2025, 239, 115417. [Google Scholar] [CrossRef] [Scilit]
  14. Sun, Y.; Tao, H.; Stojanovic, V. End-to-end multi-scale residual network with parallel attention mechanism for fault diagnosis under noise and small samples. ISA Trans. 2025, 157, 419–433. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  15. Li, C.; Mo, L.; Kwoh, C.K.; Li, X.; Chen, Z.; Wu, M.; Yan, R. Noise-robust multi-view graph neural network for fault diagnosis of rotating machinery. Mech. Syst. Signal Process. 2025, 224, 112025. [Google Scholar] [CrossRef] [Scilit]
  16. Wang, C.; Jie, H.; Yang, J.; Gao, T.; Zhao, Z.; Chang, Y.; See, K.Y. A multi-source domain feature-decision dual fusion adversarial transfer network for cross-domain anti-noise mechanical fault diagnosis in sustainable city. Inf. Fusion 2025, 115, 102739. [Google Scholar] [CrossRef] [Scilit]
  17. Ni, Y.; Li, S.; Guo, P. Discrete wavelet integrated convolutional residual network for bearing fault diagnosis under noise and variable operating conditions. Sci. Rep. 2025, 15, 16185. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  18. Siddique, M.F.; Saleem, F.; Umar, M.; Kim, C.H.; Kim, J.-M. A hybrid deep learning approach for bearing fault diagnosis using continuous wavelet transform and attention-enhanced spatiotemporal feature extraction. Sensors 2025, 25, 2712. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  19. Siami-Namini, S.; Tavakoli, N.; Namin, A.S. The performance of LSTM and BiLSTM in forecasting time series. In Proceedings of the 2019 IEEE International Conference on Big Data (Big Data), Los Angeles, CA, USA, 9–12 December 2019; pp. 3285–3292. [Google Scholar]
  20. Tian, A.; Zhang, Y.; Ma, C.; Chen, H.; Sheng, W.; Zhou, S. Noise-robust machinery fault diagnosis based on self-attention mechanism in wavelet domain. Measurement 2023, 207, 112327. [Google Scholar] [CrossRef] [Scilit]
  21. Duan, R.; Zhou, T.; Jin, G. BEAM-Net: A Lightweight Bearing Fault Diagnosis Network via Spectral Trend Decomposition and Weighted Convolution. Appl. Sci. 2026, 16, 5602. [Google Scholar] [CrossRef] [Scilit]
  22. Guo, M.-H.; Xu, T.-X.; Liu, J.-J.; Liu, Z.-N.; Jiang, P.-T.; Mu, T.-J.; Zhang, S.-H.; Martin, R.R.; Cheng, M.-M.; Hu, S.-M. Attention mechanisms in computer vision: A survey. Comput. Vis. Media 2022, 8, 331–368. [Google Scholar] [CrossRef] [Scilit]
  23. Vieira e Silva, A.L.; Simões, F.; Kowerko, D.; Schlosser, T.; Battisti, F.; Teichrieb, V. Attention modules improve image-level anomaly detection for industrial inspection: A differnet case study. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, Waikoloa, HI, USA, 3–8 January 2024; pp. 8246–8255. [Google Scholar]
  24. Li, M.; Peng, P.; Zhang, J.; Wang, H.; Shen, W. SCCAM: Supervised contrastive convolutional attention mechanism for ante-hoc interpretable fault diagnosis with limited fault samples. IEEE Trans. Neural Netw. Learn. Syst. 2023, 35, 6194–6205. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  25. Hu, J.; Shen, L.; Sun, G. Squeeze-and-excitation networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–23 June 2018; pp. 7132–7141. [Google Scholar]
  26. Wang, Q.; Wu, B.; Zhu, P.; Li, P.; Zuo, W.; Hu, Q. ECA-Net: Efficient channel attention for deep convolutional neural networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Seattle, WA, USA, 13–19 June 2020; pp. 11534–11542. [Google Scholar]
  27. Li, X.; Wang, W.; Hu, X.; Yang, J. Selective kernel networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Long Beach, CA, USA, 15–20 June 2019; pp. 510–519. [Google Scholar]
  28. Wu, K.; Tao, J.; Yang, D.; Chen, H.; Yin, S.; Xiao, C. Rolling bearing fault diagnosis method based on multiple efficient channel attention capsule network. In Proceedings of the International Conference on Adaptive and Intelligent Systems; Springer: Cham, Switzerland, 2022; pp. 357–370. [Google Scholar]
  29. Shao, H.; Jiang, H.; Lin, Y.; Li, X. A novel method for intelligent fault diagnosis of rolling bearings using ensemble deep auto-encoders. Mech. Syst. Signal Process. 2018, 102, 278–297. [Google Scholar] [CrossRef] [Scilit]
  30. Woo, S.; Park, J.; Lee, J.-Y.; Kweon, I.S. CBAM: Convolutional block attention module. In Proceedings of the European Conference on Computer Vision (ECCV), Munich, Germany, 8–14 September 2018; pp. 3–19. [Google Scholar]
  31. He, K.; Zhang, X.; Ren, S.; Sun, J. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 27–30 June 2016; pp. 770–778. [Google Scholar]
  32. Rumelhart, D.E.; Hinton, G.E.; Williams, R.J. Learning representations by back-propagating errors. Nature 1986, 323, 533–536. [Google Scholar] [CrossRef] [Scilit]
  33. Touvron, H.; Cord, M.; Sablayrolles, A.; Synnaeve, G.; Jégou, H. Going deeper with image transformers. In Proceedings of the IEEE/CVF International Conference on Computer Vision, Montreal, QC, Canada, 10–17 October 2021; pp. 32–42. [Google Scholar]
  34. Neupane, D.; Seok, J. Bearing fault detection and diagnosis using case western reserve university dataset with deep learning approaches: A review. IEEE Access 2020, 8, 93155–93178. [Google Scholar] [CrossRef] [Scilit]
  35. Smith, W.A.; Randall, R.B. Rolling element bearing diagnostics using the Case Western Reserve University data: A benchmark study. Mech. Syst. Signal Process. 2015, 64, 100–131. [Google Scholar] [CrossRef] [Scilit]
  36. Wang, X.; Zhang, H.; Du, Z. Multiscale noise reduction attention network for aeroengine bearing fault diagnosis. IEEE Trans. Instrum. Meas. 2023, 72, 3513810. [Google Scholar] [CrossRef] [Scilit]
  37. Fang, H.; Deng, J.; Bai, Y.; Feng, B.; Li, S.; Shao, S.; Chen, D. CLFormer: A lightweight transformer based on convolutional embedding and linear self-attention with strong robustness for bearing fault diagnosis under limited sample conditions. IEEE Trans. Instrum. Meas. 2022, 71, 3504608. [Google Scholar] [CrossRef] [Scilit]
  38. Cui, Y.; Zhang, Z.; Zhong, Z.; Hou, J.; Chen, Z.; Cai, Z.; Kim, J.-H. Bearing fault diagnosis based on multiscale lightweight convolutional neural network. Processes 2025, 13, 1239. [Google Scholar] [CrossRef] [Scilit]
  39. Li, K.; Ping, X.; Wang, H.; Chen, P.; Cao, Y. Sequential Fuzzy Diagnosis Method for Motor Roller Bearing in Variable Operating Conditions Based on Vibration Analysis. Sensors 2013, 13, 8013–8041. [Google Scholar] [CrossRef] [Scilit] [PubMed]
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.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.