Skip to Content
MachinesMachines
  • Article
  • Open Access

1 April 2026

20 Pages

Maximum Margin Local Domain Adaptation for Bearing Fault Diagnosis Under Multiple Operating Conditions

,
,
,
and
1
School of Urban Railway Transportation, Shanghai University of Engineering Science, Shanghai 201620, China
2
China Key System & Integrated Circuit Co., Ltd., Wuxi 214000, China
3
EngineTech Computing (Xi’an) Computer Co., Ltd., Xi’an 710000, China
*
Author to whom correspondence should be addressed.

Abstract

Unsupervised domain adaptation (UDA) has been extensively studied for bearing fault diagnosis under multiple operating conditions by mitigating distribution discrepancies across domains. However, in cross-domain imbalanced scenarios, bearing vibration signals are affected by both feature shift and class imbalance. Although a robust decision boundary learned from the source domain is critical for reliable transfer, classifier discriminability and robustness can be degraded by hard samples located near the boundary. As a result, the decision boundary may become ambiguous during adaptation, leading to degraded diagnostic performance in the target domain. To address these issues, a Maximum Margin Local Domain Adaptation (MMLDA) framework is proposed in which a multi-scale convolutional neural network is adopted as the backbone. Three core components are integrated into our framework: first, category-level reweighting to alleviate source-domain class imbalance; second, cross-domain local category alignment to reduce fine-grained feature discrepancies and feature shift; and finally, maximum-margin loss regularization to impose adaptive margin constraints on hard samples for improved decision boundary robustness. To evaluate the proposed method, cross-domain imbalanced transfer tasks under multiple operating conditions were constructed on two public bearing fault datasets, and comparative experiments were conducted. The results under different imbalance protocols demonstrate improved robustness and generalization of MMLDA.

1. Introduction

With the rapid development of modern industry, various industrial equipment is gradually moving toward high efficiency, intelligence, and high reliability, and ensuring the safe, economical, and stable operation of equipment has become a core demand [1]. Driven by this core demand, condition monitoring and fault diagnosis technologies have emerged as key supporting tools for equipment operation and maintenance. Currently, these technologies are widely applied across major core fields, including industrial manufacturing, energy and power, and aerospace propulsion, and relevant cutting-edge research has laid a solid technical foundation for equipment operation and maintenance support across industry [2,3,4,5]. As one of the most widely used core types of equipment in the modern industrial system, rotating machinery is extensively deployed in key fields such as transportation, precision manufacturing, and aerospace due to its excellent performance. Rolling bearings, as indispensable core components of rotating machinery, directly determine the operational performance, operational safety, and long-term stability of complete equipment systems [6]. In practice, rolling bearings often operate in complex and changeable environments, and bearing failures may lead to equipment downtime, financial losses, and even significant safety risks [7]. Through effective bearing fault diagnosis, maintenance costs can be reduced, and the reliability and safety of mechanical systems can be improved [8]. Moreover, substantial social and economic losses can potentially be reduced, highlighting the importance of this research area.
In recent years, deep learning has shown strong potential and significant advantages in feature extraction and pattern recognition. As a result, deep learning has attracted increasing attention in intelligent fault diagnosis and has been widely applied in bearing fault diagnosis. Discriminative fault features can be automatically learned from raw sensor data (e.g., vibration signals) using deep learning-based fault diagnosis models, in which feature extraction and diagnosis are integrated in an end-to-end manner; thus, the bearing health status can often be inferred without extensive manually designed feature extractors or domain-specific prior knowledge. Many deep learning network models, such as convolutional neural networks [9,10], residual neural networks [11], transformers [12], long short-term memory networks [13] and autoencoders [14], have been extensively studied, and strong frameworks for fault diagnosis are provided in this research. Although strong feature extraction and representation learning can be achieved with deep learning models, sufficient labeled training samples are required, and consistency between training and testing data distributions is typically assumed. However, in actual bearing fault diagnosis, large-scale fault data collection and labeling are considered labor-intensive and time-consuming, and efficiency is limited. Furthermore, feature shift in bearing vibration data under different conditions is caused by complex and variable operating conditions (such as load fluctuations and speed changes). If a model trained under a specific operating condition is directly transferred to another, its generalization performance may be significantly degraded. Consequently, transfer learning, often termed knowledge transfer, has gained increasing attention as an effective learning paradigm and has been widely adopted for cross-domain fault diagnosis. It aims to address the same or similar tasks in a target domain by utilizing knowledge learned from a source domain [15]. By reusing knowledge and representation capabilities learned from a related domain, transfer learning can often improve learning efficiency and diagnostic performance in a new domain. In recent years, extensive attention has been paid to UDA within the transfer learning framework. Through UDA, discriminative information learned from labeled source domains is leveraged to support learning in unlabeled target domains, leading to improved cross-domain generalization. For example, Jin et al. [16] proposed an improved domain-adversarial neural network (DANN) for rolling-bearing fault diagnosis under diverse operating conditions, in which a feature extractor is trained adversarially against a domain classifier to reduce the source–target distribution discrepancy and learn transferable domain-invariant representations.
However, such DANN-style approaches typically perform global, class-agnostic alignment by matching marginal feature distributions across domains, while category-level correspondence and intra-class structural consistency are often insufficiently constrained. Consequently, category-level alignment may be rendered insufficient, and fine-grained discriminative information can be weakened. As a result, transfer performance may be limited. To address this issue, a deep subdomain adaptation network was proposed by Zhu et al. [17] in which subdomain distributions of same-class samples are aligned across domains using local maximum mean discrepancy (LMMD). No adversarial training is required in this approach, and more stable convergence can be achieved, enabling fine-grained information to be captured more effectively for cross-domain transfer. Nevertheless, many existing studies rely on artificially constructed balanced datasets, and the class imbalance issue (e.g., long-tailed distributions) in cross-domain settings remains under-explored. As a result, the learning of decision boundaries for minority classes is made more challenging. Although improved methods have been proposed by Wu et al. [18] and Li et al. [19] to address this problem, these approaches may not sufficiently optimize the decision boundary learned from the source domain.
Specifically, in cross-domain imbalanced scenarios, boundary stability tends to be interfered with by hard samples near the decision boundary of the source domain. When the model is transferred to the target domain, class confusion among different fault classes is more likely to be induced in the boundary region due to the imbalanced data distribution. Consequently, the misclassification probability is increased, and a critical bottleneck is formed that restricts the improvement of the model’s cross-domain generalization performance. Crucially, as the degree of data imbalance intensifies, such class confusion issues may become increasingly prominent, and not only will the risk of misclassification be exacerbated, but also the cross-domain diagnostic performance of the model will be significantly constrained. To address these issues, a Maximum Margin Local Domain Adaptation (MMLDA) method is proposed, whose main contributions are summarized as follows:
(1)
An MMLDA method is proposed, which is designed to improve the generalization performance of models in the target domain under cross-domain imbalanced scenarios. Category-level reweighting, cross-domain local category alignment, and maximum-margin loss regularization are integrated into the proposed framework.
(2)
To address the insufficient robustness of the decision boundary caused by hard samples near the source-domain boundary, a maximum-margin loss regularization strategy is introduced. It strengthens the discriminability and robustness of the decision boundary, thereby improving the model’s generalization performance in cross-domain imbalanced scenarios.
(3)
Extensive comparative experiments are conducted on two public bearing fault datasets against multiple method variants, and the robustness and applicability of the proposed method under cross-domain imbalanced scenarios are validated using the experimental results.
The remainder of this paper is organized as follows: The theoretical background is reviewed in Section 2; the proposed MMLDA method is presented in Section 3; the experimental results and analysis are reported in Section 4; and the paper is concluded in Section 5.

