Abstract
In the cross-machine fault diagnosis task of bearings for rotating machinery, inherent physical differences among different mechanical devices cause severe domain distribution shift of fault features. Consequently, the diagnostic model trained on the source machine suffers a dramatic decline in generalization performance when applied to diagnosis tasks of target machines, making it difficult to meet the requirements of practical industrial diagnosis. To address this issue, this paper proposes a heterogeneous dual-stream contrastive adversarial network (HDCAN). Firstly, one-dimensional (1D) vibration signals are converted into two-dimensional images via the symmetric dot pattern, constructing a signal-image multimodal input system. Secondly, a parallel dual-stream network architecture is designed, and a cross-modal contrastive learning strategy is introduced simultaneously to effectively eliminate the negative transfer effect between heterogeneous modalities and realize the pre-alignment of multimodal features. On this basis, the domain adversarial learning mechanism is integrated to further extract generalized features with both fault discriminability and domain invariance, so as to improve the cross-machine adaptation capability of the model. To verify the effectiveness of the proposed method, experiments are conducted on six cross-machine diagnosis tasks from three public bearing fault datasets. The experimental results show that the average diagnostic accuracy of the HDCAN model reaches 92.10%, which significantly outperforms the current mainstream domain adaptive fault diagnosis methods. The experimental results fully demonstrate that the proposed HDCAN can effectively alleviate the distribution shift problem of cross-machine fault data and possesses great application potential in industrial practical scenarios.
Introduction
As core components of modern industrial systems, rotating machinery plays a critical role in determining the machining quality and stability of computer numerical control machine tools.1,2 Rolling element bearings represent one of the most vulnerable critical parts within such equipment. Therefore, conducting regular condition monitoring and fault diagnosis on bearings facilitates the timely detection of incipient fault signatures, enables the implementation of preventive maintenance measures, and ensures the reliable operation of rotating machinery. 3
In recent years, to address the complex and variable working conditions in real-world industrial scenarios, researchers have increasingly focused on the deep mining and joint analysis of time-domain and frequency-domain information. For instance, Ma et al. 4 proposed the TFD-Former framework based on a convolutional neural network (CNN)-Transformer architecture, which achieves precise alignment and efficient fusion of time-frequency domain features through customized contrastive learning loss and cross-attention mechanisms. Aiming at the domain shift problem caused by variable rotational speeds, Pang et al. 5 developed a time-frequency supervised contrastive learning framework to extract speed-immune, class-invariant features by learning the physical consistency of the time-frequency information in bearing signals. Furthermore, to overcome the challenge of scarce labeled data, He et al. 6 introduced a self-supervised learning model based on time-frequency dual-domain contrast and fusion, utilizing a dual-encoder and a time-frequency fusion encoder to effectively capture the global and local nonlinear dynamic features of the signals. Although these methods have demonstrated significant efficacy in specific scenarios, their practical applications are still bottlenecked by the reliance of traditional time-frequency analysis on the stationarity assumption, presenting the following shortcomings: (1) In the time-frequency representations generated by short-time Fourier transform or continuous wavelet transform, the amplitude and frequency distributions fluctuate violently with changes in equipment speed or load, leading to severe feature drift; (2) Traditional time-frequency analysis heavily emphasizes amplitude distribution, making weak early fault features susceptible to being masked by strong background noise; (3) Such preprocessing methods are highly dependent on the intervention of expert experience and prior knowledge.
Compared with traditional time-frequency analysis methods, the symmetric dot pattern (SDP),7,8 serving as an intuitive signal representation strategy, can directly map 1D time-series signals into mirror-symmetric, snowflake-like two-dimensional (2D) images. This method is not only easy to implement with low computational overhead but also theoretically circumvents the heavy reliance of traditional time-frequency analysis on the stationarity assumption of signals. To date, several studies have validated the effectiveness of SDP under more stringent working conditions. For instance, Wang et al. 9 combined SDP with CNNs, demonstrating that the method yields high diagnostic accuracy and fault localization capabilities. Tang et al. 10 fused multi-sensor information using a color-SDP approach and designed a coarse-to-fine diagnostic framework, successfully achieving motor fault diagnosis in highly noisy environments. Hao et al. 11 utilized the SDP method to convert time-series signals into 2D images to enhance feature representation, realizing accurate diagnosis under transient speed conditions. The aforementioned research has preliminarily verified the substantial potential of SDP in complex environments, such as those with strong noise and transient conditions. However, in actual industrial production, mechanical equipment frequently operates under variable working conditions, and the training and testing data often originate from different physical machines. In the presence of significant distribution shifts between the source and target domains, the generalization performance of existing models often experiences a sharp decline, making it difficult to meet the stringent demands for high reliability in industrial fields. Therefore, how to overcome spatial distribution discrepancies to achieve robust cross-condition and cross-machine fault diagnosis remains an open issue worthy of further in-depth exploration.
With the successful application of transfer learning (TL) in fields such as computer vision and natural language processing,12–14 TL-based intelligent fault diagnosis has demonstrated the capability to achieve effective end-to-end fault detection and has gradually emerged as a research hotspot. For instance, Li et al. 15 proposed a deep continual TL framework named deep continual transfer learning network with dynamic weight aggregation (DCTLN-DWA), capable of effectively handling industrial streaming data under varying working conditions. Li et al. 16 introduced a novel unsupervised TL method combining joint distribution and adversarial networks for the fault diagnosis of bearings and gears in rotating machinery. Similarly, Li et al. 17 proposed a TL approach utilizing a generative adversarial network, which demonstrated satisfactory fault diagnosis performance under imbalanced data conditions.
As a feasible solution, domain adaptation (DA) techniques have extended TL methods from academic research to industrial applications. The key to DA-based methods lies in transferring diagnostic knowledge learned from labeled training data (source domain) to unlabeled testing data (target domain), thereby mitigating the domain shift problem. Existing mainstream DA methods can be broadly categorized into two types: distance metric-based methods and adversarial learning-based methods. First, metric-based methods employ statistical distances to measure the similarity between the source and target domains, explicitly assessing and minimizing distributional discrepancies. Second, adversarial-based methods design adversarial training between a feature extractor and a domain discriminator to implicitly induce domain-invariant features. Regarding metric-based approaches, Qin et al. 18 proposed a statistical metric method combining multi-kernel maximum mean discrepancy (MMD) and correlation alignment (CORAL). By simultaneously evaluating the mean and covariance between source and target domains, this method alleviated domain distribution drift under different operating conditions. Lin et al. 19 introduced an information fusion-enhanced DA attention network, incorporating a weight assignment module and a joint Maximum Mean Discrepancy metric strategy to mitigate the impact of negative transfer. Wang et al. 20 proposed a multi-target domain adaptive network based on transfer graph feature alignment, which was validated under varying rotational speeds and load conditions. Additionally, Wang et al. 21 presented a domain reinforcement feature adaptation method based on CORAL, addressing the cross-domain learning problem in compound fault diagnosis of rolling bearings. Yang et al. 22 proposed a Point-to-Set Metric-Gated Mixture of Experts model, combining multi-layer MMD measurements for domain alignment to ensure feature alignment across different domains.
From the above work, it is evident that existing intelligent fault diagnosis methods based on TL primarily focus on transfer between different operating conditions (load, speed). These studies demonstrate that TL enables intelligent fault diagnosis methods to be applied to datasets obtained from machines operating under diverse conditions. In industrial settings, annotated data for precision-critical and confidential machinery are scarce or even absent due to scheduled maintenance, limiting the application of these DA methods. Consequently, cross-machine transfer fault diagnosis becomes indispensable. Only when cross-machine transfer fault diagnosis functions effectively can intelligent methods trained on labeled data from other machines accurately assess the health status of machines with unlabeled data. Recently, researchers23–25 have begun to explore cross-machine fault diagnosis to facilitate practical industrial applications. This approach extracts diagnostic knowledge from machines with available fault data and transfers it to new machines. However, the diagnosis requires mitigating data shifts caused by variations in machine structures, bearing types, and working conditions, rendering it both a challenging and practically significant endeavor. For instance, Shao et al. 26 proposed a joint distribution alignment model based on information theory, which enhances the robustness of prediction results by introducing virtual adversarial training, thereby effectively improving the transferability of cross-device fault diagnosis. Liu et al. 27 proposed an adaptive source-free DA method named Adaptive Intra/Inter-domain Information Maximization (AI3M) for mechanical fault detection, which improves cross-machine performance by reducing both intra-domain and inter-domain distribution shifts. Yan et al. 28 introduced an enhanced cross-machine transfer strategy with multi-source domain knowledge (CMMK), boosting performance in cross-device diagnosis through multi-source collaborative training, adversarial training, and a custom threshold module. Kang et al. 29 proposed a mechanism-constrained cross-domain fault diagnosis framework, which achieves superior performance in cross-machine fault diagnosis tasks. Gu et al. 30 put forward a dynamic adversarial joint DA framework to improve the diagnostic adaptability of heterogeneous mechanical equipment. Miao et al. 31 designed a dual feature constraint-based three-component decoupled DA network. This method is capable of effectively extracting domain-invariant features.
Despite these advancements, several issues remain unresolved regarding reliable DA across highly discrepant domains in practical applications. On one hand, most existing studies rely on convolutional layers with limited receptive fields to extract local fault representations. They fail to capture useful global diagnostic knowledge, resulting in extracted features with insufficient generalization capability. Consequently, such methods often exhibit suboptimal generalization performance when signal distribution shifts become severe. On the other hand, the key to mitigating cross-machine signal shifts lies in addressing distribution alignment and knowledge transfer between the target and source domains. However, the majority of research remains confined to single-modal signal inputs, neglecting the complementary information available from multiple views. This oversight limits the model’s discriminative ability regarding complex fault patterns, thereby adversely affecting the accuracy of cross-machine diagnosis.
To address the aforementioned limitations, this paper proposes a novel heterogeneous dual-stream contrastive adversarial network (HDCAN). Firstly, to enrich the representational dimensions of fault features, the SDP transformation technique is introduced. This technique maps 1D vibration signals into 2D mirror-symmetric images within a polar coordinate system, thereby explicitly enhancing the geometric structural features of the signals. Building upon this, HDCAN constructs a parallel heterogeneous dual-stream feature extraction architecture, comprising a geometric-aware image branch and a multi-scale convolution-based time-domain signal branch. Secondly, to bridge the discrepancy between heterogeneous modal representations, a cross-modal contrastive learning strategy is designed. This strategy enforces high-level representations of the same-source samples in both the geometric and time domains to be pulled closer, achieving deep alignment of heterogeneous features. Finally, by integrating a domain adversarial learning module, the model extracts generalized features possessing both fault discriminability and domain invariance through the interplay between the feature extractor and the domain discriminator. The main contributions of this work are summarized as follows:
A specific HDCAN framework tailored for cross-machine fault diagnosis is proposed. We provide an in-depth analysis of the performance of SDP transformation under different mechanical equipment conditions. It is demonstrated that when rotational speeds or loads undergo drastic variations, SDP images provide crucial complementary geometric features, effectively resolving the issue of inadequate representation inherent in single-modal information.
A heterogeneous dual-stream feature extractor integrating a geometric-aware image branch and a time-domain signal branch is designed. Furthermore, a cross-modal contrastive learning mechanism is innovatively incorporated to realize the adaptive fusion of multi-view features.
End-to-end feature adaptation is achieved via domain adversarial learning. In six cross-machine diagnosis tasks constructed from three distinct mechanical equipment, HDCAN consistently achieves diagnostic performance superior to mainstream DA methods, verifying its generalization potential and practical application value in real-world industrial cross-device scenarios.
Theoretical background
Mathematical framework of SDP analysis
SDP is a method for converting time signals into images, and the differences among different signals can be reflected through the variations in the shapes of snowflake petals.
32
This structure is more sensitive to periodic shocks and can enhance the visualization expression ability of fault frequency components.
33
For the time-domain signal
where

