A rotating machinery cross-domain unsupervised fault diagnosis method based on FLoR adaptive normalization
Patent Information
- Application Number
- CN202611015964.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-09
- Publication Date
- 2026-10-30
AI Technical Summary
[0008]本发明的目的在于提供一种基于FLoR自适应归一化的旋转机械跨域无监督故障诊断方法,旨在缓解现有技术在目标域标签缺失条件下跨域诊断性能受限的问题,同时降低多分类场景下的伪标签类别分布失衡风险,并实现对不同域间隙程度的自适应正则化调节
[0017]1. 提出了参数规模较小的轻量级域自适应机制,有助于缓解全参数微调引发的灾难性遗忘与过拟合问题。通过冻结骨干网络卷积权重与批归一化运行统计量,仅解冻FLoRNorm通道级对数混合参数与瓶颈投影层权重,在保留源域多工况数据上学习到的通用故障判别知识的前提下,利用批归一化与实例归一化的自适应加权融合,实现层级化的跨域特征调制。该适配策略通过限制可训练参数规模,在一定程度上降低了因参数更新导致的源域知识遗忘风险以及对目标域样本的过拟合风险。
Smart Images

Figure CN123012743A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of industrial equipment health management and artificial intelligence technology. Specifically, it relates to a method for cross-domain unsupervised fault diagnosis of rotating machinery by using the hierarchical low-rank normalization module built into a deep neural network to adaptively weight and fuse batch normalization and instance normalization statistics when there is a lack of labeled data for the target operating conditions. Background Technology
[0002] Rotating machinery is a core power component of modern industrial production lines and major equipment, and its operating status directly affects the safety and reliability of the entire system. Data-driven fault diagnosis methods based on deep learning, with their nonlinear feature mapping capabilities, can automatically extract high-dimensional features of fault mechanisms from vibration signals and have gradually become an important technical means in this field. However, the performance of deep diagnostic models usually depends on the assumption that the training and test data satisfy independent and identically distributed conditions and the existence of sufficient labeled samples in the target domain. In real industrial production sites, existing intelligent diagnostic technologies still face the following technical difficulties when deployed across domains:
[0003] 1. The dual constraints of difficulty in acquiring labeled data in the target domain and cross-domain distribution shift. In actual operation, industrial equipment experiences frequent changes in load and speed parameters, leading to distribution shifts in vibration signals collected under different conditions at the time-domain amplitude, frequency-domain energy distribution, and deep semantic feature levels. When a model trained under source domain conditions is directly deployed to an unseen target condition, diagnostic performance often degrades. Furthermore, in practical engineering, labeling newly acquired vibration data under the target condition requires significant manpower and time, and demands that labelers possess professional knowledge of vibration analysis and mechanical fault diagnosis. In some high-risk conditions or long-term continuous operation scenarios, labeling is difficult to implement. Therefore, achieving cross-domain transfer of fault diagnosis knowledge under conditions of missing target domain labels is a key technical challenge in this field.
[0004] 2. The risks of catastrophic forgetting and overfitting caused by full-parameter fine-tuning. Traditional domain adaptation methods typically fine-tune all or a large proportion of the parameters of the pre-trained model. When the target domain only has unlabeled data, large-scale parameter updates may destroy the general fault discrimination knowledge learned by the model on multi-condition data in the source domain, i.e., catastrophic forgetting occurs. At the same time, in the absence of explicit supervision signals, the high-degree-of-freedom parameter space may overfit to the statistical characteristics of specific samples in the target domain, weakening its generalization ability across different regions within the target condition. Therefore, a lightweight mechanism is needed to achieve domain adaptation with a smaller parameter scale, performing limited feature modulation on the target domain while preserving the general knowledge of the source domain.
[0005] 3. Accumulation and propagation of pseudo-label noise and class distribution imbalance in unsupervised training. Unsupervised domain adaptation relies on the model to automatically generate pseudo-labels for unlabeled data in the target domain to build a self-training loop. In the early stages of training, the model's predictive ability is limited, and there may be a high proportion of mislabeled pseudo-labels. In subsequent training iterations, these mislabeled labels may be gradually reinforced, forming confirmation bias, leading to the accumulation and propagation of erroneous knowledge in the model parameters. Furthermore, because the vibration signal features corresponding to different fault categories have different sensitivities to changes in operating conditions, the features of some categories may experience more significant distribution shifts in the target domain, resulting in a decrease in the number of pseudo-labeled samples for that category, thus causing class distribution imbalance. This leads to a continuous weakening of the classifier's ability to distinguish scarce categories during training.
[0006] 4. Fixed-intensity regularization is insufficiently adaptable to scenarios with varying domain gaps. The degree of difference in data distribution between the source and target domains varies depending on factors such as device type, the magnitude of changes in operating parameters, sensor installation location, and environmental noise levels. For scenarios with large domain gaps, appropriate intensity of parameter regularization helps smooth the optimization surface and improve cross-domain generalization performance; however, for scenarios with small domain gaps where the domain generalization baseline model can already achieve high diagnostic accuracy, regularization of the same intensity may introduce unnecessary parameter perturbations, leading to model performance degradation. Therefore, the regularization intensity needs to be able to adaptively adjust according to the degree of domain gap.
[0007] To address the aforementioned issues, there is currently no unsupervised cross-domain fault diagnosis method that can simultaneously achieve small parameter scale domain adaptation, multi-class training stability assurance, pseudo-label quality maintenance, and adaptive adjustment of regularization intensity. Summary of the Invention
[0008] The purpose of this invention is to provide a cross-domain unsupervised fault diagnosis method for rotating machinery based on FLoR adaptive normalization, which aims to alleviate the problem of limited cross-domain diagnosis performance of existing technologies under the condition of missing target domain labels, while reducing the risk of imbalance in pseudo-label category distribution in multi-class scenarios, and realizing adaptive regularization adjustment for different domain gap degrees.
[0009] To achieve the above objectives, the present invention provides the following technical solution: a cross-domain unsupervised fault diagnosis method for rotating machinery based on FLoR adaptive normalization, comprising the following steps:
[0010] Step 1: Source Domain Pre-training and Target Domain Data Preparation. A deep residual diagnostic network is trained to convergence using labeled vibration acceleration signals collected from rotating machinery under multiple known source domain conditions, resulting in a domain generalization pre-trained model. This model incorporates FLoRNorm normalization units within each residual block. Unlabeled vibration acceleration signals under the target condition are collected and converted into a two-dimensional time-frequency spectrum using a short-time Fourier transform, serving as input data for subsequent domain adaptive training.
[0011] Step 2: Lightweight Domain Adaptive Module Configuration. After loading the weight parameters of the domain generalization pre-trained model, freeze the weight parameters of the convolutional layers and the runtime statistics of the batch normalization layers in the backbone network. Only unfreeze the channel-level logarithmic mixing parameters, the affine transformation parameters of the batch normalization layers, and the weights and biases of the bottleneck projection layers in each FLoRNorm normalization unit, so that the number of trainable parameters is at a low level of the total number of parameters. Switch each FLoRNorm normalization unit to domain adaptive training mode.
[0012] Step 3: Unsupervised Joint Loss Optimization and Pseudo-label Quality Assurance. Based on the unlabeled time-frequency spectrum of the target domain, an unsupervised adaptive objective function is constructed that integrates the information maximization loss, the class-balanced pseudo-label cross-entropy loss, and the frozen prototype contrast loss. A log-normalization term based on the total number of classes is introduced into the information maximization loss. A minimum sample guarantee mechanism and a class-balanced weighting mechanism are introduced in the pseudo-label selection process.
[0013] Step 4: Adaptive Regularization of Domain Generalization Baseline Awareness and Knowledge Distillation Constraints for Frozen Models. After loading the pre-trained model, evaluate its zero-shot domain generalization accuracy on the target domain test subset, and adjust the strength of random perturbation consistency regularization accordingly. Save a copy of the domain generalization model with frozen parameters, and apply knowledge distillation constraints to the prediction output of the adapted model in each adaptation training step using the high-confidence prediction distribution of this frozen copy as a soft label.
[0014] Step 5: Exponential Moving Average Model Maintenance and Class Balance Refinement. During training, the model parameters are smoothed using exponential moving average to maintain independent inference parameters. After training convergence, the exponential moving average model is used to perform complete inference on the training samples in the target domain. An equal number of samples are taken from each class to construct a refined dataset with balanced class distribution, and fine-tuning is performed with a lower learning rate.
[0015] Step Six: Online Equipment Diagnosis. Real-time vibration signals of the rotating machinery under the target operating condition are acquired, preprocessed, and converted to time-frequency before being input into the adapted diagnostic model. During the inference phase, the FLoRNorm normalization unit performs batch normalization and instance normalization weighted fusion using the channel-level hybrid parameters learned and converged during the adaptation phase. The classifier outputs the fault diagnosis category based on the cosine similarity between the normalized feature vector and the prototype vectors of each frozen category.
[0016] The present invention has the following significant beneficial effects:
[0017] 1. A lightweight domain adaptation mechanism with a small parameter size is proposed, which helps to alleviate the catastrophic forgetting and overfitting problems caused by full parameter fine-tuning. By freezing the convolutional weights and batch-normalized runtime statistics of the backbone network, and only unfreezing the channel-level logarithmic mixing parameters of FLoRNorm and the bottleneck projection layer weights, hierarchical cross-domain feature modulation is achieved by using adaptive weighted fusion of batch normalization and instance normalization while preserving the general fault discrimination knowledge learned on multi-condition data in the source domain. This adaptation strategy reduces the risk of forgetting source domain knowledge and overfitting to target domain samples to some extent by limiting the size of trainable parameters.
[0018] 2. A multi-tiered training stabilization mechanism integrating class-balanced pseudo-label selection and frozen model knowledge distillation was constructed, which helps alleviate the problems of pseudo-label class distribution imbalance and feature drift in unsupervised training. A minimum sample guarantee mechanism for each class and a class-balancing weighting strategy based on inverse frequency were introduced during pseudo-label generation, which to some extent suppressed the dominant effect of common fault classes on gradient optimization direction. The high-confidence prediction distribution of the frozen domain generalization model was used as a soft label constraint for knowledge distillation, providing a reference from the source domain knowledge space for the optimization direction of the adaptation model. The synergistic effect of these two mechanisms improves training stability in multi-class scenarios to a certain extent.
[0019] 3. An adaptive regularization intensity adjustment strategy based on domain generalization baseline awareness was established, improving the adaptability of fixed-intensity regularization to scenarios with different domain gaps. Zero-sample domain generalization accuracy was used as a substitute metric for the degree of data distribution difference between the source and target domains. Based on this metric, the intensity of random perturbation consistency regularization was adjusted in stages: a higher intensity regularization was maintained when the domain gap was large to smooth the optimization surface; the regularization intensity was reduced when the domain gap was small to avoid unnecessary parameter perturbations. This adaptive strategy reduces the need for separate parameter searches for different application scenarios and, to some extent, reduces the risk of performance degradation due to over-regularization in scenarios where the domain generalization baseline is already high.
[0020] 4. The method implements category number normalization and multi-stage model refinement for the information maximization loss. The marginal entropy term in the information maximization loss is normalized to the logarithmic number of categories, ensuring that the strength of the diversity constraint is comparable across application scenarios with different numbers of fault categories, thus enhancing the method's versatility across various mechanical equipment and fault mode configurations. Simultaneously, a model smoothing mechanism based on exponential moving averages and a category-balanced pseudo-label refinement stage after training convergence are introduced. Equal resampling mitigates category distribution imbalance to some extent, further improving the model's classification fairness without introducing additional labeling information. Attached Figure Description
[0021] Figure 1 This is the overall flowchart of the unsupervised cross-domain fault diagnosis method for rotating machinery based on FLoR adaptive normalization according to the present invention;
[0022] Figure 2 This is a flowchart illustrating the internal structure and forward computation process of the FLoRNorm adaptive normalization unit in this invention.
[0023] Figure 3 This is a framework diagram of the unsupervised domain adaptive (FLoRA-UDA) joint loss optimization training and stabilization mechanism in this invention;
[0024] Figure 4 This is a flowchart illustrating the online cross-domain fault diagnosis reasoning process for devices in this invention. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0026] This invention proposes a cross-domain unsupervised fault diagnosis method for rotating machinery based on FLoR adaptive normalization, aiming to address the problem of adapting deep diagnostic models using multi-condition knowledge from the source domain when labeled samples are lacking in the target domain. Figure 1 As shown, this method achieves lightweight cross-domain adaptation by unfreezing only the FLoRNorm channel-level mixing parameters and bottleneck projection parameters in a pre-trained domain generalization model, combined with unsupervised joint loss optimization and multiple stability constraint mechanisms. The process is divided into the following six implementation steps:
[0027] Step 1: Time-frequency spatial mapping of non-stationary signals and acquisition of pre-trained models
[0028] This step aims to establish a mathematical mapping from a one-dimensional time-domain physical space to a two-dimensional time-frequency feature space, reducing the dependence of traditional diagnostic methods on prior information about rotational speed, and obtaining a domain-generalized pre-trained diagnostic model. This step consists of two stages: domain generalization pre-training and target domain data preparation.
[0029] 1.1 Domain Generalization Pre-training
[0030] During the physical sampling phase, accelerometers are used to collect raw one-dimensional vibration signal sequences of rotating machinery under multiple source domain conditions. Each source domain data is accompanied by a fault category label. A short-time Fourier transform time-frequency mapping operator is constructed. For a given sliding window function and the number of frequency domain sampling points N, the complex time-frequency response of the signal at the t-th time frame and the f-th frequency point is calculated using the following formula:
[0031] (1)
[0032] In the formula, The sliding step size, The imaginary unit is used. Subsequently, the amplitude of the complex spectrum is extracted and the logarithmic scale is taken to enhance the weak high-frequency impact energy components. Bilinear interpolation and Min-Max normalization operations are performed to generate a standardized two-dimensional time-frequency feature tensor, which serves as the input representation for the deep network.
[0033] The time-frequency feature tensors and their corresponding fault category labels under the above multi-source domain conditions are input into a deep residual diagnostic network for supervised training until convergence. This network integrates FLoRNorm normalization units in each residual block, and its internal structure is as follows: Figure 2 As shown, during the domain generalization training phase, a heterogeneous normalization strategy is implemented based on network depth: the shallow FLoRNorm performs style perturbation by randomly sampling mixed weights to expand the diversity of the underlying physical textures, while the deep FLoRNorm performs adversarial style stripping through gradient inversion to learn domain-invariant feature representations. After training, the model weight parameters are saved as a pre-trained model for domain generalization.
[0034] 1.2 Target Domain Data Preparation
[0035] Unlabeled vibration acceleration signals under the target operating condition are collected and processed using the same short-time Fourier transform procedure—including windowing and framing, complex time-frequency response calculation, amplitude extraction, logarithmic scale mapping, bilinear interpolation, and Min-Max normalization—to convert them into a standardized two-dimensional time-frequency spectrum, which serves as input data for subsequent domain adaptive training. This stage does not involve reading or using any label information to ensure the unsupervised nature of the target domain data.
[0036] Step 2: Building and Configuring a Lightweight FLoRA Domain Adaptive Module
[0037] This step employs a selective parameter freezing and unfreezing strategy. While preserving general fault detection knowledge from the source domain, it exposes only key parameters for target domain adaptation, thus limiting the model's degrees of freedom. For detailed internal structure and forward computation flow of the FLoRNorm normalized unit, please refer to [link to relevant documentation]. Figure 2 .
[0038] 2.1 Parameter Freezing and Unfreezing Strategy
[0039] Load the weight parameters of the domain generalization pre-trained model described in step one. First, iterate through the learnable parameters in the model and uniformly set their gradient tracking attributes to an untrainable state to achieve initial parameter freezing. Then, restore the gradient tracking of specific parameters one by one according to the following three rules:
[0040] (a) FLoRNorm channel-level logarithmic hybrid parameters: For the FLoRNorm normalized unit embedded in each residual block in the backbone network, its channel-level logarithmic parameters (with dimensions [1, ..., ...) are calculated. The learnable tensor [1,1] (where C is the number of feature channels in this layer) is restored to a trainable state. This parameter, after being activated by the Sigmoid function, generates channel-level dynamic mixing weights with values in the range (0,1), controlling the fusion ratio of batch normalized features and instance normalized features in the target domain for each channel.
[0041] (b) Batch normalized affine transformation parameters: For each batch normalized sub-module embedded in each FLoRNorm unit, its scaling factor and translation bias are restored to a trainable state, which is used to perform channel-level linear affine transformation on the fused normalized features.
[0042] (c) Bottleneck projection layer parameters: For the projection bottleneck layer at the end of the feature extraction network, the weight matrix and bias vector of its linear layer are restored to a trainable state. This bottleneck layer is responsible for mapping the high-dimensional deep feature tensor extracted by the backbone network to a lower-dimensional semantic feature vector, and its parameter adaptation plays an important role in the reconstruction of the target domain feature space.
[0043] The above strategy keeps the number of trainable parameters at a low level compared to the total number of model parameters, and keeps the convolutional weight matrix and batch-normalized runtime statistics of the backbone network frozen. During domain-adaptive training, the domain-adaptive mode flag of each FLoRNorm unit is set to an active state to enable positive gradient propagation to the channel-level log-mix parameters, allowing them to learn the batch-normalized and instance-normalized fusion ratio on the current target domain data distribution through gradient descent optimization.
[0044] 2.2 Forward Calculation Mechanism of FLoRNorm Normalized Unit
[0045] The FLoRNorm normalization unit is the core computational module of this method. Batch normalization extracts global operating condition statistics from the batch dimension across samples, preserving the statistical prior knowledge accumulated during multi-operating condition training in the source domain; instance normalization extracts individual instance statistics from the spatial dimension of a single sample, capturing the distribution characteristics unique to the target domain. Adaptive weighted fusion of these two normalizations using learnable channel-level hybrid weights enables cross-domain modulation of features from different channels and different levels of abstraction.
[0046] For the input feature tensor Its shape is [ , , , ], For batch size, For the number of channels, and For the spatial dimension, the FLoRNorm unit performs two sets of parallel normalization operations.
[0047] Batch normalization: Using the batch dimension as the statistical range, the global mean and variance across samples and spatial locations are calculated independently for each channel.
[0048] (2)
[0049] (3)
[0050] Instance normalization: Using the spatial dimension of a single sample as the statistical range, the spatial mean and variance are calculated independently for each sample and each channel.
[0051] (4)
[0052] (5)
[0053] Based on the above statistics, batch normalization characteristics were obtained respectively. Instance-normalized features Define the learnable channel-level logarithmic parameters. , dimension [1, The vector [,1,1] is initialized as a zero vector, corresponding to an initial blending weight of 0.5 after Sigmoid activation, meaning batch normalization and instance normalization are proportionally blended. After processing with the Sigmoid activation function, dynamic blending weights with values in the (0,1) interval are obtained. Perform channel-level weighted fusion of the two normalized features using the following formula:
[0054] (6)
[0055] In domain-adaptive training mode, gradients can be backpropagated to parameter δ_c, allowing it to learn the appropriate batch normalization to instance normalization mix ratio for each channel on the current target domain data through gradient descent or its adaptive variant. When the value approaches 0, this channel is dominated by batch normalization, tending to preserve the statistical prior of the source domain; when... When the value approaches 1, this channel prioritizes instance normalization, tending to emphasize the specificity of instances in the target domain. The injection of low-intensity Gaussian noise during training has a regularization effect, helping to prevent... Overfitting to a single, fixed value.
[0056] 2.3 Unified Forward Computation Path in the Inference Phase
[0057] When the model completes domain adaptive training and is deployed for inference, the FLoRNorm normalization unit, regardless of its operating mode during the domain generalization pre-training phase, uniformly uses the channel-level logarithmic parameter value learned and converged during the adaptation phase, which is then activated by the Sigmoid and used as a fixed deterministic hybrid weight:
[0058] (7)
[0059] This fixed mixing weight is used to perform a stable batch normalization and instance normalization weighted fusion on the test samples:
[0060] (8)
[0061] This inference mechanism ensures the determinism and reproducibility of computations during the model deployment phase, while retaining the target domain feature modulation knowledge learned during the adaptation phase. The computational path during inference is consistent with the parameters learned during the adaptation phase. For details of the inference process, please refer to [link to inference process]. Figure 4 .
[0062] Step 3: Construction and Optimization of Unsupervised Joint Loss Function
[0063] This step constructs a multi-objective optimization system comprising three complementary unsupervised loss functions, and introduces class number normalization and class balancing mechanisms to improve training stability in multi-class scenarios. The design of the unsupervised joint loss follows these principles: maximizing information guides the model to generate a highly confident and globally diverse prediction distribution for the target domain data; pseudo-label self-training provides fine-grained supervision signals at the class level; and prototype comparison maintains the structural alignment between the target domain features and the source domain semantic space. Figure 3 The upper part shows the structure of the loss function for this step.
[0064] 3.1 Information Maximization Loss and its Class Number Normalization
[0065] Information maximization is one of the fundamental optimization objectives in unsupervised adaptive learning. Its core idea is to simultaneously optimize the determinism and diversity of predictions under unlabeled conditions. This involves considering the unnormalized logistic values of the model output. The normalized prediction probability distribution is obtained through the Softmax function. The information maximization loss consists of two parts:
[0066] Conditional entropy term: Guides the model to make a high-confidence class prediction for each independent sample, i.e., minimizes the conditional entropy of the prediction distribution.
[0067] (9)
[0068] Marginal entropy term: Guides the model to tend towards a more uniform distribution of the predicted mean across batches, reducing the risk of the model concentrating samples in a few classes. To ensure that the strength of this regularization term is comparable across application scenarios with different total numbers of fault classes, the marginal entropy is normalized based on the logarithm of the number of classes:
[0069] (10)
[0070] In the formula, This represents the total number of fault categories. When the predicted mean distribution is uniform... Converging to -1; when the predicted distribution is completely concentrated in a single class. It converges to 0. This normalization operation allows the strength of the diversity constraint to automatically adapt to different application scenarios with varying numbers of categories.
[0071] The loss for maximizing overall information is a weighted combination of the conditional entropy term and the normalized marginal entropy term:
[0072] (11)
[0073] The weight of the marginal entropy term It is positively correlated with the mean probability of the largest class in the current batch, enabling dynamic adjustment of the diversity constraint strength: when the predicted probability of a certain class dominates in the batch, the diversity constraint is strengthened to suppress the collapse trend; when the distribution of each class has become uniform, the diversity constraint is reduced to avoid over-regularization.
[0074] 3.2 Category-balanced pseudo-label cross-entropy loss
[0075] Pseudo-label self-training is an important source of supervisory signals for unsupervised domain adaptation. However, naive pseudo-label strategies face the following risks: the model's predictive ability is limited in the early stages of training; erroneous labeling information in low-quality pseudo-labels may accumulate and be reinforced through gradient updates; and the inconsistent feature shifts of different categories in the target domain may lead to a reduction in the number of pseudo-labels for some categories, causing an imbalance in class distribution.
[0076] To alleviate the above problems, this method designs a pseudo-label selection and loss calculation strategy that includes course learning threshold scheduling, minimum sample guarantee for each class, and class balance weighting.
[0077] Define a course confidence threshold that monotonically increases with the training progress t. This enables a gradual shift from lenient to strict pseudo-label filtering.
[0078] (12)
[0079] In the formula, and These are the threshold termination value and the threshold start value (preferably set to 0.95 and 0.6 respectively in this embodiment). For the total number of training rounds, The parameter for controlling the threshold growth curvature is set to 0.5 in this embodiment. A lower threshold in the early stages of training allows the model to have sufficient pseudo-label samples for initial learning. As training progresses, the threshold is gradually increased to ensure the quality of the pseudo-labels.
[0080] After initial sample screening using the course confidence threshold as the global screening criterion, the number of pseudo-labeled samples is checked for each category. If the number of pseudo-labeled samples in a certain fault category is lower than the preset minimum threshold, the screening threshold for that category is lowered to supplement the samples, ensuring that each category has a basic number of samples participating in each training step.
[0081] When calculating the cross-entropy loss, count the number of pseudo-labeled samples for each category. The inverse of the number of samples in each category is used as the base weight for that category, and then mean normalization is performed on all weights to maintain the stability of the loss magnitude.
[0082] (13)
[0083] The final category-balanced pseudo-label cross-entropy loss is a weighted average of the cross-entropies of each selected sample. This weighting strategy, to some extent, suppresses the dominant effect of common fault categories with larger sample sizes on the gradient optimization direction.
[0084] 3.3 Freezing Prototype Comparison Loss
[0085] During the domain generalization pre-training phase, the classifier internally maintains a set of momentum prototype vectors corresponding to each physical fault category through a momentum moving average mechanism, with dimensions [ , ], For the number of categories, For feature dimensions (preferred in this embodiment) These prototype vectors are trained on multi-condition data in the source domain and contain typical semantic representations of each type of fault in the feature space.
[0086] Before the domain-adaptive training begins, the current values of this set of momentum prototype vectors are cloned and frozen, blocking the gradient propagation path of the copy, and serving as a fixed reference anchor for target domain feature alignment. In each training iteration, L2 normalization is performed on the target domain feature vector and the frozen prototype vector to project them onto the unit hypersphere. The cosine similarity between the normalized feature vector and the normalized frozen prototype matrix is calculated and divided by the temperature coefficient. (In this embodiment, it is preferably set to 0.07) The comparison logic value is obtained by scaling, and the cross-entropy loss is calculated using the pseudo-label as the supervision signal:
[0087] (14)
[0088] The purpose of this loss is to maintain the semantic alignment between the target domain feature representation and the source domain prototype space: even if the feature distribution of the target domain data shifts, the relative angular relationship between each category feature and its corresponding source domain prototype on the unit hypersphere should remain relatively stable. The prototype-freezing strategy provides structured supervision signals while avoiding the risk of the prototype itself being incorrectly updated under unsupervised conditions.
[0089] 3.4 Overall Objective Function
[0090] The weighted sum of the three loss functions constitutes the unsupervised joint optimization objective in step three:
[0091] (15)
[0092] Each loss weight in this embodiment has a default value, which can be adjusted appropriately according to different application scenarios. The random perturbation consistency regularization term and the frozen model knowledge distillation term introduced in the subsequent step four will be superimposed on the overall objective function to jointly constitute the complete optimization objective of this method.
[0093] Step 4: Adaptive Regularization of Domain Generalization Baseline Awareness and Freezing of Model Knowledge Distillation Constraints
[0094] This step introduces two complementary model stability enhancement mechanisms: the first is consistency regularization based on random perturbations of FLoRNorm channel-level parameters, which guides the model to converge to a smoother optimization surface by probing the loss landscape flatness in the parameter's neighborhood; the second is knowledge distillation constraint for the frozen domain generalization model, which uses the high-confidence prediction distribution in the source domain knowledge space as a soft-label anchor to the optimization direction of the adapted model. For the complete workflow, please refer to [link to full documentation]. Figure 3 The central region.
[0095] 4.1 Adaptive Perturbation Intensity Adjustment for Domain Generalization Baseline Awareness
[0096] The degree of difference in data distribution between the source and target domains is a core factor affecting the difficulty of adaptation. This method uses zero-shot domain generalization accuracy—that is, the classification accuracy obtained by the domain generalization pre-trained model directly on the target domain test subset without adaptation—as a substitute metric for the size of the domain gap: when the domain gap is small, the zero-shot domain generalization accuracy is relatively high; when the domain gap is large, the zero-shot accuracy is relatively low.
[0097] After loading the domain generalization pre-trained model, perform a zero-shot evaluation on the target domain test subset to obtain...
[0098] Based on this accuracy, the perturbation strength in random perturbation consistency regularization is automatically adjusted according to the following rules. The possible values of:
[0099] like A value of not less than 98% indicates a small domain gap, which will reduce the disturbance intensity. The value is set to zero to avoid introducing unnecessary noise.
[0100] like A value between 90% and 98% indicates a low level of domain gap, which will reduce the perturbation intensity. Attenuate to 0.3 times the preset baseline value;
[0101] like A value between 75% and 90% indicates that the domain gap is at a moderate level, which will reduce the perturbation intensity. Attenuate to 0.5 times the preset baseline value;
[0102] like A value below 75% indicates a large domain gap, maintaining the perturbation strength. The preset baseline value (preferably set to 0.15 in this embodiment) remains unchanged.
[0103] This tiered adjustment strategy automatically matches the regularization strength with the degree of domain gaps, which to some extent reduces the risk of performance degradation due to excessive regularization in scenarios where the domain generalization baseline is already high.
[0104] 4.2 Random Perturbation Consistency Regularization
[0105] The theoretical basis of consistency regularization lies in the smoothness assumption: a model with good generalization ability should exhibit relatively stable predictive behavior to small perturbations in the parameter space. This method optimizes the local flatness of the parameter space by applying random perturbations to the FLoRNorm channel-level mixing parameters and constraining the predictive consistency before and after the perturbations.
[0106] In each training iteration, perform the following sequence:
[0107] (a) Traverse the FLoRNorm normalized units and convert the logarithmic parameters of each channel level. The current value is saved to a temporary cache;
[0108] (b) For each Independently sampled random noise from a Beta distribution with parameters (0.5, 0.5). Transform it to a symmetric interval through a linear mapping. , The disturbance parameters are then superimposed onto the parameters to generate the disturbance parameters. :
[0109] (16)
[0110] In the formula, The perturbation intensity is after adaptive adjustment in step 4.1. The Beta(0.5, 0.5) distribution has a high probability density at both ends of the interval, which makes the perturbation more likely to generate a more extreme mixture ratio of batch normalization and instance normalization, which helps to more comprehensively detect the boundary areas of the lost landscape;
[0111] (c) Based on the parameters after perturbation Perform an additional forward propagation to obtain the perturbation prediction probability distribution p';
[0112] (d) Calculate the original predicted probability distribution With the probability distribution of disturbance prediction The KL divergence between them is used as the consistency regularization loss term:
[0113] (17)
[0114] (e) Restore the parameters of each FLoRNorm unit to their original values from the temporary cache. ,Will Add it to the overall loss function and perform a regular gradient descent parameter update.
[0115] This mechanism helps guide the model to avoid sharp regions with high curvature and converge to a wider and flatter generalization region by probing the loss landscape morphology in the vicinity of the parameters in each optimization step, thereby improving its robustness to distribution fluctuations within the target domain.
[0116] 4.3 Frozen Model Knowledge Distillation Constraints
[0117] The design motivation for knowledge distillation in the frozen domain generalization model stems from considerations of the risk of erroneous reinforcement in unsupervised self-training: the quality of pseudo-labels in the early stages of adaptation is limited, and if only pseudo-labels are relied upon as supervision signals, erroneous class attribution relationships may be gradually reinforced, leading to a drift in the semantic structure of categories in the feature space. The frozen domain generalization model, as a carrier of multi-condition knowledge from the source domain, can provide a relatively stable external reference for the adaptation process.
[0118] Before starting domain adaptive training, a deep copy operation is performed on the loaded domain generalization pre-trained model to obtain an independent copy model with the same network structure and parameter values. All parameters of this copy model are frozen, and the model is switched to evaluation mode to ensure that the batch normalized runtime statistics are not updated.
[0119] In each training iteration:
[0120] (a) Input the time-frequency spectrum of the current batch into the frozen copy model and the current adapted model respectively, and obtain their respective Softmax prediction probability distributions. and ;
[0121] (b) A high-confidence screening set is constructed using the sample indexes whose confidence level in the frozen copy model is higher than a preset threshold (preferably set to 0.95 in this embodiment). :
[0122] (18)
[0123] This screening condition ensures that only samples that the frozen domain generalization model can correctly classify with high confidence are included in the distillation constraint;
[0124] (c) For the filter set For the samples in the dataset, calculate the KL divergence between the log-Softmax probability of the adapted model and the probability distribution of the frozen copy model, and use it as the knowledge distillation loss:
[0125] (19)
[0126] (d) Add the distillation loss to the overall loss function.
[0127] The mechanism of knowledge distillation constraint is as follows: for samples that the domain generalization model can correctly classify with high confidence in the source domain knowledge space, the predicted distribution after adaptation is constrained by the frozen model and should not undergo significant shift. This constraint reduces the risk of category feature drift caused by iterative reinforcement of pseudo-labels to a certain extent; at the same time, distillation loss only applies to the high-confidence sample subset, preserving the necessary exploration and adjustment space for the adaptation model on low-confidence samples.
[0128] Step 5: Exponential Moving Average Model Maintenance and Class Balance Refinement
[0129] This step further improves the model's inference stability and classification fairness through two stages: exponential moving average parameter smoothing and class balancing pseudo-label refinement after training convergence. For the complete process of class balancing refinement, please refer to [link to relevant documentation]. Figure 3 The right-hand area.
[0130] 5.1 Exponential Moving Average Maintenance
[0131] Unsupervised adaptive optimization processes, lacking explicit guidance from true labels, may contain high levels of random noise in their gradient signals. Exponential moving averages, by incorporating historical parameter states into the current parameter estimate in an exponentially decaying manner, help suppress short-term parameter fluctuations caused by gradient noise.
[0132] After each gradient update step, the momentum coefficient is used. (In this embodiment, it is preferably set to 0.999) The model parameters are updated by exponential moving average, and a set of independent EMA inference parameters separate from the training model is maintained. :
[0133] (20)
[0134] In the formula, For the first The parameters of the trained model after gradient update are as follows. For the first The EMA model parameters are determined step by step. After training convergence, the EMA model replaces the training model and serves as the base model for subsequent refinement and final inference.
[0135] 5.2 Category Balance Pseudo-Label Refinement
[0136] Although a class balancing weighting mechanism is introduced in step three to alleviate class imbalance during training, a certain degree of class distribution imbalance may still exist at the end of training due to the global nature of the pseudo-label selection threshold and the inherent inconsistency in the degree of feature shift across different classes. The class balancing refinement stage aims to eliminate this residual class distribution bias to some extent after training convergence through a global resampling and fine-tuning.
[0137] The specific steps of the refining process are as follows:
[0138] (a) Switch the EMA model to evaluation mode, perform a complete gradient-free inference on the training samples of the target domain, group the samples according to the pseudo-label category predicted by the model, and retain only the samples in each group whose model confidence is higher than the preset threshold (preferably set to 0.9 in this embodiment).
[0139] (b) Count the number of pseudo-label samples in each category, take the minimum available number as the uniform sampling upper limit, independently and randomly sample an equal number of samples from each category, and merge them to form a refined dataset with balanced category distribution;
[0140] (c) Reconfigure the trainable parameters described in step two to perform a limited number of rounds (preferably 5 rounds) of fine-tuning on the EMA model at a learning rate lower than that of the main training phase (preferably 0.1 times the main learning rate in this embodiment). The loss function in the fine-tuning phase is a combination of pseudo-label cross-entropy loss and low-weight information maximization loss (weights set to 0.1 times that of the main training phase).
[0141] Class balancing refinement, without introducing additional manual annotation information, improves the fairness of the model's judgment of various faults to a certain extent by eliminating the class distribution bias left over from the training phase.
[0142] Step Six: Online Cross-Domain Fault Diagnosis for Equipment
[0143] After completing the domain adaptive training and refinement phases described above, the model enters the online deployment and inference phase. The model is then switched to evaluation mode, the learnable parameters in the network are fixed at their final convergence values, and the momentum prototype vector update operation is stopped to ensure the determinism and reproducibility of the inference process.
[0144] 6.1 FLoRNorm Unified Forward Computation in the Inference Phase
[0145] During the backbone feature extraction stage, regardless of its operating mode during the domain generalization pre-training stage, the FLoRNorm normalization unit uniformly uses the channel-level logarithmic parameters converged through gradient descent optimization during the adaptation stage. After mapping with the Sigmoid activation function, it obtains deterministic fixed hybrid weights with values in the (0,1) interval.
[0146] (twenty one)
[0147] The fixed mixing weights are used to independently perform a weighted fusion of batch normalization and instance normalization for each test sample. The batch normalization statistic uses the global runtime statistics accumulated during the domain generalization pre-training phase, while the instance normalization statistic is calculated independently from the current test sample. The weighted fusion ratio is determined by the convergence of the learning curve during the adaptation phase. Decide:
[0148] (twenty two)
[0149] 6.2 Feature Extraction and Fault Classification Based on Cosine Metric
[0150] The fused features are sequentially passed through subsequent residual layers and bottleneck projection layers of the backbone network for extraction. 3D projection eigenvectors (This embodiment is preferred) The features are then L2 normalized to project them onto a unit hypersphere.
[0151] (twenty three)
[0152] The classifier makes its decision based on the cosine similarity between the normalized feature vector and the prototype vectors of each frozen category described in step 3.3. Since both the feature vector and the prototype vector lie on a unit hypersphere, the cosine similarity is equivalent to their inner product, and its value depends only on the vector direction rather than the magnitude. This helps to avoid interference from the absolute energy fluctuations of the vibration signal caused by changes in the target operating condition load or rotational speed on the classification decision.
[0153] (twenty four)
[0154] In the formula, This is a scaling factor used to adjust the dynamic range of the output logic value.
[0155] Finally, the category index with the largest logical value is selected as the fault diagnosis result for the device's operating status:
[0156] (25)
[0157] This online diagnostic process retains the target domain batch normalization and instance normalization fusion parameters learned in the domain adaptation phase, and makes decisions based on the hyperspherical orientation of the feature vectors, thus mitigating the impact of signal energy drift on classification decisions across different operating conditions to some extent. Furthermore, since only standard forward propagation computation is required, the computational complexity of a single inference is consistent with that of conventional deep network inference, meeting the timeliness requirements of online monitoring in industrial settings.
Claims
1. A cross-domain unsupervised fault diagnosis method for rotating machinery based on FLoR adaptive normalization, characterized in that, Includes the following steps: Step 1: Source Domain Pre-training and Target Domain Data Preparation: Obtain a deep residual diagnostic network model that has completed domain generalization pre-training. This model has built-in FLoRNorm normalization units in each residual block, and its backbone convolution weights, batch normalization running statistics, and classifier momentum prototype have all converged. Collect unlabeled vibration acceleration signals under the target working conditions and convert them into two-dimensional time-frequency spectrum diagrams through short-time Fourier transform. Step 2, Lightweight Domain Adaptive Parameter Configuration: After loading the domain generalization pre-trained model, selectively freeze its learnable parameters: keep all convolutional layer weights and batch normalization layer running statistics of the backbone network in a frozen state, and restore the channel-level logarithmic mixing parameters in each FLoRNorm normalization unit, the affine transformation parameters of the batch normalization layer, and the weights and biases of the bottleneck projection layer to a trainable state. Each FLoRNorm normalization unit is switched from domain generalization training mode to domain adaptive training mode, so that the gradient is propagated positively to the channel-level logarithmic mixture parameter without passing through the gradient inversion layer. Step 3: Unsupervised Joint Loss Optimization: Based on the unlabeled time-frequency spectrum of the target domain, an unsupervised adaptive objective function is constructed, which integrates the information maximization loss, the class-balanced pseudo-label cross-entropy loss, and the frozen prototype contrast loss. The marginal entropy term in the information maximization loss is normalized by the logarithmic number of classes. The class-balanced pseudo-label cross-entropy loss adopts a course confidence threshold scheduling, class-by-class minimum sample guarantee, and class-balanced weighting strategy. The frozen prototype contrast loss uses a frozen copy of the momentum prototype vector converged during the domain generalization pre-training stage as the contrast anchor. Step 4: Adaptive Regularization of Domain Generalization Baseline Awareness and Knowledge Distillation Constraints for Frozen Models: After loading the pre-trained model, its zero-shot domain generalization accuracy on the target domain test subset is used as a substitute metric for the domain gap. Based on this, the intensity of random perturbation consistency regularization applied to the FLoRNorm channel-level log mixture parameters is adjusted in stages. At the same time, the high-confidence prediction distribution of the domain generalization model replicas of the frozen parameters is used as a soft label to apply knowledge distillation constraints to the prediction output of the adapted model. Step 5: Exponential moving average model maintenance and class balancing refinement: During training, the inference model parameters are maintained using exponential moving average; after convergence, the inference model is used to perform gradient-free inference on the training samples in the target domain, and a refined dataset with balanced class distribution is constructed by sampling equally according to the class, and fine-tuned with a learning rate lower than that of the main training phase. Step Six: Online Equipment Diagnosis: Acquire the real-time vibration signal of the rotating machinery to be diagnosed under the target operating condition, and input it into the adapted model after preprocessing and time-frequency conversion; the FLoRNorm normalization unit uses the channel-level logarithmic mixture parameter learned and converged in the adaptation stage after Sigmoid activation as the fixed mixture weight, independently calculates the instance normalized statistics for the test samples, and performs weighted fusion with the frozen batch normalized running statistics; the classifier outputs the fault diagnosis category based on the cosine similarity between the normalized feature vector and the frozen category prototype vector.
2. The method according to claim 1, characterized in that... The mode switching and domain adaptive forward computation of the FLoRNorm normalization unit in step two includes the following steps: Step 2 (a) Mode switching: Switch each FLoRNorm normalization unit from domain generalization training mode to domain adaptive training mode. In this mode, the gradient reversal layer is no longer connected in the gradient update path of the channel-level log-mixed parameters. The gradient propagates in the normal direction, so that it learns the batch normalization and instance normalization fusion ratio that minimizes the unsupervised loss function on the unlabeled data of the current target domain through the gradient descent optimization algorithm. Step 2 (II) Forward Computation for Domain Adaptive Training: In the domain adaptive training mode, each FLoRNorm normalization unit extracts batch normalized features and instance normalized features from its input feature tensor. The channel-level logarithmic mixing parameters are processed by the Sigmoid activation function to obtain dynamic mixing weights with values in the (0,1) interval. Channel-level weighted fusion is then performed according to the following formula: ,(1) The batch normalization feature is calculated based on the runtime statistics accumulated and frozen during the domain generalization pre-training stage, while the instance normalization feature is calculated independently based on the current target domain batch data. During training, low-intensity Gaussian noise is applied to the dynamic mixed weights to prevent them from overfitting to a single deterministic value. Step 2 (3), Forward computation during the inference phase: When the model is deployed for inference, all FLoRNorm normalization units no longer perform the noise injection operation of the training phase. Instead, they directly use the channel-level logarithmic parameters that have converged during the adaptation phase after Sigmoid activation as deterministic mixing weights to perform weighted fusion of batch normalized features and instance normalized features.
3. The method according to claim 1, characterized in that... The category number normalization process for maximizing information loss in step three includes the following steps: Step 3 (a): Obtain the predicted probability distribution from the unnormalized logistic values output by the model using the Softmax function, and calculate the conditional entropy term to guide the model to make a higher confidence class prediction for a single sample. ,(2) Step 3 (II): Calculate the mean distribution of the batch prediction probability and perform normalization on the marginal entropy term based on the logarithmic number of categories: ,(3) In the formula, C is the total number of fault categories. This normalization decouples the strength of the diversity constraint from the number of categories, and provides comparable constraint magnitudes in application scenarios with different total numbers of categories. Step 3 (iii): Weight the conditional entropy term and the normalized marginal entropy term to form the information maximization loss: ,(4) Among them, the weighting coefficient of the marginal entropy term It is positively correlated with the mean probability of the largest class in the current batch, and automatically strengthens the diversity constraint strength when the predicted distribution tends to concentrate on a minority of classes.
4. The method according to claim 1, characterized in that... The construction of the category-balanced pseudo-label cross-entropy loss in step three includes the following steps: Step 3 (4): Define the course confidence threshold that monotonically increases during the domain-dependent adaptive training process. ,(5) In the formula, and These are the threshold termination value and the threshold start value, respectively. For the total number of training rounds, Parameters for controlling the curvature of the threshold growth; Step 3 (5): After preliminary pseudo-label screening using the course confidence threshold as the global standard, check the number of pseudo-label samples for each category. For categories with a sample number lower than the preset minimum threshold, supplement the screening for that category using a category-specific threshold lower than the global threshold to ensure that each category has pseudo-label samples of no less than the minimum threshold participating in training. Step 3 (6): Count the number of pseudo-label samples in each category. The reciprocal of the number of samples in each category is used as the basic weight of the samples in that category. After mean normalization, the final weight coefficients for each category are obtained: ,(6) The standard cross-entropy loss of each screened sample is weighted and averaged using this weighting coefficient to obtain the class-balanced pseudo-label cross-entropy loss.
5. The method according to claim 1, characterized in that... The construction of the frozen prototype contrast loss in step three includes the following steps: Step 3 (7): Before the start of domain adaptive training, extract the current value of the class prototype vector that has converged through momentum moving average accumulation in the domain generalization pre-trained model classifier, perform a complete clone to obtain the frozen prototype matrix. The frozen prototype matrix blocks gradient propagation and remains unchanged in value throughout the subsequent domain adaptive training process, serving as a fixed semantic anchor point for target domain feature alignment. Step 3 (8): In each domain adaptive training iteration, L2 normalization is performed on the feature vector output by the bottleneck projection layer of the target domain, and L2 normalization is also performed on the prototype vectors of each category of the frozen prototype matrix. The cosine similarity between the normalized feature vector and the normalized frozen prototype matrix is calculated and divided by the temperature coefficient. After scaling, the cross-entropy loss is calculated using the pseudo-labels described in step three as the supervision signal: ,(7) This loss uses the frozen source domain prototype space as a reference to constrain the target domain features to maintain consistency with the semantic structure of the source domain categories during the adaptation process, while avoiding the prototype vector being incorrectly updated under unlabeled conditions.
6. The method according to claim 1, characterized in that... The random perturbation consistency regularization applied to the FLoRNorm channel-level logarithmic mixing parameter in step four includes the following steps: Step 4 (a) In each training iteration, traverse all FLoRNorm normalized units and combine the logarithmic mixing parameters of each channel. The current value is saved to a temporary cache; Step 4 (II): Adjust the logarithmic mixing parameters for each channel level. Independently sampled random noise from a Beta distribution with parameters (0.5, 0.5). After being linearly mapped to a symmetric interval, the values are superimposed on the current parameter values to generate perturbation parameters. : ,(8) In the formula, The perturbation intensity is determined after adaptive adjustment of the generalized baseline sensing in the longitude domain; the Beta (0.5, 0.5) distribution has a high probability density at both ends of the interval, which makes the perturbation tend to generate a more extreme batch normalization and instance normalization mixture ratio, so as to fully detect the loss landscape boundary in the parameter space. Step 4 (3): Based on the parameters after perturbation Perform an additional forward propagation to obtain the perturbation prediction distribution. Calculate the unperturbed prediction probability distribution With the probability distribution of disturbance prediction The KL divergence between them is used as a consistency regularization loss term: ,(9) Step 4 (iv): Restore the parameters of each FLoRNorm unit to their original values δ from the temporary cache, add the consistency regularization loss term to the overall loss function, and perform gradient descent parameter update.
7. The method according to claim 6, characterized in that... Disturbance intensity in step four The adaptive adjustment rule is: After loading the domain generalization pre-trained model, perform a zero-shot inference on the target domain test subset to obtain the zero-shot domain generalization accuracy Acc_DG; If Acc_DG is not lower than the first threshold, it indicates that the difference in data distribution between the source domain and the target domain is small. Therefore, α is set to zero and perturbation regularization is turned off. If Acc_DG is between the second threshold and the first threshold, The first proportion of the decay to the preset reference value; If Acc_DG is between the third threshold and the second threshold, The decay is reduced to a second proportion of a preset benchmark value, wherein the second proportion is greater than the first proportion; If Acc_DG is below the third threshold, it indicates a significant difference in data distribution between the source and target domains, and maintaining... The preset baseline value remains unchanged; This rule uses zero-sample domain generalization accuracy as a substitute metric for domain gap, making the regularization strength monotonically increase as the domain gap increases, thus achieving adaptive matching for different degrees of domain gap.
8. The method according to claim 1, characterized in that... The operation method for freezing model knowledge distillation constraints in step four includes the following steps: Step 4 (5): Before the domain adaptive training begins, perform a deep copy operation on the loaded domain generalization pre-trained model to obtain an independent copy model with the same network structure and parameter values. Set all learnable parameters and batch normalized running statistics of the copy model to the frozen state and switch to evaluation mode. Step 4 (6): In each domain adaptive training iteration, the time-frequency spectrum of the same batch is input into the frozen copy model and the current adapted model respectively, and their respective Softmax prediction probability distributions are obtained. and ; Step 4 (7): Construct a high-confidence screening set using the sample indexes whose prediction confidence is higher than a preset threshold using the frozen copy model. : ,(10) In the formula, The preset confidence level is used for filtering. Step 4 (8): For the samples in the selected set S, calculate the KL divergence between the log-Softmax probability of the adapted model and the probability distribution of the frozen copy model, as the knowledge distillation loss: ,(11) The distillation loss is added to the overall loss function with a preset weight, which constrains the predicted distribution of samples that the domain generalization model can correctly classify with high confidence during the adaptation process, reducing the risk of category feature drift caused by unsupervised pseudo-label iterative reinforcement.
9. The method according to claim 1, characterized in that... The category balancing and refining operation in step five includes the following steps: Step 5 (a) After the domain adaptive training main phase converges, switch the exponential moving average model to evaluation mode, perform a complete gradient-free forward inference on all target domain training samples, group the samples according to the pseudo-label category predicted by the model, and retain only the samples whose model prediction confidence is higher than the preset threshold in each group to form a candidate refined sample pool. Step 5 (ii): Count the number of samples in each category in the candidate refined sample pool, take the minimum available number as the unified sampling upper limit, independently and randomly sample an equal number of samples from each category, and merge them to form a refined dataset with balanced category distribution. Step 5 (3): Using a learning rate lower than that of the domain adaptive training main phase, perform a limited number of rounds of fine-tuning optimization on the exponential moving average model using the refined dataset. The loss function in the fine-tuning phase is mainly based on pseudo-label cross-entropy loss, supplemented by low-weight information maximization loss as a distribution regularization term. This refining process eliminates the class distribution imbalance bias that may remain in the main stage of domain adaptive training by resampling equal amounts of classes and fine-tuning with a low learning rate, without introducing additional manually labeled information.
10. The method according to claim 1, characterized in that... The online device diagnostic process in step six includes the following steps: Step 6 (a): Switch the model that has completed domain adaptive training and refinement to evaluation mode, fix all learnable parameters in the network as the final convergence value, stop updating the momentum prototype vector, and remove the random perturbation, knowledge distillation and consistency regularization modules used in the training phase. Step 6 (II): In the backbone feature extraction stage, each FLoRNorm normalization unit extracts the channel-level logarithmic mixing parameters that have converged through gradient descent learning in the domain adaptive stage. After Sigmoid activation, deterministic fixed mixing weights with values in the (0,1) interval are obtained. ,(12) Using this fixed mixing weight, a weighted fusion of batch normalized features and instance normalized features is performed on the current test sample: ,(13) The batch normalized feature is calculated based on the global runtime statistics accumulated and frozen during the domain generalization pre-training stage, and the instance normalized feature is obtained based on the spatial statistics calculated independently for the current single test sample. The fusion ratio of the two is uniquely determined by the mixed weights converged during the domain adaptation stage. Step 6 (III): The fused features are sequentially passed through subsequent layers of the backbone network and the bottleneck projection layer to extract the projected feature vectors and perform L2 normalization: ,(14) Step Six (IV): The classifier calculates the cosine similarity between the normalized feature vector and the prototype vector of each frozen category, and then applies a scaling factor. The adjusted logical value is as follows: ,(15) Step Six (V): Select the category with the largest evaluation logic value as the equipment fault diagnosis result: ,(16) The online diagnostic process does not perform gradient reversal, apply random perturbations, or update batch normalization runtime statistics during inference. Instead, it performs deterministic classification using the target domain optimal batch normalization and instance normalization fusion parameters learned in the domain adaptation phase, combined with the frozen source domain prototype space.