2. Theoretical Background

Unsupervised domain adaptation (UDA) transfers supervision information from a labeled source domain to an unlabeled target domain, aiming to improve the model performance on the target domain. The mainstream techniques of UDA mainly consist of three core paradigms. The first is adversarial learning-based UDA, which draws on the game theory of generative adversarial networks and constructs an adversarial framework consisting of a feature extractor and a domain discriminator. With the gradient reversal layer for adversarial optimization, this paradigm enables the feature extractor to learn domain-invariant features that cannot be distinguished by the discriminator, implicitly narrowing the distribution discrepancy between the source and target domains. The second is self-training and pseudo-labeling-based UDA. This paradigm pre-trains a basic model using labeled source data, then employs the pre-trained model to generate pseudo-labels for high-confidence unlabeled target samples, and iteratively fine-tunes the model by jointly training on the original labeled source data and pseudo-labeled target data, gradually realizing knowledge adaptation to the target domain. In discrepancy-based UDA, as a classic and core paradigm in this field, domain-invariant features are promoted by explicitly constraining the statistical distance between the source and target feature distributions. Representative metrics include Maximum Mean Discrepancy [20] and Correlation Alignment [21], which reduce the domain distribution gap and thereby facilitate effective cross-domain knowledge transfer.
Specifically, the maximum mean discrepancy is defined as the following metric to measure the feature distribution discrepancy between different domains:
d H D s , D t = E p ϕ ( x s ) − E q ϕ ( x t ) H k 2
where x s and x t represent samples drawn from the source and target domains, respectively. H denotes the reproducing kernel Hilbert space associated with the kernel function k. The mapping ϕ · is a nonlinear feature map that maps samples from the original feature space into H . The corresponding kernel function k ( · , · ) satisfies
k x s , x t = ϕ x s , ϕ x t

3. Maximum Margin Local Domain Adaptation

3.1. Problem Description

UDA aims to transfer knowledge from a labeled source domain, D s = { ( x i s , y i s ) } i = 1 n s , which contains n s labeled samples and follows distribution p, to an unlabeled target domain, D t = { ( x j t ) } j = 1 n t , which contains n t samples and follows distribution q. The two domains share the same label space { 1 , 2 , … , C } , where C denotes the number of classes. In addition, the class distributions are imbalanced in both the source and target domains, and such imbalance is not necessarily consistent across domains, resulting in cross-domain class imbalance. Let G ( · ; θ g ) denote a parameterized feature extractor and F ( · ; θ f ) a classifier, with θ g and θ f being learnable parameters. The goal is to jointly optimize θ g and θ f so as to minimize the target-domain task risk ϵ t , which is formulated as
( θ g * , θ f * ) = arg min θ g , θ f ϵ t = E ( x , y ) ∼ D t I F ( G ( x ; θ g ) ; θ f ) ≠ y

3.2. Methodology Overview

To address the degradation of model generalization performance under cross-domain imbalanced scenarios, a Maximum Margin Local Domain Adaptation (MMLDA) method is proposed, the overall framework of which is illustrated in Figure 1. The proposed framework is composed of a multi-scale convolutional neural network backbone and three domain adaptation components. Multi-scale feature representations are extracted by the backbone, upon which the following components are further incorporated: (1) category-level reweighting is employed to alleviate class imbalance in the source domain; (2) cross-domain local category alignment is employed to enable fine-grained alignment of feature distributions between the source and target domains for mitigating feature shift; and (3) maximum-margin loss regularization is employed to enhance the robustness of the decision boundary by imposing adaptive margin constraints on hard samples located near the boundary.
Figure 1. General framework of the proposed MMLDA method.

3.3. Feature Extraction and Supervised Classification

