Counterfactual domain generalization with adaptive source reweighting and causal disentanglement for bearing fault diagnosis
Abstract
The robustness and reliability of bearing fault diagnosis are crucial for ensuring the safe operation of complex rotating machinery. However, differences in operating conditions and machinery can lead to substantial domain shifts, thereby degrading the generalization performance of conventional deep learning models under unseen operating conditions and cross-machine scenarios. To address this issue, this paper proposes a multi-source domain generalization framework for bearing fault diagnosis based on class-conditional feature distance weighting and mechanism–style disentanglement. First, a dynamic source-domain weighting mechanism driven by class-conditional feature centers is developed. By measuring the distances between the class-conditional feature centers of each source domain and the shared multi-source feature structure, the contributions of different source domains to model training are adaptively adjusted, thereby mitigating the adverse effects of domain-specific biases and spurious correlations on model optimization. Second, a mechanism–style dual-branch network is constructed to learn fault mechanism representations that remain stable across domains and domain-related style representations, respectively. On this basis, reconstruction constraints and cross-domain counterfactual sample generation are jointly employed to preserve the completeness of the disentangled representations and improve the stability of mechanism representations under domain shifts. The proposed method achieves average accuracies of 96.68% and 89.71% on the cross-condition and cross-machine diagnosis tasks, respectively. These results demonstrate that the proposed method can effectively mitigate the influence of domain-related interference on fault identification and improve diagnostic stability in unseen domains.