A method and system for equipment fault diagnosis based on gradient-free adaptive meta-learning
By employing a gradient-free adaptive meta-learning method, freezing the backbone network parameters, and utilizing low-rank adaptation modules and gating functions to quantify the operational complexity, the stability and accuracy issues of equipment fault diagnosis in small-sample scenarios are resolved. This enables lightweight deployment and early warning, and is suitable for fault diagnosis in multi-equipment coupled systems.
Patent Information
- Application Number
- CN202611578625.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-13
- Publication Date
- 2026-11-10
AI Technical Summary
Existing equipment fault diagnosis methods suffer from several drawbacks in small-sample scenarios, including gradient noise causing rank distribution distortion, inability to objectively quantify operational complexity, overfitting due to full parameter fine-tuning, and lack of early warning functionality. These limitations make it difficult to achieve efficient diagnosis at edge terminals.
A gradient-free adaptive meta-learning method is adopted. By freezing the parameters of the backbone network, the working condition complexity index is calculated using the low-rank adaptation module and the gating function, and the low-rank parameters are updated without gradient. Combined with the dual-task shared parameter architecture of fault classification and time series prediction, a lightweight model adaptation is achieved.
It improves stability under extremely small sample conditions, reduces the consumption of computing resources at the edge, enables early fault warning, adapts to multi-equipment coupled systems, and has the characteristics of high precision and lightweight deployment.
Smart Images