A multi-scale one-dimensional convolutional neural network (hereafter referred to as CNN) is designed as the feature extraction backbone, whose architecture is detailed in Table 1. Specifically, the network consists of four consecutive layers: the first layer adopts wide-kernel convolutions to suppress high-frequency noise in the input vibration signals and mitigate environmental interference. The kernel size decreases progressively in the subsequent intermediate layers to capture more localized fault-related patterns. The final layer utilizes fine-grained small convolutions to extract subtle feature details, and an adaptive pooling strategy is employed to aggregate global information before flattening, laying a richer representation foundation for cross-domain imbalanced fault diagnosis. During supervised training on the source domain, empirical risk minimization is adopted as the optimization objective, under which the model is trained with labeled source-domain samples to establish basic classification capability. As a result, reliable initialization is provided for subsequent transfer tasks. For optimization, the cross-entropy loss is employed, and its formulation is given as follows:
min θ g , θ f L s − CE ( θ g , θ f ) = 1 n s ∑ i = 1 n s L CE y ^ i , y i
where y ^ i is the predicted output of the model classifier, and y i is the true label of the sample.
Table 1. Detailed architecture of the feature extractor in MMLDA.

3.4. Category-Level Reweighting

In traditional deep neural network classification, class imbalance in the dataset is not explicitly accounted for by the softmax cross-entropy loss function, which often results in uneven gradient updates across different classes during training. Specifically, in the computation of cross-entropy loss, positive samples of one class are simultaneously treated as negative samples for the remaining classes. Consequently, positive samples are more frequently drawn from majority classes, resulting in more positive gradient updates for these classes. In contrast, stronger negative gradient suppression is suffered by minority classes due to their more frequent treatment as negative samples [22]. To alleviate this issue, a class-balanced loss (CBL) characterized by class-sensitive learning is introduced in this work [23]. The original data distribution is largely preserved by the class-balanced loss, while continuous and fine-grained class compensation is enabled, thereby alleviating class imbalance with reduced information loss.
A labeled sample is denoted by x , y , with the class index y ∈ 1 , … , C . The logit vector produced by the classification layer is v = [ v 1 , … , v C ] . By applying the softmax function to v , the predicted probability vector over the C classes is obtained as p = [ p 1 , … , p C ] , where p i ∈ [ 0 , 1 ] . For class c containing n c samples, the effective number of samples is given by
N c = ( 1 − β n c ) 1 − β
where β ∈ [ 0 , 1 ) is a pre-set hyper-parameter that controls the rate at which N c increases with respect to n c and is related to the overall dataset size. To mitigate class imbalance, each class c is assigned a re-weighting coefficient α c , computed as a scaled inverse of the effective sample number N c for that class. Specifically, α c ∝ 1 / N c and is defined as follows:
α c = C N c ∑ c = 1 C 1 / N c
To maintain a consistent scale of α c across fault classification tasks on different bearing datasets and to stabilize the loss magnitude, α c is normalized to satisfy ∑ c = 1 C α c = C . The resulting normalized reweighting factor (normalization notation omitted for brevity) is then incorporated into the loss function,
L C B = α c · L ( p , y ) = 1 − β 1 − β n c L ( p , y )
Consider the softmax cross-entropy loss. When the label is y and the training set contains n y samples of this class, the class-balanced loss can be written as
CB softmax ( v , y ) = − 1 − β 1 − β n y ln exp v y ∑ j = 1 C exp v j

3.5. Cross-Domain Local Category Alignment

The impact of source-domain class imbalance during training can be alleviated through category-level reweighting, where the weights assigned to different classes are dynamically adjusted. However, feature shift is still regarded as a core issue, thereby limiting the model’s generalization performance. Although feature distribution discrepancies between domains can be reduced to some extent by global domain alignment methods, accurate fine-grained alignment is often not achieved due to the fact that fine-grained class information is neglected. To realize domain-specific fine-grained alignment while preserving class semantic information, the Local Maximum Mean Discrepancy (LMMD) method is introduced in this paper [17]. Local distribution alignment is performed by LMMD for samples belonging to the same class across the source and target domains in the feature space, through which fine-grained alignment is achieved by minimizing the distribution discrepancy of same-class features between the two domains. The core computational process of LMMD is mathematically formulated as follows:
d H D s , D t ≜ E c E p ( c ) ϕ ( x s ) − E q ( c ) ϕ ( x t ) H k 2
where x s and x t are sampled from D s and D t , respectively, and p ( c ) and q ( c ) denote the distributions of the subdomains D s ( c ) and D t ( c ) in the two domains. In contrast to maximum mean discrepancy, LMMD introduces class-dependent sample weights, and the distribution distance is evaluated by comparing the corresponding weighted subdomain kernel means in a reproducing kernel Hilbert space. Through this mechanism, subdomain distributions between the source and target domains can be effectively aligned. Let w c represent the weight for class c; the empirical form of LMMD is then given by
d ^ H D s , D t = 1 C ∑ c = 1 C ∑ i = 1 n s w i s c ϕ x i s − ∑ j = 1 n t w j t c ϕ x j t H k 2
where w i s c and w j t c denote the weights assigned to x i s and x j t for class c, respectively, and satisfy the normalization constraints ∑ i = 1 n s w i s c = ∑ j = 1 n t w j t c = 1 . For a given sample x i , the corresponding weight is calculated as follows:
w i c = p i c ∑ x j ∈ D p j c
where p i = [ p i 1 , … , p i C ] denotes the predicted class-probability vector for sample x i , and p i c denotes the c-th entry of p i . It should be noted that, for a labeled sample from the source domain, p i can be treated as the corresponding one-hot label vector. By contrast, for an unlabeled target-domain sample, p i is taken as the class-probability distribution output by the network through the softmax layer and is thus employed as a pseudo-label. The probability of a target sample being assigned to each class is reflected by this pseudo-label, based on which the sample weights in the target domain are further computed.
Finally, the discrepancy distance between the source and target domains is evaluated based on the deep feature representations learned by the feature extraction layer:
L L M M D = d ^ L M M D D s , D t = 1 C ∑ c = 1 C ∑ i = 1 n s ∑ j = 1 n s w i s c w j s c k z i s , z j s + ∑ i = 1 n t ∑ j = 1 n t w i t c w j t c k z i t , z j t − 2 ∑ i = 1 n s ∑ j = 1 n t w i s c w j t c k z i s , z j t
where z i s and z j t denote the feature representations output by the feature extraction layer for the i-th source-domain sample x i s and the j-th target-domain sample x j t , respectively.