The principle of SDP method: (a) time series, (b) the principle of signal into image, and (c) SDP image. SDP: symmetric dot pattern.
SDP images with sine signals at frequencies of 100, 200, and 400 Hz, as well as Gaussian white noise at 10 dB

The SDP images of (a) 100, (b) 300, and (c) 500 Hz sine signals and (d) 10 dB Gaussian white noise signals. Green and blue, respectively, represent the phase trajectories of the signal during its forward and backward temporal evolution. Their symmetrical relationship reflects the inherent time reversibility and periodicity characteristics of the signal. SDP: symmetric dot pattern.
Contrastive learning
Contrastive learning is a form of self-supervised learning, which aims to learn the representation of samples through the similarity contrast between samples. 36 Distinct from traditional generative self-supervised methods, contrastive learning aims to pull positive sample pairs closer together in the embedding space while pushing negative pairs apart by measuring the similarity between samples. In fault diagnosis tasks, to capture discriminative fault features, an encoder network is typically trained to map input samples into low-dimensional feature vectors.
For a given query sample
where
Framework of the proposed fault diagnosis method
Problem setup
In practical industrial settings, different mechanical equipment exhibits significant spatial variations in collected vibration signals due to differences in structural parameters and operating conditions, even when experiencing the same fault type. Treating different mechanical equipment as distinct domains, cross-machine fault diagnosis fundamentally constitutes a DA problem involving spatial distribution shifts. To address this practical challenge, the research object of this paper is focused on rolling bearings, the core component of rotating machinery. The application scenario is targeted at unsupervised cross-domain fault diagnosis across different mechanical equipment in industrial sites, where no labeled vibration data are available in the target domain. This distribution discrepancy prevents feature extractors and classifiers trained on source domain data from directly generalizing to target domain data. Therefore, the core challenge in cross-machine fault diagnosis lies in how to fully leverage labeled data on the source machine while effectively transferring the diagnostic model to the target machine.
To clarify the definition of this task, this paper adopts the diagnostic paradigm of end-to-end unsupervised fault classification. As illustrated in Figure 3, to define the target task, we have
where