Figure CN123069167A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of equipment fault diagnosis and predictive maintenance technology, specifically relating to a method and system for equipment fault diagnosis based on gradient-free adaptive meta-learning. Background Technology
[0002] Industrial rotating equipment such as wind turbine gearboxes, rolling bearings, metallurgical rolling mills, and rail transit motors; civilian electromechanical equipment such as elevator traction machines and new energy vehicle reducers; and high-end equipment such as aero engines, airborne servo systems, and ship propulsion systems are all susceptible to performance degradation, operational anomalies, and even failures during long-term operation due to factors such as load variations, environmental disturbances, component wear, and fluctuations in operating conditions. Therefore, monitoring the operational status, identifying anomalies, and providing early warnings of degradation trends for these devices are crucial for ensuring safe and reliable operation, reducing the risk of unplanned downtime, and improving maintenance efficiency.
[0003] In actual operation, in addition to vibration signals, the aforementioned equipment may also generate various types of time-series signals such as current, pressure, and power. Due to the influence of equipment operating mechanisms, load levels, and continuous changes in the external environment, this type of time-series data usually exhibits significant non-stationarity and operating condition dependence, resulting in substantial differences in data distribution across different operating stages and increasing the difficulty of anomaly detection and condition assessment.
[0004] Existing equipment anomaly detection methods still face several common problems in practical applications. First, equipment operates normally for most of its lifecycle, resulting in a sufficient number of normal samples, while the number of faulty samples is limited, and some anomaly types even lack effective annotations, leading to typical small sample sizes or class imbalance problems. Second, equipment load, environmental conditions, and operating modes change over long periods, causing detection models based on fixed data distributions to experience significant performance degradation under varying operating conditions. Third, actual monitoring systems are typically deployed on edge terminals or embedded devices, which have relatively limited computing resources, while existing deep learning models have large parameter scales, making it difficult to balance detection accuracy with real-time deployment requirements. Fourth, existing methods primarily focus on identifying existing anomalies, lacking effective characterization capabilities for early, subtle features during the gradual evolution of equipment from normal to abnormal states, making it difficult to achieve early detection of anomalies and warnings of deterioration trends.
[0005] In existing technologies, CN122262875A uses fixed-rank LoRA to fine-tune the diagnostic model, relying on gradient backpropagation to update low-rank parameters. However, fixed rank cannot adapt to the complexity differences of different working conditions. CN120822090A uses the standard MAML two-layer meta-update mechanism to perform meta-updates on all weights of the convolutional backbone, resulting in a huge number of parameters and a tendency to overfit under scarce fault samples. CN120011923A iteratively adjusts the effective rank of LoRA based on the fluctuation amplitude of the loss gradient in each round, but in scenarios with extremely small samples, the gradient noise is severe, and the rank allocation logic is prone to distortion. The three closest comparative patents mentioned above are all designed for a single independent device and only set a single fault classification task, which cannot achieve early fault warning. Summary of the Invention
[0006] The purpose of this invention is to provide a method and system for equipment fault diagnosis based on gradient-free adaptive meta-learning, in order to solve the technical problems of existing small-sample fault diagnosis methods, such as gradient noise causing rank distribution distortion, inability to objectively quantify operating condition complexity, overfitting caused by full parameter fine-tuning, and lack of early warning function.
[0007] To achieve the above objectives, the present invention adopts the following technical solution:
[0008] A device fault diagnosis method based on gradient-free adaptive meta-learning includes:
[0009] Obtain a pre-trained temporal base model, in which a low-rank adaptation module is embedded, and the low-rank adaptation module contains multiple low-rank components; freeze the backbone network parameters of the temporal base model;
[0010] Obtain a small number of labeled time-series samples of the target device under the current operating conditions as a support set;
[0011] Extract the feature distribution of the support set in the output space of the backbone network;
[0012] Based on the aforementioned feature distribution and the offline-stored reference feature distribution, the complexity index of the current working condition is calculated without gradient.
[0013] Based on the complexity index, the continuous gating weights of each of the multiple low-rank components are calculated using a gating function, and the low-rank adaptation increment for the current working condition is constructed based on the continuous gating weights. At the start of online adaptation for the current working condition, the effective low-rank components for the current working condition are determined based on the continuous gating weights, and the effective low-rank adaptation parameters for the current working condition are determined based on the set of the effective low-rank components. The higher the complexity index, the more effective low-rank components are selected.
[0014] The low-rank adaptation initial parameters and fault classification head initial parameters obtained offline are initialized as the online fast adaptation parameters for the current working condition. Based on the fault classification loss on the support set of the current working condition, the online fast adaptation parameters are updated in a finite number of steps. During the update process, the backbone network parameters and the meta-parameters are kept frozen to obtain the fault diagnosis model adapted to the current working condition.
[0015] The fault diagnosis model is used to perform forward reasoning on the time series data under test and output the fault classification results.
[0016] In some embodiments, the step of calculating the complexity index of the current operating condition without gradient based on the feature distribution and the offline-stored reference feature distribution includes:
[0017] Extract the mean of the feature centers of the support set in the output space of the backbone network. ;
[0018] Obtain the mean of global feature centers of historical operating conditions stored offline. ;
[0019] Calculate the distribution offset N between the mean of the feature centers and the mean of the global feature centers under historical conditions, and calculate the nonstationarity statistic D of the support set;
[0020] The complexity index is obtained by weighting and summing the distribution shift N with the non-stationary statistic D. ,in, and These are the weighting coefficients after offline optimization.
[0021] In some embodiments, the distribution offset N is the mean of the feature centers and the mean of the global feature centers. The normalized distance; the nonstationary statistic D is the normalized nonstationary statistic of the time series signal of the support set, and both N and D are mapped to the interval [0,1].
[0022] In some embodiments, the step of calculating the gating weights of the plurality of low-rank components using a gating function based on the complexity of the operating condition, continuously weighting the plurality of low-rank components according to the gating weights to form the low-rank adaptation increment of the current operating condition, and forming the target low-rank parameters of the current target operating condition based on the low-rank adaptation increment includes:
[0023] Obtain the offline stored gate vector s and sensitivity vector α, wherein the dimensions of the gate vector and sensitivity vector are the same as the total number of the low-rank components; the low-rank adaptation increment matrix of the current operating condition of the low-rank adaptation module is represented as: ,in To preset the maximum fit rank, For the Sigmoid function, b k and Let B and A be the k-th components of the low-rank parameters. Let be the k-th component of the entire control vector s. Let be the k-th component of the sensitivity vector, and , This represents the complexity index of the current operating condition; based on the low-rank adaptation increment matrix... The target low-rank adaptation parameters constitute the current operating conditions.
[0024] In some embodiments, determining the effective low-rank component of the current operating condition based on the continuous gating weights at the start of online adaptation for the current operating condition includes:
[0025] During online adaptation under the current operating condition, the continuous gating weights corresponding to each low-rank component are thresholded and binarized, and the effective adaptation rank under the current operating condition is calculated according to the following formula. : ;in, The function is an indicator function; it outputs 1 when the condition is true and 0 when it is false. Low-rank components that satisfy the gate weight greater than 0.5 are determined as effective low-rank components. Based on the effective rank... Determine the number of valid low-rank components selected.
[0026] In some embodiments, an offline meta-learning training step is included before utilizing the meta-parameters obtained offline:
[0027] Obtain time-series samples under multiple historical operating conditions, and divide them into multiple meta-tasks according to the operating conditions. Each meta-task contains a support set and a query set.
[0028] Freeze the backbone network parameters of the time series basic model and initialize a complete set of meta-parameters; the complete set of meta-parameters includes at least: the initial low-rank matrix, classification head parameters, prediction head parameters, gating vector, sensitivity vector and weighting coefficients of the low-rank adaptation module;
[0029] Perform a two-level meta-learning loop iteration:
[0030] Inner layer: For each meta-task's support set, calculate the meta-task's complexity index, construct the dynamic low-rank adaptation subspace corresponding to the meta-task based on the complexity index using continuous gating weights, initialize the fast adaptation parameters using the current global meta-parameters, calculate the joint loss, and update the fast adaptation parameters with gradients to obtain temporary adaptation parameters.
[0031] Outer layer: Calculate the total loss on the query set of the meta-task using the temporary adaptation parameters, and update the complete set of meta-parameters based on the total loss through backpropagation;
[0032] After iteration to convergence, the time series basic model, the updated set of meta-parameters, and the reference feature distribution are saved.
[0033] In some embodiments, the joint loss is: ;
[0034] in For predicting fault labels Compared to actual fault labels Cross-entropy classification loss between them For predicting trajectories With real future signals The mean square error between them Weights for predicting loss.
[0035] In some embodiments, the inner layer is updated as follows:
[0036] , These are the initial values for the fast adapt parameters, initialized from the current global meta-parameters. The new values of the fast-fit parameters are obtained after performing an inner gradient update, where β is the inner adaptive learning rate. This serves as the support set for the current meta-task.
[0037] The outer layer is updated as follows:
[0038] ;in For the complete set of meta-parameters, Update the learning rate for the outermost element. This is the query set for the current meta-task.
[0039] In some embodiments, the method further includes a fault warning step: setting a time-series prediction head in the fault classification model adapted to the current operating condition, wherein the initial parameters of the time-series prediction head are obtained by offline meta-training; fixing the backbone parameters of the time-series basic model in the online stage, and updating the low-rank adaptation parameters, fault classification head parameters, and time-series prediction head parameters corresponding to the effective low-rank components in a finite-step manner based on the joint loss composed of the fault classification loss and the time-series prediction loss on the current operating condition support set, to obtain a classification-prediction joint adaptation model; using the classification-prediction joint adaptation model to output the fault classification result and the future predicted time-series sequence, and calculating the anomaly score based on the residual between the predicted time-series sequence and the corresponding real time-series observation sequence arriving in the prediction time domain: Where H is the prediction time-domain step size, These are the multi-channel observations of the actual signal from the device at time τ. This represents the predicted value at time τ output by the model.
[0040] The abnormal score exceeds the warning threshold determined based on the health reference window. An early fault warning signal is output in real time, wherein the warning threshold is: ;
[0041] in, , These represent the mean and standard deviation of abnormal scores within the health reference window, respectively. This is the amplification factor for the early warning threshold; when the anomaly score... When the preset threshold δ is exceeded, an early fault alarm signal is output.
[0042] In some embodiments, before outputting the early fault alarm signal, the method further includes:
[0043] When the abnormal score exceeds the preset threshold and no warning has been triggered, an early fault alarm is output, the interval between the warning and the equipment failure is recorded, and the warning status is locked to avoid repeated alarms.
[0044] This embodiment also provides a device fault diagnosis system based on gradient-free adaptive meta-learning, including:
[0045] The signal acquisition module is used to acquire multi-channel timing signals from the device in real time.
[0046] The time series preprocessing and meta-task construction module is used to perform sliding window slicing, normalization, and meta-task support set and query set division on the acquired time series signals.
[0047] The offline meta-learning training module includes a frozen backbone unit, a low-rank adaptation embedding unit, a gradient-free working condition complexity calculation unit, a gating and filtering unit, and a two-layer meta-learning training unit, which is used to perform offline meta-learning training and output the time series basic model, a complete set of meta-parameters, and the mean of the feature centers of historical working conditions.
[0048] The new working condition online adaptive adaptation module includes a feature extraction unit, a gradient-free working condition complexity forward calculation unit, an effective rank screening unit, and a parameter fine-tuning unit. It is used to quickly fine-tune the low-rank adaptation parameters based on a small number of labeled samples under the new working condition and output a diagnostic model that adapts to the current working condition.
[0049] The inference output module is used to perform forward inference on the time series data to be tested using the adapted diagnostic model and output the fault classification results.
[0050] In some embodiments, the gradient-free working condition complexity calculation unit in the offline meta-learning training module is specifically used for:
[0051] Extract the mean of the feature centers of the current meta-task support set in the frozen backbone network output space. Obtain the mean of the global feature center of historical operating conditions stored offline. Calculate the distribution offset N between the mean of the feature centers and the mean of the global feature centers under historical operating conditions, and calculate the nonstationarity statistic D of the support set; and follow the formula... Calculate the complexity index of the current meta-task.
[0052] In some embodiments, the effective rank filtering unit in the new working condition online adaptive adaptation module is specifically used for:
[0053] Calculate the effective rank using the following formula. :
[0054] ;in, The function is an indicator function; it outputs 1 when the condition is true and 0 when it is false. Low-rank components that satisfy the gate weight greater than 0.5 are determined as effective low-rank components. Based on the effective rank... Determine the number of valid low-rank components selected.
[0055] In some embodiments, the inference output module further includes:
[0056] The time series prediction subunit is used to synchronously output the predicted time series sequence with future time domain steps; the anomaly score calculation subunit is used to calculate the window-level anomaly score according to the following formula:
[0057] Where H is the prediction time-domain step size, These are the multi-channel observations of the actual signal from the device at time τ. This represents the predicted value at time τ output by the model.
[0058] When the abnormal score exceeds a preset threshold, an early fault alarm signal is output.
[0059] The early warning threshold calibration subunit is used to collect samples and calculate the mean of abnormal scores when the device is in good health. and standard deviation , and according to Calculate and store the preset threshold, wherein This is the preset threshold amplification factor;
[0060] The early warning signal sending subunit is used to send an early fault alarm signal when the real-time anomaly score exceeds the early warning threshold.
[0061] The present invention has the following beneficial effects:
[0062] I. Pioneering a gradient-free working condition complexity proxy mechanism to completely eliminate gradient noise interference.
[0063] Existing technologies rely on gradient backpropagation to adjust the LoRA rank, which results in severe gradient noise in extremely small sample scenarios, leading to distortion of the rank allocation logic. This application employs a unique working condition complexity proxy mechanism, quantifying working condition complexity solely through network forward feature statistics (distribution offset + non-stationarity statistics), without connecting to the backpropagation gradient link throughout the process. This fundamentally eliminates gradient oscillation and parameter drift issues, significantly improving the stability of small sample adaptation under unknown working conditions.
[0064] II. Implementing LoRA Rank Adaptive Allocation Driven by Operating Condition Complexity to Balance Accuracy and Computing Power
[0065] Existing technologies employ fixed-rank LoRA, which cannot adapt to the varying complexity of different operating conditions—simple conditions suffer from computational redundancy, while complex conditions lack sufficient representation capabilities. This application addresses this by using a gating mechanism to automatically allocate effective ranks based on the surrogate value of the operating condition complexity: the more complex the operating condition, the more low-rank components are activated; the simpler the operating condition, the smaller the effective rank is automatically. This significantly reduces the computational power consumption for edge inference while maintaining diagnostic accuracy.
[0066] Third, the lightweight meta-learning architecture has only 4.7% of the parameters of the full MAML, suppressing overfitting from the source.
[0067] Existing technologies perform MAML meta-updates on all parameters of the backbone network, resulting in a massive number of parameters and severe overfitting under scarce fault samples, making them unsuitable for deployment on edge devices. This application freezes the backbone of the time-series basic model and performs meta-training and online fine-tuning only on a lightweight LoRA parameter set, significantly reducing the number of trainable parameters. This suppresses overfitting on small samples at the architectural level and is suitable for lightweight deployment on industrial edge devices.
[0068] IV. Pioneering dual-task shared parameter architecture for classification and time series generation and prediction, filling the gap in early warning.
[0069] All three existing technologies only set up a single fault classification task, which can only diagnose the fault after it has fully occurred and lacks early warning capabilities. This application builds a dual-task branch for fault classification and time series generation and prediction by sharing LoRA parameters, and further improves the generalization ability of small samples by mutual regularization of joint loss; at the same time, it generates anomaly scores by calculating the residual between the predicted time series and the actual time series, which can trigger early warning before the fault fully occurs, forming a complete closed loop of industrial predictive maintenance.
[0070] V. It has strong versatility in various scenarios, covering both single-unit devices and multi-equipment coupled systems.
[0071] The existing three types of comparative patents are only designed for single, independent rotating mechanical components, and cannot be adapted to complex engineering systems with multiple coupled equipment, such as wind power clusters, rail transit vehicles, and aviation power subsystems. This application is not limited to vibration signals from a single device, but is compatible with all time-series signal types such as current, pressure, and power. It can also be extended to the global monitoring of complex engineering systems with multiple coupled equipment, and is adapted to engineering needs such as multi-source heterogeneous sensing, layered edge computing deployment, and cascading fault prediction. Its engineering applicability and scenario breadth are significantly superior to existing technologies. Attached Figure Description
[0072] Figure 1 This is the overall framework diagram of the present invention, which includes three core coupled modules: offline meta-training, online adaptation to new working conditions, and real-time diagnosis and early warning.
[0073] Figure 2 This is a flowchart of the offline two-layer MAML meta-training process, which includes meta-task sampling, gradient-free working condition complexity calculation, effective rank selection, dual-task loss calculation, inner layer adaptation and outer layer meta-parameter update processing flow.
[0074] Figure 3 The flowchart for online working condition adaptation includes feature extraction, calculation of working condition complexity index CCP(Ω), effective rank screening, parameter fine-tuning, and output of the execution process of the working condition adaptation model.
[0075] Figure 4 This is a flowchart for labelless early fault diagnosis and warning of devices driven by real-time time-series prediction. It includes the logic of warning threshold calibration, parallel model inference, anomaly score calculation, fault alarm output and alarm locking. Detailed Implementation
[0076] Various exemplary embodiments, features, and aspects of this application will now be described in detail with reference to the accompanying drawings. The same reference numerals in the drawings denote elements that have the same or similar functions. Although various aspects of the embodiments are shown in the drawings, they are not necessarily drawn to scale unless specifically indicated otherwise.
[0077] This embodiment provides a device fault diagnosis method based on gradient-free adaptive meta-learning.
[0078] In the specific scheme setup, a pre-trained temporal base model is first obtained, which embeds a low-rank adaptation module containing multiple low-rank components. The backbone network parameters of this temporal base model are then frozen. By freezing the backbone network, the model maintains its general temporal representation capability throughout all subsequent training and inference processes, while significantly reducing the number of trainable parameters.
[0079] Based on this, a small number of labeled time-series samples of the target device under the current operating conditions are obtained as a support set, and the feature distribution of this support set in the output space of the backbone network is extracted. This setting enables the system to adapt to operating conditions relying only on a small number of labeled samples, overcoming the difficulty of scarce labeled data in small sample scenarios.
[0080] Subsequently, based on the aforementioned feature distribution and the offline-stored reference feature distribution, the complexity index of the current operating condition is calculated using a gradient-free method. This approach abandons the traditional method of relying on gradient backpropagation to calculate the complexity of the operating condition, fundamentally eliminating the problems of gradient oscillation and parameter drift in extremely small sample scenarios, and effectively improving the stability of adaptation under unknown operating conditions.
[0081] Next, based on the complexity index, the continuous gating weights of each low-rank component are calculated using a gating function, and the low-rank adaptation increment for the current operating condition is constructed based on these continuous gating weights. At the start of online adaptation for the current operating condition, the effective low-rank components for that condition are determined based on the continuous gating weights, and the effective low-rank adaptation parameters for that condition are determined based on the set of effective low-rank components. A higher complexity index results in a larger number of effective low-rank components being selected. This setting allows the model to automatically allocate LoRA adaptation capacity according to the actual complexity of the device's operating conditions—automatically reducing the effective rank to lower edge inference computational power consumption when the operating conditions are simple, and automatically expanding the effective rank to ensure diagnostic accuracy when the operating conditions are complex, thus achieving an adaptive balance between diagnostic accuracy and edge inference computational power overhead.
[0082] Subsequently, the low-rank adaptation initial parameters and fault classification head initial parameters obtained offline are initialized as the online fast adaptation parameters for the current operating condition. Based on the fault classification loss on the support set of the current operating condition, a finite-step gradient update is performed on the online fast adaptation parameters. During the update process, the backbone network parameters and meta-parameters are kept frozen, resulting in a fault diagnosis model adapted to the current operating condition. This setting allows only a very small number of parameters to participate in the gradient update during the online adaptation stage, significantly reducing the risk of overfitting under small sample sizes, while also shortening the online adaptation time.
[0083] Finally, the fault diagnosis model is used to perform forward inference on the time series data under test and output the fault classification results.
[0084] Through the synergistic effect of the above-mentioned technical means, this method achieves accurate detection of abnormal equipment status under conditions of scarce abnormal samples and continuous changes in operating conditions, and has the characteristics of high precision and lightweight deployment.
[0085] This embodiment further defines the specific implementation method of calculating the working condition complexity index in the above technical solution.
[0086] In the specific implementation, the mean of the feature centers of the support set in the output space of the backbone network is first extracted. And obtain the mean of the global feature center of historical operating conditions stored offline. Based on this, the distribution shift N between the means of the two feature centers is calculated, and the nonstationarity statistic D of the support set is also calculated. The distribution shift N and the nonstationarity statistic D are then weighted and summed to obtain the complexity index for the current operating condition.
[0087]
[0088] , These are the weighting coefficients after offline optimization.
[0089] Through the above settings, this method achieves dual quantification of the complexity of the operating condition: on the one hand, the distribution offset N reflects the difference in characteristic distribution between the current operating condition and the historical operating condition; on the other hand, the non-stationarity statistic D reflects the intensity of fluctuations in the time series signal of the current operating condition. The weighted summation of the two comprehensively and objectively depicts the true complexity of the current operating condition.
[0090] This embodiment further defines the distribution offset N and the non-stationary statistic D in the above technical solution.
[0091] Wherein, the distribution offset N is the normalized mean of the current task feature centers. With the mean of the global feature center in history The distribution shift is normalized to eliminate numerical differences between different devices and units, making the distribution shift metric comparable across different scenarios. The nonstationary statistic D is a normalized support set nonstationary statistic, which is also normalized to ensure it is on the same numerical order of magnitude as N, facilitating subsequent weighted summation.
[0092] This embodiment further defines the specific implementation method of calculating continuous gating weights and forming low-rank adaptation increments through gating functions in the above technical solution.
[0093] In the specific implementation, the offline stored gate vector s and sensitivity vector α are first obtained, both with dimensions equal to the total number of low-rank components. The low-rank adaptation increment matrix for the current operating condition of the low-rank adaptation module is represented as:
[0094] ,
[0095] in To preset the maximum fit rank, For the Sigmoid function, b k and Let B and A be the k-th components of the low-rank parameters. Let be the k-th component of the entire control vector s. Let be the k-th component of the sensitivity vector, and , This represents the complexity index of the current operating condition; based on the low-rank adaptation increment matrix... The target low-rank adaptation parameters constitute the current operating conditions.
[0096] The above formula works as follows: the gating vector and the sensitivity vector together determine the activation intensity of each low-rank component, where the sensitivity vector... The complexity index of the current working condition This is mapped to the offset of each component, which is related to the gate vector. After addition, the sums are normalized by the Sigmoid function to an activation probability between 0 and 1. This activation probability is then compared with the corresponding low-rank component. After multiplication and summation, the total incremental weight of LoRA is obtained. Through this setting, changes in operating complexity are dynamically mapped to the activation intensity of each low-rank component, achieving adaptive rank allocation.
[0097] This embodiment further defines the specific determination method for determining the effective low-rank component of the current working condition based on the continuous gating weight when the online adaptation of the current working condition begins in the above technical solution.
[0098] During online adaptation under the current operating conditions, the continuous gating weights corresponding to each low-rank component are thresholded and binarized, and the effective rank is calculated according to the following formula. : .
[0099] This setting allows the determination of the effective rank to be performed without any gradient calculations; the optimal effective rank for the current operating condition can be quickly obtained through simple threshold comparison and accumulation. The higher the degree of operating condition deviation and the greater the complexity index, the more complex the components become. The higher the probability of exceeding the 0.5 threshold after offset, the higher the effective rank. The larger the value, the larger the corresponding adaptation capacity is allocated; conversely, under simple working conditions, most components cannot reach the activation threshold, and the effective rank is automatically reduced, thereby saving edge computing resources.
[0100] This embodiment further defines the source of the meta-parameters obtained offline in the above technical solution—that is, the offline meta-learning training steps.
[0101] During the offline meta-learning training phase, time-series samples from multiple historical operating conditions are first acquired and divided into multiple meta-tasks according to the operating conditions. Each meta-task contains a support set and a query set. This setup enables the model to be pre-trained on various different operating conditions and learn general knowledge across operating conditions.
[0102] Freeze the backbone network parameters of the time-series basic model and initialize the complete set of meta-parameters. The complete set of meta-parameters includes at least: the initial low-rank matrix of the low-rank adaptation module, classification head parameters, prediction head parameters, gating vector, sensitivity vector, and weighting coefficients. This setting allows offline training to learn only the above lightweight parameters, significantly reducing the number of training parameters.
[0103] Subsequently, a two-layer meta-learning loop iterates. In the inner layer, for each meta-task's support set, the complexity index of that meta-task is calculated. Based on the complexity index, the effective low-rank components corresponding to that meta-task are selected. Fast adaptation parameters are initialized using the current global meta-parameters. The joint loss is calculated, and gradient updates are performed on the fast adaptation parameters to obtain temporary adaptation parameters. In the outer layer, the total loss is calculated on the query set of that meta-task using the temporary adaptation parameters. The entire set of meta-parameters is updated using backpropagation based on the total loss. After iteration to convergence, the temporal base model, the updated entire set of meta-parameters, and the reference feature distribution are saved.
[0104] Through bi-level meta-learning training, the model learns universal initialization parameters across different working conditions, enabling it to quickly adapt to the current working condition with only a small number of samples and very few gradient update steps in subsequent new working conditions, significantly improving the generalization ability in small sample scenarios.
[0105] This embodiment further defines the combined losses in the above technical solutions.
[0106] The joint loss is expressed as: ;in For predicting fault labels Compared to actual fault labels Cross-entropy classification loss between them For predicting trajectories With real future signals The mean square error between them Weights for predicting loss.
[0107] By setting a dual-task joint loss that includes classification loss and prediction loss, the two tasks share the parameters of the low-rank adaptation module. During training, the classification loss and prediction loss play a regularization role with each other, effectively suppressing overfitting under small sample conditions. At the same time, the model has dual-branch inference capabilities for both classification and prediction. Even if the warning function is not needed, the prediction loss still serves as a regularization constraint, improving the classification generalization performance under small sample conditions.
[0108] This embodiment further defines the inner layer update and outer layer update in the above technical solution.
[0109] The inner layer is updated as follows: , These are the initial values for the fast adapt parameters, initialized from the current global meta-parameters. The new values of the fast adaptation parameters are obtained after performing an inner layer gradient update for the i-th meta-task, where β is the inner layer adaptive learning rate. This serves as the support set for the current meta-task.
[0110] The outer layer is updated as follows:
[0111]
[0112] in For the complete set of meta-parameters, Update the learning rate for the outermost element. This is the query set for the current meta-task.
[0113] Through inner-layer updates, the model quickly adapts to specific working conditions and tasks; through outer-layer updates, the model feeds back the adapted experience to the global meta-parameters, continuously optimizing the global meta-parameters to optimal initial values applicable across working conditions. This two-layer structure of rapid inner-layer adaptation and global outer-layer optimization allows the model to complete the adaptation to new working conditions in a very small number of gradient update steps.
[0114] This embodiment adds timing prediction and early warning functions to the fault classification in the above technical solution.
[0115] The method also includes a fault warning step:
[0116] A time-series prediction head is set in the fault classification model adapted to the current working condition. The initial parameters of the time-series prediction head are obtained by offline meta-training. In the online stage, the backbone parameters of the time-series basic model are fixed. Based on the joint loss composed of the fault classification loss and the time-series prediction loss on the current working condition support set, the low-rank adaptation parameters, fault classification head parameters, and time-series prediction head parameters corresponding to the effective low-rank components are updated in a finite number of steps to obtain the classification-prediction joint adaptation model. The fault classification result and the future predicted time-series sequence are output using the classification-prediction joint adaptation model. The anomaly score is calculated based on the residual between the predicted time-series sequence and the corresponding real time-series observation sequence arriving in the prediction time domain.
[0117]
[0118] Where H is the prediction time-domain step size. These are the multi-channel observations of the actual signal from the device at time τ. This represents the predicted value at time τ output by the model.
[0119] The abnormal score exceeds the warning threshold determined based on the health reference window. An early fault warning signal is output in real time, wherein the warning threshold is:
[0120] in, These represent the mean and standard deviation of abnormal scores within the health reference window, respectively. This is the amplification factor for the early warning threshold; when the anomaly score... When the preset threshold δ is exceeded, an early fault alarm signal is output.
[0121] This setup enables the method not only to diagnose existing faults, but also to detect early, subtle characteristics in the evolution of a device from a normal to an abnormal state by the difference between the predicted timing and the actual timing, thus issuing an early warning before the fault fully erupts, filling the gap in existing technologies that lack predictive early warning capabilities.
[0122] This embodiment further defines the calibration method for the preset threshold in the above technical solution.
[0123] In practical implementation, multiple time-series samples of the target device in a healthy state are collected. A fault diagnosis model is used to perform forward inference on each healthy sample to obtain a predicted time-series sequence for each healthy sample. An anomaly score for each healthy sample is then calculated using the formula described above. The mean of these anomaly scores is then calculated. and standard deviation ;
[0124] According to the formula Calculate and store the preset threshold, wherein This is the preset threshold amplification factor.
[0125] This setting adaptively determines the warning threshold based on the statistical distribution of model prediction errors under the device's own health status, avoiding false alarms or missed alarms caused by manually setting a fixed threshold. Threshold amplification factor. It can be flexibly adjusted according to the sensitivity requirements on site.
[0126] This embodiment further defines the early warning locking mechanism before outputting early fault alarm signals in the above technical solution.
[0127] When the anomaly score exceeds a preset threshold and no warning has been triggered previously, an early fault alarm is output. The interval between the alarm and the device failure is recorded, and the alarm status is locked to prevent repeated alarms. This setting allows the system to lock the alarm status after the first alarm is triggered, avoiding information redundancy and maintenance personnel fatigue caused by the same fault event repeatedly triggering alarms in subsequent sliding windows. Simultaneously, the recorded alarm-failure interval provides effective data support for subsequent maintenance decisions.
[0128] This embodiment also provides a device fault diagnosis system based on gradient-free adaptive meta-learning, including a signal acquisition module, a time-series preprocessing and meta-task construction module, an offline meta-learning training module, a new operating condition online adaptive adaptation module, and an inference output module. The working relationships between the modules are as follows:
[0129] The signal acquisition module acquires multi-channel time-series signals (including vibration, current, acoustic and other types of signals) of the device in real time through an accelerometer and a data acquisition unit, and transmits the acquired raw time-series data to the time-series preprocessing and meta-task construction module.
[0130] The time series preprocessing and meta-task construction module performs sliding window slicing and normalization on the received time series signals, and divides the processed data into support set and query set according to the meta-learning paradigm for use by the offline meta-learning training module and the online adaptive adaptation module for new working conditions.
[0131] The offline meta-learning training module consists of a frozen backbone unit, a low-rank adaptation embedding unit, a gradient-free working condition complexity calculation unit, a gating and filtering unit, and a two-layer meta-learning training unit. Each unit works together in sequence to complete the offline meta-learning training, and finally outputs the time series basic model, a complete set of meta-parameters, and the mean of the feature centers of historical working conditions.
[0132] The new operating condition online adaptive adaptation module consists of a feature extraction unit, a gradient-free operating condition complexity forward calculation unit, an effective rank screening unit, and a parameter fine-tuning unit. Under the new operating condition, each unit performs rapid fine-tuning of the low-rank adaptation parameters and fault classification header parameters based on a small number of labeled samples, and outputs a diagnostic model adapted to the current operating condition.
[0133] The inference output module uses the adapted diagnostic model to perform forward inference on the time series data to be tested and outputs the fault classification results.
[0134] This embodiment further defines the gradient-free working condition complexity calculation unit within the offline meta-learning training module in the above technical solution.
[0135] This unit is specifically used to: extract the mean of the feature centers of the current meta-task support set in the frozen backbone network output space. Obtain the mean of the global feature center of historical operating conditions stored offline. Calculate the distribution offset N between the mean of the feature centers and the mean of the global feature centers under historical operating conditions, and calculate the nonstationarity statistic D of the support set; and follow the formula... Calculate the complexity index of the current meta-task.
[0136] This embodiment further defines the effective rank filtering unit within the online adaptive adaptation module for new operating conditions in the above technical solution.
[0137] This embodiment further defines the inference output module in the above technical solution.
[0138] The inference output module also includes a time-series prediction subunit, an anomaly score calculation subunit, an early warning threshold calibration subunit, and an early warning signal distribution subunit. The time-series prediction subunit is used to synchronously output the predicted time-series sequence for future time-domain steps.
[0139] The abnormal score calculation subunit is used according to the formula: ;
[0140] Where H is the prediction time-domain step size. These are the multi-channel observations of the actual signal from the device at time τ. This represents the predicted value at time τ output by the model.
[0141] The abnormal score exceeds the warning threshold determined based on the health reference window. An early fault warning signal is output in real time, wherein the warning threshold is:
[0142] in, These represent the mean and standard deviation of abnormal scores within the health reference window, respectively. This is the amplification factor for the early warning threshold; when the anomaly score... When the preset threshold δ is exceeded, an early fault alarm signal is output.
[0143] This setup enables the method not only to diagnose existing faults, but also to detect early, subtle characteristics in the evolution of a device from a normal to an abnormal state by the difference between the predicted timing and the actual timing, thus issuing an early warning before the fault fully erupts, filling the gap in existing technologies that lack predictive early warning capabilities.
[0144] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0145] It should be noted that in this invention, "model forward parallel inference" refers to the forward inference process in which the model simultaneously performs two tasks: fault classification and time series prediction, which is consistent with the meaning of "forward inference" as stated in the claims.
[0146] Example 1
[0147] This embodiment uses rolling bearing fault diagnosis as an example to provide a detailed description of the method and system of the present invention.
[0148] I. Basic Configuration Parameters
[0149] In this embodiment, the time series model used is the Timer model, which contains 4 Transformer layers and has a feature embedding dimension of 256. The input time series window length L is set to 1024, and the predicted output time domain length H is set to 512. The adapter maximum rank... Set it to 32.
[0150] The specific values for initializing the meta-parameters are as follows: LoRA matrix A is initialized using a standard normal distribution, and matrix B is initialized with all zeros. The gating vector s is initialized using a Gaussian distribution with a mean of 0 and a variance of 0.01, and the sensitivity vector α is assigned all values of 1. Initial values for the operating condition complexity weights are also provided. Take 0.7, Set the weight to 0.3. (Loss balance weight) The initial value is set to 0.3, with a value constraint interval of [0.1, 0.5]. Regarding training hyperparameters, the inner layer adaptive learning rate β is set to 10. -3 The outermost learning rate η is set to 5 × 10. -4 The optimizer chosen is AdamW. Warning threshold multiplier. Take 3.
[0151] Regarding online adaptive constraints, a maximum of 10 inner gradient iterations can be performed per working condition.
[0152] II. Hardware and Dataset Environment
[0153] Offline training hardware uses a single server equipped with an RTX 4090 24G graphics card. Online edge deployment hardware uses NVIDIA Jetson AGX Orin embedded boards.
[0154] The experimental datasets used four publicly available industrial bearing and gearbox vibration datasets: CWRU, PU, SEU, and MFPT. In the few-sample setting, the number of labeled samples K for each fault class was set to 5, 10, and 20, respectively.
[0155] The offline training times for each dataset were as follows: CWRU dataset 1.2 hours, PU dataset 3.8 hours, SEU dataset 0.8 hours, and MFPT dataset 1.5 hours. The online test metrics were: adaptive training time for 10-sample operating conditions 1.14 seconds, and average warning lead time for the PU natural wear dataset 4.2 hours.
[0156] III. Implementation Process
[0157] The complete implementation process of the present invention will be described in detail below with reference to the accompanying drawings.
[0158] See Figure 1 As shown, the overall framework of this invention is divided into three stages: stage one is the offline training stage, stage two is the online adaptation stage for new working conditions, and stage three is the real-time diagnosis and early warning stage.
[0159] Phase 1: Offline Meta-Training
[0160] Constructing a meta-learning dataset: Time-series samples from multiple historical operating conditions are obtained. A sliding window of length L is used to slice and normalize the one-dimensional time-series signal to construct the meta-learning dataset. Independent N-way K-shot meta-learning tasks are divided according to different load conditions. Each task is further subdivided into a small number of labeled support sets and test query sets.
[0161] Load the publicly available pre-trained temporal model `Timer`, freeze the backbone network so that it does not participate in gradient updates throughout the process. Embed LoRA modules in the self-attention layer and feedforward layer of the `Timer` model. See also Figure 2 As shown, perform two-layer MAML meta-training:
[0162] Batch Meta-task Sampling: Randomly select a batch of meta-tasks from all historical task conditions.
[0163] Single-task inner-layer adaptation calculation: Read the support set and the mean of the feature centers of the current task, call the pre-stored mean of the global feature centers and the initialized weighting coefficients, and calculate the complexity index of the current working condition without gradient. , where N is the distribution offset between the normalized mean of the current task feature center and the mean of the historical global feature center, and D is the normalized support set nonstationarity statistic.
[0164] Input the operating condition complexity and gating class parameters into the relaxation gating formula. Construct a dynamic low-rank adaptation subspace. Initialize the task-specific fast adaptation parameters using the current global meta-parameters. Calculate the joint loss of classification and prediction based on the support set. Perform inner gradient descent This allows us to obtain temporary, rapid parameters that are adapted to the current operating conditions.
[0165] Outer global meta-parameter update: using temporary adaptation parameters In the query set of the corresponding task Calculate the total loss, then backpropagate gradients to update the complete set of meta-parameters. .
[0166] Repeat the above extraction, inner layer adaptation, and outer layer update process until the convergence condition is met. Obtain the temporal base model with the frozen backbone and output general meta-parameters through the offline training phase. and the mean of the global feature center of historical operating conditions .
[0167] Phase Two: Small Sample Adaptation to New Online Operating Conditions
[0168] This phase is executed when a new device or a completely new operating condition is first connected to the system. All metadata and backbone network parameters are fixed throughout the offline output; only lightweight adaptation parameters are fine-tuned. See also... Figure 3 As shown:
[0169] New operating condition support set samples: Obtain a small number of labeled time series samples under the new operating condition as the support set.
[0170] Loading offline optimal meta-parameters: Loading the time series basic model of the frozen backbone and the complete set of meta-parameters. Historical operating conditions global characteristic central mean In the online process, the meta-parameters do not participate in any gradient updates.
[0171] Gradient-free computation of the current working condition (CCP): Extracting features from a small number of labeled support sets for the new working condition. Reuse the weighted coefficients after offline optimization Substituting the distribution shift and time-series stationarity index into the formula Calculate the complexity index of the current new working condition.
[0172] Discrete hard-gated effective rank calculation: Input the working condition complexity and gating class parameters and discretize them.
[0173] According to the formula: Calculate the effective rank. In this formula, [·] is an indicator function that outputs 1 when the condition is true and 0 when it is false; low-rank components that satisfy the gate weight greater than 0.5 are determined as effective low-rank components; according to the effective rank... Determine the number of valid low-rank components selected.
[0174] Reusing offline meta-parameters to initialize adaptation parameters and fine-tune inner gradient updates: Reusing offline meta-parameters to initialize online fast parameters Substituting the support set into the formula Construct a joint loss, perform a finite number of inner layer gradient updates, and only adjust the LoRA matrix, classification head, and prediction head parameters, while keeping the backbone network parameters and meta-parameters frozen.
[0175] After the online adaptation phase is completed, the current operating condition adaptation model is output. This model has both fault classification and time-series signal prediction dual-branch inference capabilities.
[0176] Phase 3: Real-time Fault Diagnosis and Early Warning
[0177] This phase is executed cyclically when the device is online for an extended period of time. It consists of two parts: early warning threshold calibration and streaming real-time inference.
[0178] One-time calibration of warning thresholds:
[0179] See Figure 4 As shown, the process is as follows:
[0180] Vibration samples of the equipment's steady-state health condition are collected and loaded into a pre-trained operating condition adaptation model. The health samples are then input into the model for forward inference, and the model outputs a future predicted time series. Anomaly scores for the health samples are calculated using the error formula, and the results are then processed according to the formula. Calculate the anomaly score for each healthy sample. Calculate the mean of the anomaly scores. and standard deviation Calculate and save the early warning threshold, and set a fixed early warning threshold by using the mean plus three times the standard deviation. ,in Take 3, and the multiple can be adjusted flexibly according to the needs of the site.
[0181] Real-time inference loop:
[0182] After completing the early warning threshold calibration, enter the real-time inference loop:
[0183] The sensor's sliding window continuously acquires raw vibration signals from multiple channels.
[0184] The time-series data collected by the sliding window is input into the trained working condition adaptation model, and the model's forward parallel inference is executed.
[0185] After forward parallel inference of the model, two results are output simultaneously:
[0186] Outputs the current device fault category diagnosis result in one output;
[0187] The other output is the subsequent H-step predicted time series sequence.
[0188] For predicting time series branches, apply the formula window by window. Calculate the mean L2 squared error between the actual and predicted time series to generate real-time anomaly scores. .
[0189] Determine if the abnormal score is greater than the warning threshold:
[0190] If so, output an early fault warning, record the warning duration, and lock the alarm status to prevent repeated triggering;
[0191] If not, the device is determined to be in a healthy state, and the process returns to the "sensor sliding window continuously acquires multi-channel vibration raw signals" step of this loop to enter the next round of real-time inference loop.
[0192] IV. System Module Description
[0193] This embodiment also provides a device fault diagnosis system based on gradient-free adaptive meta-learning. The system includes a signal acquisition module, a time series preprocessing and meta-task construction module, an offline meta-learning training module, a new operating condition online adaptive adaptation module, and an inference output module.
[0194] The signal acquisition module is configured to acquire multi-channel time-series signals of the device in real time through an accelerometer and a data acquisition unit, including vibration signals, current signals and acoustic signals, and output the acquired raw time-series data to the time-series preprocessing and meta-task construction module.
[0195] The time series preprocessing and meta-task construction module is configured to perform sliding window slicing and normalization on the received time series signals, and divide the processed data into support set and query set according to the meta-learning paradigm, and output them to the offline meta-learning training module and the online adaptive adaptation module for new working conditions, respectively.
[0196] The offline meta-learning training module is configured to perform offline meta-learning training. This module includes a frozen backbone unit, a low-rank adaptation embedding unit, a gradient-free task complexity calculation unit, a gating and filtering unit, and a two-layer meta-learning training unit. Specifically, the frozen backbone unit freezes the backbone network parameters of the temporal base model; the low-rank adaptation embedding unit embeds low-rank adaptation modules into the temporal base model; the gradient-free task complexity calculation unit calculates the complexity index of each meta-task; the gating and filtering unit filters effective low-rank components based on the complexity index; and the two-layer meta-learning training unit performs iterative training of inner-layer adaptation and outer-layer updates. This module outputs the temporal base model, a complete set of meta-parameters, and the mean of historical task feature centers.
[0197] The new operating condition online adaptive adaptation module is configured to rapidly fine-tune low-rank adaptation parameters based on a small number of labeled samples under new operating conditions. This module includes a feature extraction unit, a gradient-free operating condition complexity forward computation unit, an effective rank selection unit, and a parameter fine-tuning unit. Specifically, the feature extraction unit extracts the feature distribution of the new operating condition support set; the gradient-free operating condition complexity forward computation unit calculates the complexity index of the new operating condition; the effective rank selection unit selects effective low-rank components based on the complexity index using discrete hard gating; and the parameter fine-tuning unit updates the target low-rank adaptation parameters and fault classification header parameters using the support set. This module outputs a diagnostic model adapted to the current operating condition.
[0198] The inference output module is configured to perform forward inference on the time-series data under test using the adapted diagnostic model, and output the fault classification results. This module also includes a time-series prediction subunit, an anomaly score calculation subunit, an early warning threshold calibration subunit, and an early warning signal distribution subunit. The time-series prediction subunit is used to synchronously output the predicted time-series sequence for future time-domain steps; the anomaly score calculation subunit is used to calculate the predicted time-series sequence according to the formula... Calculate window-level anomaly scores; the early warning threshold calibration subunit is used to collect samples and calculate the mean of anomaly scores during device health status. and standard deviation According to the formula Set an early warning threshold; the early warning signal issuing subunit is used to issue an early fault alarm signal when the real-time anomaly score exceeds the early warning threshold.
[0199] The above modules are connected in sequence. The output of the signal acquisition module is connected to the input of the timing preprocessing and meta-task construction module. The output of the timing preprocessing and meta-task construction module is connected to the input of the offline meta-learning training module and the new operating condition online adaptive adaptation module, respectively. The output of the offline meta-learning training module is connected to the input of the new operating condition online adaptive adaptation module. The output of the new operating condition online adaptive adaptation module is connected to the input of the inference output module, so as to collaboratively complete the equipment fault diagnosis and early warning.
[0200] V. Ablation Comparison and Verification
[0201] The inventors also conducted ablation experiments by sequentially removing the core innovative modules of the invention, comparing the model's fault classification accuracy, online adaptive processing time, and the completeness of the early warning function to verify the necessity of each module. The baseline dataset was PU, with K=10 set for a small sample size. The experimental results are as follows:
[0202] When the dynamic rank adaptive module is removed and the LoRA rank is fixed at 8, the classification accuracy drops to 85.4%. When the rank is fixed at 32, the classification accuracy is 86.8%, both lower than the 91.5% of the present invention. This indicates that the fixed rank cannot adapt to the complexity requirements of different working conditions.
[0203] When MAML meta-initialization was removed and LoRA parameters were initialized only randomly, the recognition accuracy plummeted to 72.4% with few samples, and the online adaptation time increased to 14.50 seconds, indicating that offline meta-learning plays a key role in rapid adaptation with few samples.
[0204] When the dual-task branch of time-series generation and prediction is removed and only the fault classification head is retained, the labelless warning capability is completely lost, and the classification accuracy drops slightly to 89.4%, proving that the regularization gain of the prediction loss has disappeared.
[0205] Experimental results show that the four technical modules are coupled and work together, and removing any module will result in significant performance degradation. Each module is an indispensable and necessary component of this invention.
[0206] The above description is merely a preferred embodiment of the present invention and is intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A device fault diagnosis method based on gradient-free adaptive meta-learning, characterized in that, include: Obtain a pre-trained temporal base model, wherein a low-rank adaptation module is embedded in the temporal base model, and the low-rank adaptation module contains multiple low-rank components. Freeze the backbone network parameters of the aforementioned time-series basic model; Obtain a small number of labeled time-series samples of the target device under the current operating conditions as a support set; Extract the feature distribution of the support set in the output space of the backbone network; Based on the aforementioned feature distribution and the offline-stored reference feature distribution, the complexity index of the current working condition is calculated without gradient. Based on the complexity index, the continuous gating weights of each of the multiple low-rank components are calculated using a gating function, and the low-rank adaptation increment for the current working condition is constructed based on the continuous gating weights. At the start of online adaptation for the current working condition, the effective low-rank components for the current working condition are determined based on the continuous gating weights, and the effective low-rank adaptation parameters for the current working condition are determined based on the set of the effective low-rank components. The higher the complexity index, the more effective low-rank components are selected. The low-rank adaptation initial parameters and fault classification head initial parameters obtained offline are initialized as the online fast adaptation parameters for the current working condition. Based on the fault classification loss on the support set of the current working condition, the online fast adaptation parameters are updated in a finite number of steps. During the update process, the backbone network parameters and the meta-parameters obtained offline are kept frozen to obtain a fault diagnosis model adapted to the current working condition. The fault diagnosis model is used to perform forward reasoning on the time series data under test and output the fault classification results.
2. The method according to claim 1, characterized in that, The calculation of the complexity index of the current working condition without gradient based on the feature distribution and the offline stored reference feature distribution includes: Extract the mean of the feature centers of the support set in the output space of the backbone network. ; Obtain the mean of global feature centers of historical operating conditions stored offline. ; Calculate the distribution offset N between the mean of the feature centers and the mean of the global feature centers under historical conditions, and calculate the nonstationarity statistic D of the support set; The complexity index is obtained by weighting and summing the distribution shift N with the non-stationary statistic D. ,in, and These are the weighting coefficients after offline optimization.
3. The method according to claim 2, characterized in that, The distribution offset N is the mean of the feature center and the mean of the global feature center. The normalized distance; the nonstationary statistic D is the normalized nonstationary statistic of the support set time series signal, and both N and D are mapped to the interval [0,1].
4. The method according to claim 1, characterized in that, The process involves calculating the gating weights of the multiple low-rank components using a gating function based on the complexity index, continuously weighting the multiple low-rank components according to the gating weights to form the low-rank adaptation increment for the current operating condition, and constructing the target low-rank parameters for the current target operating condition based on the low-rank adaptation increment, including: Obtain the offline stored gate vector s and sensitivity vector α, wherein the dimensions of the gate vector and sensitivity vector are the same as the total number of the low-rank components; the low-rank adaptation increment matrix of the current operating condition of the low-rank adaptation module is represented as: ,in To preset the maximum fit rank, For the Sigmoid function, b k and Let B and A be the k-th components of the low-rank parameters. Let be the k-th component of the entire control vector s. Let be the k-th component of the sensitivity vector, and , , which is the complexity index of the current working condition; based on the low-rank adaptation increment matrix The target low-rank adaptation parameters constitute the current operating conditions.
5. The method according to claim 4, characterized in that, When online adaptation for the current operating condition begins, determining the effective low-rank component of the current operating condition based on the continuous gating weights includes: During online adaptation under the current operating condition, the continuous gating weights corresponding to each low-rank component are thresholded and binarized, and the effective adaptation rank under the current operating condition is calculated according to the following formula. : Where [⋅] is an indicator function, outputting 1 when the condition is true and 0 when it is false; low-rank components that satisfy the gate weight greater than 0.5 are determined as effective low-rank components; according to the effective adaptation rank Determine the number of valid low-rank components selected.
6. The method according to claim 1, characterized in that, Before initializing the low-rank adaptation initial parameters and fault classification head initial parameters obtained offline to the online fast adaptation parameters for the current working condition, an offline meta-learning training step is also included: Obtain time-series samples under multiple historical operating conditions, and divide them into multiple meta-tasks according to the operating conditions. Each meta-task contains a support set and a query set. Freeze the backbone network parameters of the aforementioned time series basic model and initialize the complete set of meta-parameters; The complete set of meta-parameters includes at least: the initial low-rank matrix of the low-rank adaptation module, the classification head parameters, the prediction head parameters, the gating vector, the sensitivity vector, and the weighting coefficients; Perform a two-level meta-learning loop iteration: Inner layer: For each meta-task's support set, calculate the meta-task's complexity index, construct the dynamic low-rank adaptation subspace corresponding to the meta-task based on the complexity index using continuous gating weights, initialize the fast adaptation parameters using the current global meta-parameters, calculate the joint loss, and update the fast adaptation parameters with gradients to obtain temporary adaptation parameters. Outer layer: Calculate the query set loss on the query set of this meta-task using the temporary adaptation parameters, and update the full set of meta-parameters based on the query set loss through backpropagation; After iteration to convergence, the time series basic model, the updated set of meta-parameters, and the reference feature distribution are saved.
7. The method according to claim 6, characterized in that, The joint loss is: ; in For predicting fault labels Compared to actual fault labels Cross-entropy classification loss between them For predicting trajectories With real future signals The mean square error between them Weights for predicting loss.
8. The method according to claim 6, characterized in that, The inner layer is updated as follows: , These are the initial values for the fast adapt parameters, initialized from the current global meta-parameters. The new values of the fast-fit parameters are obtained after performing an inner gradient update, where β is the inner adaptive learning rate. This serves as the support set for the current meta-task. The outer layer is updated as follows: ;in For the complete set of meta-parameters, Update the learning rate for the outermost element. This is the query set for the current meta-task.
9. The method according to claim 1, characterized in that, The method further includes a fault early warning step: setting a time-series prediction head in the fault diagnosis model adapted to the current operating condition, wherein the initial parameters of the time-series prediction head are obtained by offline meta-training; fixing the backbone network parameters in the online stage, and updating the low-rank adaptation parameters, fault classification head parameters, and time-series prediction head parameters corresponding to the effective low-rank components in a finite-step manner based on the joint loss composed of fault classification loss and time-series prediction loss on the current operating condition support set, to obtain a classification-prediction joint adaptation model; using the classification-prediction joint adaptation model to output fault classification results and future predicted time-series sequences, and calculating anomaly scores based on the residuals between the predicted time-series sequences and the corresponding real time-series observation sequences arriving in the prediction time domain. Where H is the prediction time step size, These are the multi-channel observations of the actual signal from the device at time τ. This represents the predicted value at time τ output by the model. The abnormal score exceeds the warning threshold determined based on the health reference window. An early fault warning signal is output in real time, wherein the warning threshold is: ; in, , These represent the mean and standard deviation of abnormal scores within the health reference window, respectively. This is the amplification factor for the early warning threshold; when the anomaly score... When the preset threshold δ is exceeded, an early fault alarm signal is output.
10. A device fault diagnosis system based on gradient-free adaptive meta-learning, characterized in that, include: The signal acquisition module is used to acquire multi-channel timing signals from the device in real time. The time series preprocessing and meta-task construction module is used to perform sliding window slicing, normalization, and meta-task support set and query set division on the acquired time series signals. The offline meta-learning training module includes a frozen backbone unit, a low-rank adaptation embedding unit, a gradient-free working condition complexity calculation unit, a gating and filtering unit, and a two-layer meta-learning training unit, which is used to perform offline meta-learning training and output the time series basic model, a complete set of meta-parameters, and the mean of the feature centers of historical working conditions. The new working condition online adaptive adaptation module includes a feature extraction unit, a gradient-free working condition complexity forward calculation unit, an effective rank screening unit, and a parameter fine-tuning unit. It is used to quickly fine-tune the low-rank adaptation parameters and fault classification head parameters based on a small number of labeled samples under new working conditions, and output a diagnostic model that adapts to the current working condition. The inference output module is used to perform forward inference on the time series data to be tested using the adapted diagnostic model and output the fault classification results.
Citation Information
Patent Citations
Self-adaptive fault detection method based on low-rank self-adaptive fine tuning LoRA
CN120011923A
Bearing fault variable working condition diagnosis method based on multi-scale convolutional network and MAML
CN120822090A