3.6. Maximum Margin Loss Regularization

Accurate local class-wise matching can be facilitated by cross-domain local category alignment, and class imbalance can be alleviated via category-level reweighting. Nevertheless, the robustness of the decision boundary learned in the source domain can still be undermined by hard samples, thereby limiting the transfer performance of the model. To address this issue, a maximum-margin (MM) loss is introduced [24]. By imposing adaptive margin constraints on hard samples, local class separability is strengthened and cross-domain transfer performance is further improved. Motivated by the trade-off between class margins, two margin terms are defined as follows:
Δ y M M = Δ y + = exp ( − max ( v y − max c ≠ y v c , 0 ) − δ + ) Δ y − = exp ( − max ( max c ≠ y v c − v y , 0 ) − δ − )
For intuition, we explain the margin design with a binary example. As formulated in Equation (13), the margins for hard samples are categorized into two types, where v denotes the logit vector produced by the classification layer for sample x , y , and δ + and δ − are adjustable hyper-parameters. Specifically, Δ c + denotes the hard-positive margin, which is defined as the maximum margin for correctly classified samples of the true class c, whereas Δ c − denotes the hard-negative margin, which is defined as the maximum margin for misclassified samples of the true class c. The ratio δ + / δ − is used to control the smoothness of the margin.
To enhance the non-linear fitting capability, an exponential function is introduced to weight the margin. A stronger driving force for shifting the decision boundary is induced when a smaller maximum margin is obtained. Moreover, to ensure that hard-to-classify (i.e., easily misclassified) categories are assigned a larger margin during boundary adjustment, the relationship between δ + and δ − is specified as follows:
δ + = δ − · ρ
where ρ is a scalar. Following [24], both δ − and ρ are set to be greater than 1.0, so that a larger offset is enforced for the hard negative margin Δ c − than for the hard positive margin Δ c + . In addition, as shown in Equation (14), a class-distribution-aware margin is introduced based on the source-domain class-sample distribution, γ c = K / n c 1 / 4  [25], where K is a pre-defined constant. As a result, a more relaxed margin is assigned to minority-class samples during hard-margin computation, thereby enabling differentiated boundary optimization and improving adaptation to hard-to-classify samples. The specific modification is given as follows:
δ c + = δ − − γ c · ρ
and
δ c − = δ − − γ c
Empirically, the non-smooth hinge loss can hinder gradient-based optimization. A commonly used smooth surrogate is the cross-entropy loss with enforced margins, which can be written as
L M M = − ln e v y − Δ y M M e v y − Δ y M M + ∑ c ≠ y e v c
where Δ c M M is defined in Equation (13), and c ∈ { 1 , … , C } .

4. MMLDA Training and Optimization

MMLDA integrates the aforementioned components to effectively match fine-grained information in cross-domain imbalanced scenarios. The overall objective function is as follows:
L M M L D A D s , D t ; θ g , θ f = L s D s ; θ g , θ f + λ L L M M D D s , D t ; θ g , θ f
where
L s ( D s ; θ g , θ f ) = α c · L M M = − 1 n s ∑ i = 1 n s 1 − β 1 − β n c · ln e v i − Δ i M M e v i − Δ i M M + ∑ c ≠ y i e v c
represents the class-balanced cross-entropy augmented with an MM regularization term, and λ is the trade-off factor.
During training, a pre-training scheme is adopted, where the feature extractor and classifier are first trained using labeled source-domain data to initialize the model parameters. In the subsequent optimization stage, a time-dependent trade-off coefficient is applied instead of a constant value, i.e., λ t = μ · 2 / 1 + e − 10 t / t m − 1 , where t and t m denote the current and maximum epochs, respectively, and μ is a hyper-parameter. In this way, effective feature representations can be prioritized through supervised learning in the early stages of training, ensuring the model’s basic classification capability. As training proceeds to the later stages, the improvement of the model’s cross-domain generalization performance is emphasized.

5. Experiment

5.1. Experimental Setup

5.1.1. Cross-Domain Imbalanced Scenarios

To investigate bearing fault diagnosis under multiple operating conditions, 3 imbalanced protocols were established: (1) Basic Balance (Basic): There is only feature shift between the source and target domains, and the class distributions in both domains are perfectly balanced. (2) Moderate Imbalance (Moderate): Both feature shift and class imbalance exist between the source and target domains, with consistent class imbalance patterns in both domains. (3) Severe Imbalance (Severe): Feature shift exists, and the class distribution is imbalanced and differs across domains.
Given the inherent class imbalance in real-world bearing fault diagnosis, in Moderate Imbalance and Severe Imbalance, the healthy class samples dominate in both domains, while the fault class samples are minority classes.

5.1.2. Experimental Details and Comparative Methods

In the experiments, the MMLDA method was trained using the Adam optimizer, for which the main parameters were set as follows: an initial learning rate of 0.001 was employed, which was decayed to half of its current value at the 50th and 70th epochs during a total of 100 training epochs. The batch size was set to 128, and a weight decay regularization with a strength of 0.002 was applied. The class imbalance factor β was set to 0.9.
In the experiments, MMLDA is compared with several CNN-based comparative variants constructed by integrating different domain adaptation components, including the proposed components in MMLDA and the adversarial component from DANN. For fair comparison, the same backbone feature extractor and classifier are shared by all variants, which differ only in the adopted components. Consequently, a quantitative evaluation under a unified network architecture is enabled by this design. The detailed configurations and purposes are described as follows:
CNN (Baseline Model): The backbone CNN and the classifier are utilized by this model, which are trained only on the source domain without any components. It is used as a reference, enabling the performance gains attributable to different components to be quantified.
CNN+DANN: In this variant, the adversarial component of DANN is incorporated into CNN to perform global domain alignment via adversarial learning. This variant is regarded as a representative baseline through which the effectiveness of global domain alignment is evaluated and contrasted with the proposed local category alignment component.
CNN+LMMD: LMMD is introduced on top of CNN in this variant, and local category alignment is achieved by matching the distributions of corresponding classes between the source and target domains, thereby alleviating feature shift. The benefit of fine-grained local alignment over global domain alignment is demonstrated by comparisons with CNN and CNN+DANN.
CNN+LMMD+CBL: CBL is further incorporated into CNN+LMMD, which mitigates the impact of source-domain class imbalance through category-level reweighting. The adaptation gain brought by imbalance-aware training is quantified by the comparison with CNN+LMMD.
To comprehensively evaluate model performance under class-imbalanced cross-domain scenarios, precision, recall rate, and F1-score are adopted as the core evaluation metrics.