Schematic illustration of the cross-machine fault diagnosis problem setup.
Overall framework
As shown in Figure 4, the proposed HDCAN is designed to address the spatial distribution shift problem in unsupervised bearing fault diagnosis across machines. Its overall architecture consists of four core modules: A. SDP transformation, B. Heterogeneous dual-stream feature extraction, C. Cross-modal contrastive learning, and D. Domain adversarial learning strategy.

Framework of HDCAN. HDCAN: heterogeneous dual-stream contrastive adversarial network.
First, the original 1D vibration signal
Subsequently, in the heterogeneous dual-stream feature extraction stage, the time-domain signal branch adopts multi-scale convolution and physical statistical feature calculation to capture local and global dynamic features of temporal data, generating the signal feature vector
To eliminate the distribution discrepancy between the two heterogeneous modalities, the cross-modal contrastive learning module projects
Finally, in the domain adversarial learning strategy module, the fused feature
SDP representation of bearing vibration signals for different machinery equipment
To evaluate the visualization effectiveness of the SDP method on bearing vibration signals from different mechanical equipment, this study selected bearing data from three distinct yet related mechanical systems: the Case Western Reserve University (CWRU) Data Center,
39
Jiangnan University (JNU),
40
and Xi’an Jiaotong University (XJTU).
41
The bearing vibration signals primarily encompass four bearing conditions: Normal (N), Ball Fault (BF), Inner Ring Fault (IF), and Outer Ring Fault (OF). To better distinguish bearing states, the parameters