5.2. Case Study on CWRU Bearing Fault Dataset

5.2.1. Description of the Dataset

The Case Western Reserve University (CWRU) rolling bearing dataset, developed by the Bearing Data Center at Case Western Reserve University, has become a commonly used benchmark in rolling bearing fault diagnosis and is frequently adopted for validating diagnostic methods and comparing performance [26]. In this study, data of artificially damaged bearings from this dataset were selected for experiments. The dataset covers normal conditions and three typical fault types: normal bearing (N), inner race fault (IRF), outer race fault (ORF), and ball fault (BF). Each fault type is classified into three severity levels by defect size, 7 mil (Small, S), 14 mil (Medium, M), and 21 mil (Large, L), with distinct differences in fault representations and feature distributions across levels. To construct cross-operating-condition diagnostic scenarios, two conditions with the most significant load differences (Load 0 and Load 3) were selected and labeled Condition A and Condition B, respectively. Each operating condition includes 10 classes, consisting of 1 normal class and 9 fault classes. The experimental data were vibration signals collected at the motor drive end with a sampling frequency of 12 kHz. The experimental samples were constructed using a sliding window with a length of 1024 to ensure that each sample contains sufficient fault identification information. In the three imbalanced protocols, the input signal length was fixed at 1024, and different imbalance ratio settings were achieved only by adjusting the number of samples in each class.

5.2.2. Cross-Domain Imbalanced Scenarios Construction

Under each operating condition, samples from every class are randomly divided into training and test sets with a ratio of 4:1. Within the training set, class-wise sample distributions are constructed following three predefined cross-domain scenario protocols. By contrast, the test set is kept balanced by selecting an equal number of samples for each class, allowing a fairer assessment of diagnostic generalization across fault categories. The source- and target-domain training set distributions under different protocols are shown in Figure 2. By combining these protocols with the two cross-domain transfer tasks considered in this study, six experimental scenarios are obtained, as summarized in Table 2.
Figure 2. Source/target training set composition on the CWRU dataset under three protocols: (a) Basic, (b) Moderate and (c) Severe.
Table 2. Experimental setup for cross-domain transfer tasks on the CWRU dataset.

5.2.3. Experimental Results and Analysis

Two cross-operating-condition transfer tasks were constructed on the Case Western Reserve University (CWRU) bearing dataset. To improve the reliability of the experimental results, both the training and testing phases were independently executed 10 times, and the detailed analysis is presented as follows.
Table 3 presents the experimental results of MMLDA under all scenarios for the two transfer tasks, including the average recall and average precision. As shown in Table 3, an average precision of 94.22% and an average recall of 93.96% are achieved by MMLDA across all scenarios, indicating relatively stable performance under different imbalanced protocols. Meanwhile, a gradual degradation in model performance is observed as the severity of class imbalance increases, which suggests that the generalization performance of the model may be significantly affected in cross-domain imbalanced scenarios. Under Basic Balance, where only feature shift exists, strong generalization ability is demonstrated by the model. However, under Moderate Imbalance, class imbalance may interfere with the supervised learning of the model in the source domain, potentially reducing the robustness of the model’s decision boundary. In particular, under Severe Imbalance, differences in class distribution patterns between the source and target domains may further amplify the issue of insufficient decision boundary robustness, which could make it difficult for the model to adapt to the target domain and potentially degrade its generalization performance when transferred to the target domain. In addition, Task B→A is generally observed to be more challenging than Task A→B, as evidenced by their average precision values of 96.50% and 91.88% respectively, which suggests that the difficulty of domain adaptation may be closely related to the transfer direction.
Table 3. MMLDA recall and precision averages (%) for cross-domain tasks on the CWRU dataset.
The results in Table 4 show the performance comparison between MMLDA and its variants. Overall, the best performance is achieved by MMLDA, which outperforms the other variants under both Moderate Imbalance and Severe Imbalance. Except for the baseline CNN model, comparable performance is exhibited by the other methods under the Basic Balance protocol, but significant differences are observed under the two imbalanced protocols. Among the variant models, better performance is achieved by CNN+LMMD relative to CNN+DANN, which suggests that the fine-grained alignment mechanism of local domain alignment may be more advantageous in cross-domain imbalanced scenarios. Furthermore, improved performance is achieved by CNN+LMMD+CBL compared to CNN+LMMD, which indicates that class-level reweighting may effectively mitigate the bias induced by class imbalance and thereby enhance model performance. Finally, maximum-margin regularization is incorporated into CNN+LMMD+CBL to yield MMLDA. With adaptive margin constraints imposed on hard samples near the decision boundary, the issues of insufficient discriminability and robustness of the decision boundary are overcome to a certain extent, and the diagnostic accuracy is improved accordingly.
Table 4. Recall and precision averages (%) of MMLDA and comparative variants under different protocols on the CWRU dataset.
Figure 3 presents the F1-scores of MMLDA and its variants on the CWRU dataset. As shown in Figure 3, although MMLDA has no obvious advantage over CNN+LMMD and CNN+LMMD+CBL under Basic Balance, its F1-scores are significantly improved in the other two protocols with class imbalance. It can also be seen that the three core components of MMLDA are crucial to the model performance, with each playing an integral role.
Figure 3. Performance of MMLDA and its variants under different protocols on the CWRU dataset.
Figure 4 illustrates the t-Distributed Stochastic Neighbor Embedding (t-SNE) visualization of feature embeddings under Severe Imbalance. Compared with other variant models, more compact intra-class clustering and clearer inter-class separation are achieved by MMLDA, which reflects stronger feature discriminability. For CNN+DANN, insufficient intra-class feature alignment is observed, which reveals the limitations of relying solely on global domain alignment. Although this issue is alleviated by CNN+LMMD, confusion among boundary samples still remains. The degree of class confusion is further reduced by CNN+LMMD+CBL, but residual feature overlap between certain classes is still observed. The confusion matrices in Figure 5 provide consistent evidence: substantial off-diagonal errors are observed in the confusion matrix of CNN+DANN, which indicates that global domain alignment alone may not be sufficient to resolve class confusion. Improved diagonal dominance is shown in the confusion matrix of CNN+LMMD, although misclassification among several hard-to-distinguish classes still persists. Further refinement is achieved by CNN+LMMD+CBL, yet residual misclassification errors remain. In contrast, a more concentrated diagonal structure with significantly reduced dominant class confusions is exhibited by the confusion matrix of MMLDA.
Figure 4. t-SNE embedding of source and target features on the CWRU dataset under the Severe Imbalance protocol for (a) CNN+DANN, (b) CNN+LMMD, (c) CNN+LMMD+CBL, and (d) MMLDA.
Figure 5. Target-domain confusion matrices for the CWRU cross-domain task under the Severe Imbalance protocol: (a) CNN+DANN, (b) CNN+LMMD, (c) CNN+LMMD+CBL, and (d) MMLDA.

5.3. Case Study on Paderborn Bearing Fault Dataset

5.3.1. Description of the Dataset

The Paderborn University (PU) bearing dataset is a publicly available international benchmark dataset for rotating machinery [27], which provides a standardized testbed for data-driven bearing fault identification and classification and is widely applied in model development and validation. In this study, the naturally damaged bearing data from this dataset were selected for experiments. Two operating conditions were configured: Condition C (1500 rpm, 0.7 N·m, 1000 N) and Condition D (1500 rpm, 0.1 N·m, 1000 N). The fault categories include normal bearings (N), inner race faults (IRFs), and outer race faults (ORFs). Specifically, both IRFs and ORFs are divided into two damage levels: slight (S) and severe (L). Each operating condition contains a total of 5 categories (1 normal class and 4 fault classes). In addition, slight inner race damage and severe outer race damage are duplicate damage types with random fault distributions; the remaining two categories are single damage types. The experimental data are vibration signals collected by sensors mounted on the bearing housing, with a sampling frequency of 64 kHz. The vibration signals were sliced with a sliding window of length 1024 to generate experimental samples containing sufficient fault features. The input signal length was also fixed at 1024 for the three imbalanced protocols.

5.3.2. Cross-Domain Imbalanced Scenarios Construction

For each operating condition, samples from each class were randomly divided into training and test sets at a ratio of 4:1. Within the training set, class-wise sample quantities were arranged according to three predefined cross-domain scenario protocols. By contrast, the test set was constructed in a balanced manner by retaining an equal number of samples for each class, allowing a fairer evaluation of diagnostic generalization across different fault categories. The resulting source- and target-domain training distributions under various protocols are shown in Figure 6. Together with the two designed transfer tasks, these protocols form six cross-domain scenarios, as summarized in Table 5.
Figure 6. Source/target training set composition on the Paderborn dataset under three protocols: (a) Basic, (b) Moderate and (c) Severe.
Table 5. Experimental setup for cross-domain transfer tasks on the Paderborn dataset.

5.3.3. Experimental Results and Analysis

To further evaluate the effectiveness of the proposed MMLDA under cross-domain imbalanced scenarios, experiments were conducted on naturally damaged bearing data from the Paderborn dataset. For each transfer scenario, 10 independent runs were conducted for both training and testing to improve statistical reliability. The detailed analysis is presented as follows.
As shown in Table 6, MMLDA maintains favorable performance on the Paderborn dataset, with an average precision of 91.51% and an average recall of 90.71%. Consistent with the CWRU case, a gradual degradation in model performance is observed as the degree of class imbalance intensifies. However, there are no significant performance differences across different transfer tasks, which may be attributed to the smaller overall variation in operating conditions of this dataset compared with the CWRU dataset. As presented in Table 7, MMLDA achieves average precisions of 90.86% and 85.62% under Moderate Imbalance and Severe Imbalance, respectively, outperforming other variants. Specifically, in cross-domain imbalanced scenarios, feature fine-grained alignment is realized by CNN+LMMD, which results in better performance than CNN+DANN, yet its effectiveness is still constrained by cross-domain imbalanced scenarios. Class-level reweighting is implemented by CNN+LMMD+CBL, which mitigates the impact of class imbalance to a certain extent, though performance bottlenecks remain. Decision boundary optimization is performed by MMLDA, which overcomes the issue of insufficient boundary robustness to a certain degree.
Table 6. MMLDA recall and precision averages (%) for cross-domain tasks on the Paderborn dataset.
Table 7. Recall and precision averages (%) of MMLDA and comparative variants under different protocols on the Paderborn dataset.
Figure 7 presents the F1 scores of various methods on the Paderborn dataset. The proposed MMLDA method exhibits superior diagnostic performance across all imbalanced protocols, confirming its effectiveness in addressing cross-domain imbalance problems. The results indicate that MMLDA can serve as a feasible solution for cross-domain imbalance problems in real-world industrial scenarios.
Figure 7. Performance of MMLDA and its variants under different protocols on the Paderborn dataset.
The two-dimensional t-SNE feature visualization plots and confusion matrices under the Severe Imbalance protocol are presented in Figure 8 and Figure 9, respectively, where Labels 0–4 correspond to Normal, IRF-S, IRF-L, ORF-S, and ORF-L. As shown in Figure 8, across the three comparative variants, noticeable overlap was observed between the bluish-purple samples corresponding to IRF-L and the pinkish-purple samples corresponding to ORF-L, suggesting that severe inner-race and outer-race faults were represented by highly similar features under natural damage conditions. Consequently, the frequent mutual misclassification between these two fault types, as reported in the confusion matrices, can be reasonably attributed to such feature overlap. By contrast, more compact intra-class clusters were produced by MMLDA, and the overlap between IRF-L and ORF-L was substantially reduced. Although complete separation was not achieved, a more distinguishable decision boundary between the two fault categories was formed, thereby alleviating confusion for samples located near the boundary. Consistent evidence was further provided by the confusion matrices in Figure 9. For the three comparative variants, IRF-L remained the most challenging class and was frequently misclassified as ORF-L. By comparison, this dominant confusion was markedly reduced when MMLDA was adopted, and a more concentrated diagonal structure was obtained. These results indicate that MMLDA has mitigated the issue of insufficient decision boundary robustness to a certain extent, thereby enhancing the generalization performance of the model.
Figure 8. t-SNE embedding of source and target features on the Paderborn dataset under the Severe Imbalance protocol for (a) CNN+DANN, (b) CNN+LMMD, (c) CNN+LMMD+CBL, and (d) MMLDA.
Figure 9. Target-domain confusion matrices for the Paderborn cross-domain task under the Severe Imbalance protocol: (a) CNN+DANN, (b) CNN+LMMD, (c) CNN+LMMD+CBL, and (d) MMLDA.