Relationship between
Raw time-series data were acquired from various mechanical equipment, encompassing vibration signals under different rotational speeds and load conditions. Using Equations (1)–(3), the original bearing vibration signals were transformed into SDP images corresponding to parameters

Vibration signals and SDP images of three mechanical devices under different rotational speeds and load conditions: (a) vibration signals and SDP images of BF, IF, OF, and N under CWRU datasets; (b) vibration signals and SDP images of BF, IF, OF, and N under JNU datasets; (c) vibration signals and SDP images of BF, IF, OF, and N under XJTU datasets. SDP: symmetric dot pattern; N: Normal; BF: Ball Fault; IF: Inner Ring Fault; OF: Outer Ring Fault; CWRU: Case Western Reserve University; JNU: Jiangnan University; XJTU: Xi’an Jiaotong University.
Heterogeneous dual-stream feature extraction
To capture the characteristics of mechanical equipment faults across different domains, this paper proposes a heterogeneous dual-stream feature extraction architecture. As shown in Figure 7, this architecture comprises two parallel branches: the geometric-aware image Branch and the time-domain signal branch. The former is designed to extract spatial geometric features from transformed SDP images, whereas the latter focuses on mining multi-scale temporal features from raw vibration signals.

Structure of heterogeneous dual-stream feature extraction.
Geometric-aware image branch
SDP images visually represent the structural characteristics of vibration signals within the polar coordinate system. To effectively extract visual patterns from these images, we design a geometric-aware feature extractor based on EfficientNetB0. Specifically, an EfficientNetB0 model pre-trained on ImageNet is employed as the backbone network to extract shallow generic texture features. Let the input SDP image be denoted as
To further reinforce the geometric structural representation of fault patterns, a Geometric Feature Enhancement Module is introduced following the backbone network. This module comprises two cascaded convolutional layers, employing the GELU activation function and L2 regularization to prevent overfitting. Subsequently, a Spatial Attention Mechanism is incorporated to adaptively weight salient feature regions. The attention weight map
where,
To obtain a global feature representation, both global average pooling (GAP) and global max pooling (GMP) are simultaneously employed to reduce the dimensionality of the feature maps. Subsequently, the final image feature vector
where ⊕ denotes the feature concatenation operation.
Time-domain signal branch
Considering that mechanical fault signals typically exhibit complex non-stationary impulsive components and periodic patterns, single-scale convolutional networks struggle to simultaneously capture local transient features and global dependencies. Therefore, a time-domain feature extraction branch integrating multi-scale convolutions and statistical features is designed.
The multi-scale convolutional feature extraction module comprises convolutions of three distinct scales: large, medium, and small (
where
In cross-domain scenarios, high-order statistical features of signals exhibit high sensitivity to weak transient impulses induced by incipient faults. To compensate for the limited physical interpretability of neural networks, physical statistical features
where
where
Cross-modal contrastive learning and feature fusion
As shown in Figure 8, to prevent the heterogeneous modalities 1D vibration signals and SDP images from triggering negative transfer during the subsequent domain adversarial learning process, this paper develops a heterogeneous modality negative transfer suppression mechanism based on cross-modal contrastive learning prior to the feature fusion stage. Specifically, this mechanism utilizes cross-modal contrastive learning to project the feature representations of the 1D signals and SDP images into a unified metric embedding space. By minimizing the cross-modal feature distance of the same sample, it pre-eliminates the distribution discrepancy introduced by modality heterogeneity before fusion. Subsequently, multi-modal feature fusion is executed to ensure that the fused representations exclusively encapsulate the cross-machine domain shift caused by physical equipment variances. This strategy empowers the subsequent domain adversarial module to focus solely on cross-machine distribution alignment, isolating the interference stemming from heterogeneous modal differences and thereby fundamentally averting the occurrence of negative transfer.

Structure of cross-modal contrastive learning.
First, to map image and signal features of distinct dimensions into a common metric subspace of uniform dimensionality, independent non-linear projection heads are designed for each branch. The projection process is defined as follows:
where
Furthermore, to ensure that image and signal embeddings from the same fault sample are pulled closer together, while those from distinct samples are pushed apart, a cross-modal contrastive loss function is designed. Specifically,
For a training batch containing
where
To maximize the mutual information of the positive pairs
The total contrastive loss is defined as the average over the entire batch:
By minimizing the feature distance between the image and signal domains for the same equipment state, this loss function compels the model to learn modality invariant feature representations, thereby enhancing feature robustness against cross-domain environmental variations.
By minimizing the feature distance between the image and signal domains for the same equipment state, this loss function compels the model to learn modality-invariant feature representations, thereby enhancing feature robustness against cross-domain environmental variations. To preserve the richest original information, the fusion stage utilizes the pre-projection features,
where ⊕ denotes the concatenation operation, while
The ultimately obtained
Domain adversarial learning strategy and total optimization objective
Due to significant variations in operating conditions across different mechanical equipment, the fused features
where
The domain discriminator
where
where
In summary, the overall training objective of the proposed HDCAN method is to simultaneously minimize the fault classification error and cross-modal discrepancy, while maximizing the domain discrimination error. The total loss function, denoted as
where
HDCAN for cross-machine fault diagnosis.
Diagnosis procedure
The fault diagnosis process of the proposed HDCAN is illustrated in Figure 9. It primarily comprises three distinct phases: data preprocessing, offline model training, and online cross-domain fault diagnosis. The detailed implementation steps are outlined as follows:
Phase 1: Data preprocessing and multi-modal construction: This phase aims to transform raw 1D vibration data into the heterogeneous input format required by the model, establishing signal-image paired samples. First, raw vibration signals from distinct mechanical equipment are acquired via accelerometers, with the source and target domains explicitly designated. A sliding window technique is employed to segment the continuous vibration signals into samples of length 1024, serving as the input
Phase 2: Offline training and joint adversarial optimization: This phase utilizes data from both the source and target domains to perform end-to-end offline training on the heterogeneous dual-stream adversarial network, aiming to learn domain-invariant discriminative fault features. First, the paired samples are fed into the network, where the image geometric features
Phase 3: Online testing and cross-domain diagnosis. In the online testing phase, the well-trained model is deployed to perform real-time diagnosis on target equipment operating under novel working conditions. First, vibration monitoring data from the target equipment are acquired in real-time and converted into standardized signal segments

Diagnosis procedure of HDCAN. HDCAN: heterogeneous dual-stream contrastive adversarial network.
Experimental study
This section validates the effectiveness of the proposed HDCAN method using public datasets from CWRU, JNU, and XJTU. It details the implementation process, training and testing procedures, and evaluation methods.
Dataset description
To validate the effectiveness of the proposed HDCAN in cross-machine diagnostic scenarios, we performed six transmission diagnostic tasks using bearing datasets obtained from three distinct yet related machines. Below are the details of the three datasets.
CWRU bearing dataset: Provided by CWRU, 39 this dataset is widely regarded as the benchmark for bearing diagnostics. The experimental platform, as shown in Figure 10, consists of a drive motor, a loading motor, a torque sensor, a dynamometer, and several test bearings. On the experimental platform, EDM was used to induce faults in motor bearings, creating defects with a diameter of 0.007 inches on the inner ring, rolling elements, and outer ring. Four load conditions were simulated: 0, 1, 2, and 3 hp. Vibration signals from the drive-end bearing were recorded at a sampling frequency of 12 kHz. Four healthy condition samples were selected: N, BF, IF, and OF.
JNU bearing dataset: Provided by JNU. 40 Figure 11 shows a schematic diagram of the rolling bearing fault diagnosis experimental setup. On the experimental platform, four fault types: N, BF, IF, and OF were artificially generated via wire cutting. Data for each fault type was recorded at three distinct rotational speeds: 6000, 8000, and 1000 rpm. Vibration signals from the drive-end bearing of the conveyor system were recorded at a sampling frequency of 50 kHz in the JNU dataset.
XJTU bearing dataset: Provided by the Aero Engine Research Institute of XJTU. 41 The experimental platform, as shown in Figure 12, consists of a drive motor, controller, planetary gearbox, parallel gearbox, and brake. In the experiment, four types of bearing faults were simulated on the planetary gearbox, including normal operation, rolling element failure, inner ring failure, and outer ring failure. During the experiment, the motor speed was set to 1800 r/min, and the sampling frequency was set to 20,480 Hz.

The test rig of CWRU bearing datasets. CWRU: Case Western Reserve University.

The test rig of JNU bearing datasets. JNU: Jiangnan University.

The test rig of XJTU bearing datasets. XJTU: Xi’an Jiaotong University.
Fault diagnostic tasks and implementation details
Each category in the source domain and target domain contains 1000 samples, resulting in 4000 samples for each domain. The training dataset includes both source domain and target domain samples, while the test dataset contains only target domain samples. Six cross-machine transfer tasks were constructed using the three distinct yet related bearing datasets to validate HDCAN’s effectiveness: A
Detailed information of three datasets.
CWRU: Case Western Reserve University; JNU: Jiangnan University; XJTU: Xi’an Jiaotong University; N: Normal; BF: Ball Fault; IF: Inner Ring Fault; OF: Outer Ring Fault.
The experiments were conducted in a software environment utilizing TensorFlow 2.10.0 and the Python 3.8 programming language. The hardware environment comprised an NVIDIA GeForce RTX 4060 Ti GPU and an i7-1165G7 CPU. The base hyperparameters for the experimental method were determined based on relevant prior research and experimental requirements to achieve satisfactory performance. The sample length, batch size, learning rate, and number of epochs were set to 1024, 64, 0.001, and 100, respectively. The model architecture and corresponding parameter settings used in the experiments are presented in Table 2. To mitigate randomness, the experiments were repeated 10 times, and the average results are reported.
Detailed structural parameters of the proposed HDCAN architecture.
Building upon the fundamental settings described above, the optimal hyperparameter grid search results related to the model and experimental configurations are illustrated in Figure 13. As can be seen from the figure, the core parameters of the proposed method in this study are the contrastive learning weight

Grid search for optimal core hyperparameters.
Comparison experiment
To further verify the effectiveness of HDCAN, nine state-of-the-art methods are adopted for comparison in six cross-domain fault diagnosis experiments. As shown in Table 3, the comparative methods include one non-domain adaptive method serving as the baseline (CNN), two methods based on signal-to-image conversion and information fusion (SDP-DRN 44 and PSDP-MLFNet 45 ), three metric-based methods (deep domain adaptation (DCORAL), 46 multiple feature spaces adaptation network (MFSAN), 47 and MSSA 48 ), as well as three adversarial learning-based methods (maximum classifier discrepancy (MCD), 49 adversarial cross-domain DANN (ACDANN), 50 and domain-adversarial neural networks (DANN) 46 ). In accordance with different comparison objectives, the nine methods are classified into four groups:
Comparison with domain-free adaptation methods. The first category demonstrates improvements achieved by domain-adaptive methods in transfer fault diagnosis tasks where target domain data is unlabeled. The comparison method involves training the CNN solely on source data, using only source domain data to train the CNN. Therefore, the CNN serves as the baseline for comparison with HDCAN methods.
Comparison with signal-to-image and multimodal fusion methods. The second category evaluates the effectiveness of converting original time series signals into spatial image patterns and fusing multi-channel information for fault identification. The SDP-DRN method adopts the SDP technique to transform 1D time series data into 2D snowflake graphs, and employs a deep residual network (DRN) for robust pattern diagnosis. PSDP-MLFNet further extends this research idea. It utilizes pixelated SDP (PSDP) to realize multi-channel fusion at the data level, and combines a multi-level fusion network (MLFNet) to jointly extract and exploit multimodal features from generated images and original vibration signals.
Comparison with metric-based DA methods. The third category illustrates how metric-based approaches utilize statistical distances to measure similarity between source and target domains, thereby assessing the impact of distributional differences. DCORAL aligns source and target domain distributions via the correlation alignment (CORAL) metric. MFSAN adjusts the distributions for each source-target domain pair and calibrates classifier outputs using domain-specific decision boundaries, selecting MMD to estimate differences between domains. MSSA employs a multi-branch network architecture and utilizes local MMD (LMMD) for subdomain distribution alignment.
Comparison with the latest domain-based adversarial methods. The fourth category compares three widely used domain adversarial methods to demonstrate that adversarial approaches designed between feature extractors and domain discriminators can implicitly guide domain-invariant features. MCD aligns source and target distributions using task-specific decision boundaries. ACDANN integrates expert knowledge into fault diagnosis models through synthetic dataset generation and DA techniques. DANN incorporates a domain-discriminative component into deep neural networks, aiming to learn feature representations that are predictive on source domain data samples while insensitive to input domain information.
Detailed comparison of different fault diagnosis methods.
CNN: convolutional neural network; SDP: symmetric dot pattern; DRN: deep residual network; PSDP: pixelated symmetric dot pattern; MLFNet: multi-level fusion network; DANN: domain-adversarial neural networks; HDCAN: heterogeneous dual-stream contrastive adversarial network; 1D: one-dimensional; 2D: two-dimensional; MMD: maximum mean discrepancy; LMMD: local maximum mean discrepancy; GRL: gradient reversal layer.
Cross-machine diagnostic performance
Three statistical criteria, that is, accuracy (ACC), precision (PRE), and F1-score (F1) on six cross-machine tasks were used to evaluate the diagnostic results, as listed in Table 4 and Figure 14. The experimental results show that the proposed HDCAN method achieves the best overall performance, with average accuracy, accuracy, and F1 score reaching 92.10, 92.08, and 90.93%, respectively. Specifically, in the C
Diagnosis results on cross-machine tasks.
CNN: convolutional neural network; SDP: symmetric dot pattern; DRN: deep residual network; PSDP: pixelated symmetric dot pattern; MLFNet: multi-level fusion network; DANN: domain-adversarial neural networks.

Cross-machine diagnostic performance of different methods: (a) accuracy, (b) precision, and (c) F1 score.
Class-specific diagnostic performance
To investigate the identification capability for specific fault categories, a confusion matrix is employed to demonstrate the diagnostic accuracy for each category. Figure 15 presents the average results for the A

Confusion matrix of nine methods: (a) CNN, (b) SDP-DRN, (c) PSDP-MLFNet, (d) MFSAN, (e) MSSA, (f) MCD, (g) ACDANN, (h) DANN, and (i) HDCAN (Ours). CNN: convolutional neural network; SDP: symmetric dot pattern; DRN: deep residual network; PSDP: pixelated symmetric dot pattern; MLFNet: multi-level fusion network; DANN: domain-adversarial neural networks; HDCAN: heterogeneous dual-stream contrastive adversarial network.
Fault feature visualization
To intuitively evaluate the performance of each model in feature extraction and cross-domain alignment, we employed t-distributed Stochastic Neighbor Embedding to visualize the extracted features in task B

Feature visualization for eight methods: (a) CNN, (b) SDP-DRN, (c) DCORAL, (d) MSSA, (e) MCD, (f) ACDANN, (g) DANN, and (h) HDCAN (Ours). CNN: convolutional neural network; SDP: symmetric dot pattern; DRN: deep residual network; DANN: domain-adversarial neural networks; HDCAN: heterogeneous dual-stream contrastive adversarial network.
Generalization performance across operating conditions
To comprehensively evaluate the transfer robustness and overall generalization capability of the proposed method under varying operating conditions, a radar chart and its corresponding metric, the volume of hexagonal area (VHA), are introduced, as illustrated in Figure 17. The enclosed area of the radar chart intuitively reflects the balance of the model’s overall performance across the six cross-domain tasks; a larger VHA value indicates superior adaptability in handling complex variable operating conditions. Experimental results demonstrate that the proposed HDCAN method exhibits optimal cross-domain generalization performance, achieving a VHA value of

Radar maps for cross-domain diagnosis tasks.
Synergy analysis of optimization objectives
In this section, an in-depth collaborative analysis is conducted on the joint optimization process involving gradient conflict as well as the feature discriminative ability of cross-modal alignment and domain adversarial learning. The optimization objectives of cross-modal contrastive learning and domain adversarial learning present prominent synergistic effects. On the one hand, the domain adversarial module is designed to minimize the marginal distribution discrepancy between the source domain and target domain to realize distribution-level alignment. On the other hand, as illustrated in Equation (17), the cross-modal contrastive loss
To intuitively verify the synergistic effect of the above optimization objectives, Figure 18 presents the changing trends of various losses and target domain accuracy during the training of HDCAN in the B

Training dynamics of the joint optimization process: convergence analysis and target domain accuracy: (a) normalized convergence trends and (b) total weighted loss versus target accuracy.
Ablation experiment
To comprehensively validate the effectiveness and necessity of the core innovative modules within the HDCAN framework for cross-machine fault diagnosis tasks, a systematic ablation analysis was conducted. This analysis was performed under identical experimental settings across six cross-domain tasks constructed from three distinct mechanical devices. By sequentially removing key components of the model, four variant models were established for comparative analysis:
HDCAN w/o CL (without cross-modal contrastive learning): This variant retains the dual-stream feature extraction and domain adversarial modules but eliminates the cross-modal contrastive learning loss
HDCAN w/o DA (without domain adversarial adaptation): While preserving dual-stream feature extraction and contrastive learning, this variant removes the GRL and the domain discriminator (
HDCAN w/o Image (without geometric-aware image branch): By removing the SDP image branch, the model degenerates into a single-modal time-domain network. This variant is employed to evaluate the specific contribution of SDP-based geometric visual information to fault representation.
HDCAN w/o Stat (without statistical feature fusion): This variant excludes the calculation and fusion of physical statistical features within the time-domain signal branch, relying exclusively on the multi-scale convolutional network. It aims to verify the auxiliary role of physical prior knowledge.
The detailed results of the ablation study are presented in Table 5. Overall, the complete HDCAN model achieves the optimal average accuracy (92.10%) across cross-domain tasks. In comparison, removing any individual component leads to significant performance degradation. First, the performance of HDCAN w/o DA exhibits the most drastic decline, with the average accuracy decreasing by 17.63%. This result indicates that in cross-device diagnosis scenarios, the domain shift in feature distribution caused by discrepancies in physical structures and operating conditions across different machines is the primary factor limiting the model’s generalization capability. Lacking the constraints of the domain adversarial module, the model struggles to learn domain-invariant features, resulting in a substantial weakening of diagnostic capability on the target domain. Secondly, the removal of the cross-modal contrastive learning module results in a significant 13.52% drop in the model’s diagnostic accuracy. This experimental result demonstrates that the absence of an effective modality alignment mechanism leads to the entanglement of heterogeneous features within the shared feature space, thereby triggering severe negative transfer. Conversely, the introduction of CL not only achieves precise modality alignment for heterogeneous features but also establishes a strong synergistic effect with the subsequent domain adversarial mechanism. Operating in tandem, they effectively decouple the interference caused by modality heterogeneity, thereby fundamentally averting the occurrence of negative transfer. Furthermore, the accuracy of HDCAN w/o Image and HDCAN w/o Stat declines by 11.07 and 9.87%, respectively. This suggests that relying solely on raw vibration signals is insufficient to comprehensively capture complex fault patterns. The structural information provided by SDP images, combined with the physical impact priors offered by statistical features, provides critical complementary perspectives for the deep neural network, effectively enhancing feature discriminability.
Average ablation results of six cross-machine tasks.
HDCAN: heterogeneous dual-stream contrastive adversarial network; CL: cross-modal contrastive learning; DA: domain adaptation; MS-CNN: multi-scale convolutional.
In summary, the superior performance of HDCAN is attributed to the synergistic interaction among heterogeneous dual-stream extraction, cross-modal feature alignment, and domain adversarial adaptation. These components collectively ensure the model’s robustness and high precision in complex cross-machine scenarios.
Conclusion
This paper proposed a HDCAN to tackle the domain shift issue in cross-machine mechanical fault diagnosis. The proposed method constructs heterogeneous multimodal inputs of signals and images via the SDP. It designs a geometry-aware image branch and a time-domain signal branch to extract features in parallel. Cross-modal contrastive learning is adopted to achieve the alignment of heterogeneous features, and a domain adversarial module is integrated to learn general features with both fault discriminability and domain invariance. The superiority and effectiveness of the method are validated on six cross-machine diagnosis tasks covering three types of mechanical equipment.
Although the proposed method can effectively alleviate the cross-machine domain shift problem, it still has certain limitations. For instance, it fails to fully consider the prevalent class imbalance issue in practical industrial scenarios, that is, the model performance in dealing with long-tailed distribution or minority-class fault samples remains to be further verified. In future work, we will focus on cross-machine fault diagnosis technology under class imbalance conditions and commit to lightweight model design, so as to promote the deployment and application of the model in practical engineering scenarios.
Footnotes
Funding
The authors disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: The authors would like to express their sincere thanks to the National Natural Science Foundation of China under grant 2273109 and grant 073090; in part by the Guangdong Basic and Applied Basic Research Foundation under grant 2023A1515240020, under grant 2022A1515012022; and in part by the Sci-Tech Innovation Project of Graduate School of Guangdong University of Petrochemical Technology and the Sci-Tech Innovation Project for Joint Training Base of Professional Degrees Graduate of Maoming Green Chemical Industry Research Institute under grant 2025KJCX002, grant 2024KJCX006, grant 2024KJCX024, grant 2024KJCX032, and grant 2024KJCX002.
Declaration of conflicting interests
The authors declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