6. Conclusions

In this study, aiming to address the prevalent challenge of cross-domain imbalanced fault diagnosis in real-world industrial scenarios, an MMLDA framework is proposed, which possesses engineering practical value. The core innovation of this framework lies in the introduction of a maximum-margin loss regularization mechanism, integrated with the class-level reweighting strategy and cross-domain local class alignment method. Under the synergistic effect of the three modules, the proposed MMLDA method effectively alleviates domain distribution discrepancy and class imbalance in cross-domain imbalanced scenarios. It also overcomes the drawback of insufficient decision boundary robustness, thereby extracting more discriminative domain-invariant features. Two classic bearing datasets, CWRU and Paderborn, are selected in this study, and three protocols with progressively increasing imbalance levels are designed for comprehensive verification. Experimental results demonstrate that MMLDA exhibits stable and superior performance in multi-operating-condition cross-domain imbalanced fault diagnosis tasks.
Despite the promising results, the study still has certain limitations. The proposed MMLDA framework is only applicable to the single-source to single-target domain adaptation scenario, while multi-source domain adaptation is more common in practical industrial scenarios, where training data are usually collected from multiple operating conditions or different machines. Future work will focus on extending this framework to multi-source domain adaptation scenarios, exploring efficient source domain collaboration and weighting strategies to address the distribution discrepancies among different source domains, and developing more robust multi-source class-level alignment methods simultaneously.

Author Contributions

Z.W.: Writing—Original Draft, Software, Methodology, and Investigation. Z.L. (Zhaomin Lv): Writing—Review and Editing and Funding Acquisition. X.C.: Writing—Review and Editing. H.Z.: Writing—Review and Editing. Z.L. (Zhiwei Li): Writing—Review and Editing. All authors have read and agreed to the published version of the manuscript.

Funding

This work was funded by the National Natural Science Foundation of China (Grant No. 6240074587).

Data Availability Statement

The data used in this study are publicly available from the Case Western Reserve University Bearing Data Center and the Paderborn University (KAt) Bearing Data Center.

Conflicts of Interest

Author Hong Zhang was employed by the company China Key System & Integrated Circuit Co., Ltd., and author Zhiwei Li was employed by the company EngineTech Computing (Xi’an) Computer Co., Ltd. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

References

  1. Chen, H.; Liu, Z.; Alippi, C.; Huang, B.; Liu, D. Explainable intelligent fault diagnosis for nonlinear dynamic systems: From unsupervised to supervised learning. IEEE Trans. Neural Netw. Learn. Syst. 2022, 35, 6166–6179. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  2. Niola, V.; Cosenza, C.; Fornaro, E.; Malfi, P.; Melluso, F.; Nicolella, A.; Savino, S.; Spirto, M. Torque/speed equilibrium point monitoring of an aircraft hybrid electric propulsion system through accelerometric signal processing. Appl. Sci. 2025, 15, 2135. [Google Scholar] [CrossRef] [Scilit]
  3. Márquez, F.P.G.; Gonzalo, A.P.; Papaelias, M. A comprehensive review of condition monitoring systems for hydropower stations: Technologies, applications, and future trends. Electr. Power Syst. Res. 2026, 251, 112339. [Google Scholar] [CrossRef] [Scilit]
  4. Qi, J.; Karimi, H.R.; Uhlmann, Y.; Chen, Z.; Li, W.; Schullerus, G. Uncertainty-Aware Sensorless Anomaly Detection Using a Reliable Indicator From Position-Guided Multi-Step Deep Decomposition Network. Reliab. Eng. Syst. Saf. 2026, 271, 112258. [Google Scholar] [CrossRef] [Scilit]
  5. Kabir, T. Intelligent Condition Monitoring and Fault Diagnosis of Electrical Power and Control Systems Using Machine Learning–Based Predictive Analytics. Am. J. Interdiscip. Stud. 2026, 7, 177–222. [Google Scholar] [CrossRef] [Scilit]
  6. Li, Z.; Ma, J.; Wu, J.; Wong, P.K.; Wang, X.; Li, X. A Gated Recurrent Generative Transfer Learning Network for Fault Diagnostics Considering Imbalanced Data and Variable Working Conditions. IEEE Trans. Neural Netw. Learn. Syst. 2025, 36, 13782–13793. [Google Scholar] [CrossRef] [Scilit]
  7. Zhu, Z.; Lv, Z.; Xie, T. Trend contrast features-based bearing remaining useful life prediction method. Control Eng. Pract. 2025, 162, 106358. [Google Scholar] [CrossRef] [Scilit]
  8. Liu, J.; Zhang, C.; Jiang, X. Imbalanced fault diagnosis of rolling bearing using improved MsR-GAN and feature enhancement-driven CapsNet. Mech. Syst. Signal Process. 2022, 168, 108664. [Google Scholar] [CrossRef] [Scilit]
  9. Xu, Y.; Feng, K.; Yan, X.; Sheng, X.; Sun, B.; Liu, Z.; Yan, R. Cross-modal fusion convolutional neural networks with online soft-label training strategy for mechanical fault diagnosis. IEEE Trans. Ind. Inform. 2023, 20, 73–84. [Google Scholar] [CrossRef] [Scilit]
  10. Wang, H.; Liu, Z.; Peng, D.; Zuo, M.J. Interpretable convolutional neural network with multilayer wavelet for Noise-Robust Machinery fault diagnosis. Mech. Syst. Signal Process. 2023, 195, 110314. [Google Scholar] [CrossRef] [Scilit]
  11. Liao, W.; Fu, W.; Yang, K.; Tan, C.; Huang, Y. Multi-scale residual neural network with enhanced gated recurrent unit for fault diagnosis of rolling bearing. Meas. Sci. Technol. 2024, 35, 056114.1–056114.13. [Google Scholar] [CrossRef] [Scilit]
  12. Xiao, Y.; Shao, H.; Wang, J.; Yan, S.; Liu, B. Bayesian variational transformer: A generalizable model for rotating machinery fault diagnosis. Mech. Syst. Signal Process. 2024, 207, 110936. [Google Scholar] [CrossRef] [Scilit]
  13. Chen, J.; Li, T.; He, J.; Liu, T. An interpretable wavelet Kolmogorov–Arnold convolutional LSTM for spatial-temporal feature extraction and intelligent fault diagnosis. J. Dyn. Monit. Diagn. 2025, 4, 183–193. [Google Scholar] [CrossRef] [Scilit]
  14. Mao, W.; Feng, W.; Liu, Y.; Zhang, D.; Liang, X. A new deep auto-encoder method with fusing discriminant information for bearing fault diagnosis. Mech. Syst. Signal Process. 2021, 150, 107233. [Google Scholar] [CrossRef] [Scilit]
  15. Chen, H.; Luo, H.; Huang, B.; Jiang, B.; Kaynak, O. Transfer learning-motivated intelligent fault diagnosis designs: A survey, insights, and perspectives. IEEE Trans. Neural Netw. Learn. Syst. 2023, 35, 2969–2983. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  16. Jin, Y.; Song, X.; Yang, Y.; Hei, X.; Feng, N.; Yang, X. An improved multi-channel and multi-scale domain adversarial neural network for fault diagnosis of the rolling bearing. Control Eng. Pract. 2025, 154, 106120. [Google Scholar] [CrossRef] [Scilit]
  17. Zhu, Y.; Zhuang, F.; Wang, J.; Ke, G.; Chen, J.; Bian, J.; Xiong, H.; He, Q. Deep subdomain adaptation network for image classification. IEEE Trans. Neural Netw. Learn. Syst. 2020, 32, 1713–1722. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  18. Wu, Z.; Zhang, H.; Guo, J.; Ji, Y.; Pecht, M. Imbalanced bearing fault diagnosis under variant working conditions using cost-sensitive deep domain adaptation network. Expert Syst. Appl. 2022, 193, 116459. [Google Scholar] [CrossRef] [Scilit]
  19. Li, G.; Liu, S.; He, J.; Wang, L.; Wu, C.; Qian, C. A multi-domain adversarial transfer network for cross domain fault diagnosis under imbalanced data. Eng. Appl. Artif. Intell. 2024, 136, 108948. [Google Scholar] [CrossRef] [Scilit]
  20. Long, M.; Cao, Y.; Wang, J.; Jordan, M. Learning transferable features with deep adaptation networks. In Proceedings of the International Conference on Machine Learning; PMLR: Cambridge, MA, USA, 2015; pp. 97–105. [Google Scholar]
  21. Sun, B.; Saenko, K. Deep coral: Correlation alignment for deep domain adaptation. In Proceedings of the European Conference on Computer Vision; Springer: Berlin/Heidelberg, Germany, 2016; pp. 443–450. [Google Scholar]
  22. Zhang, Y.; Kang, B.; Hooi, B.; Yan, S.; Feng, J. Deep long-tailed learning: A survey. IEEE Trans. Pattern Anal. Mach. Intell. 2023, 45, 10795–10816. [Google Scholar] [CrossRef] [Scilit]
  23. Cui, Y.; Jia, M.; Lin, T.Y.; Song, Y.; Belongie, S. Class-balanced loss based on effective number of samples. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Long Beach, CA, USA, 15–20 June 2019; pp. 9268–9277. [Google Scholar]
  24. Kang, H.; Vu, T.; Yoo, C.D. Learning imbalanced datasets with maximum margin loss. In Proceedings of the 2021 IEEE International Conference on Image Processing (ICIP); IEEE: Piscataway, NJ, USA, 2021; pp. 1269–1273. [Google Scholar]
  25. Cao, K.; Wei, C.; Gaidon, A.; Arechiga, N.; Ma, T. Learning imbalanced datasets with label-distribution-aware margin loss. Adv. Neural Inf. Process. Syst. 2019, 32, 1567–1578. [Google Scholar]
  26. Ding, Y.; Jia, M.; Zhuang, J.; Cao, Y.; Zhao, X.; Lee, C.G. Deep imbalanced domain adaptation for transfer learning fault diagnosis of bearings under multiple working conditions. Reliab. Eng. Syst. Saf. 2023, 230, 108890. [Google Scholar] [CrossRef] [Scilit]
  27. Gao, T.; Yang, J.; Tang, Q. A multi-source domain information fusion network for rotating machinery fault diagnosis under variable operating conditions. Inf. Fusion 2024, 106, 102278. [Google Scholar] [CrossRef] [Scilit]
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.