Knowledge-guided adversarial attack and defense method for deep learning soft-sensing model

By introducing the knowledge-guided adversarial attack (KGAA) method, which incorporates mechanistic knowledge and constraints, the security problem of deep learning soft measurement models in the face of malicious attacks is solved, achieving stealth and stability, and improving the robustness and defense capabilities of the model.

CN116484609BActive Publication Date: 2026-11-20XIAN UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310427278.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-19
Publication Date
2026-11-20
Estimated Expiration
2043-04-19

AI Technical Summary

Technical Problem

Existing deep learning soft measurement models are not secure enough against malicious adversarial attacks, and existing attack methods are easily detected or cause model degradation, lacking practical attack and defense measures.

Method used

We propose a knowledge-guided adversarial attack (KGAA) method, which introduces mechanistic knowledge and new constraints to construct an optimization problem to achieve an adversarial attack with concealment, rationality and stability, and improves the robustness of the model through adversarial training.

Benefits of technology

It achieves stealth and stability against attacks in complex industrial processes, effectively defends against adversarial attacks, and improves the robustness and reliability of deep learning soft measurement models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116484609B_ABST
    Figure CN116484609B_ABST
Patent Text Reader

Abstract

The application discloses a knowledge-guided adversarial attack and defense method of a deep learning soft measurement model, and comprises the following steps: firstly, an adversarial attack framework for the deep learning soft measurement model is established, and characteristics required to be met for the feasibility of the attack are proposed; then, a knowledge-guided adversarial attack method is proposed to attack the deep learning soft measurement model, mechanism knowledge is introduced into an objective function, a new constraint condition is added, and an obstacle function is defined to reconstruct an optimization problem to solve the ill-conditioned optimization problem; finally, on the basis of the attack method, a corresponding knowledge-guided adversarial training defense method is proposed, and active defense is carried out in combination with an adversarial sample and an initial deep learning soft measurement model; compared with other adversarial attack methods, the application has the feasibility, and the adversarial training can effectively enhance the adversarial robustness of the deep learning soft measurement model, so that the safety and reliability of the model in use are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of industrial soft measurement and industrial information security, specifically involving a knowledge-guided adversarial attack and defense method for deep learning soft measurement models. Background Technology

[0002] In today's complex industrial processes, many are equipped with multi-level, multi-scale measurement instruments, enabling the direct acquisition of most variables. However, a few variables remain unmeasurable due to measurement costs and harsh environments. To address this challenge, soft measurement technology has emerged. This technology uses easily measurable auxiliary variables as input and difficult-to-measure dominant variables as output, establishing a mathematical model between them. This allows for real-time measurement of the dominant variables without relying on hardware sensors.

[0003] Soft measurement modeling methods are mainly divided into two types: mechanism-driven soft measurement modeling and data-driven soft measurement modeling. For complex industrial processes, accurate mechanism models are often difficult to obtain, so data-driven soft measurement modeling methods are more commonly used. Among these, deep learning soft measurement models (DLSS) based on deep neural networks have been proven to achieve higher measurement accuracy than shallow soft measurement models, and the topic of deep learning soft measurement modeling has received widespread attention and research.

[0004] Currently, ensuring the training of a DLSS with good generalization capabilities is no longer a difficult problem. However, ensuring its reliability has become an urgent task in order to better meet the needs of complex industrial processes. When DLSS is deployed in industrial control systems, considering the increasing interconnectivity of these systems and the data-driven nature of DLSS itself, the security of the deployed DLSS against malicious attacks cannot be guaranteed, severely threatening its reliability.

[0005] Adversarial attacks refer to malicious attacks where attackers deliberately design subtle perturbations imperceptible to the human eye, apply these perturbations to the original samples to generate adversarial examples, and then use these adversarial examples to drive the model and cause it to produce incorrect outputs. One scholar proposed a method called Adversarial Time Series Generator (ATSG) to achieve adversarial attacks on DLSS, and experimental results confirmed that DLSS is vulnerable to adversarial attacks. However, the objective function of this research is ill-conditioned in actual measurements, meaning that the method does not consider the situation where the true labels of the actual test samples are unavailable, thus limiting the practical value of this attack method. A method called Iterative Direct Attack Output (IDAO) cleverly avoids the use of true labels by directly attacking the output, achieving adversarial attacks on DLSS. However, the optimization objective of maximizing the output of the soft measurement model is impractical, because experienced operators or process experts can detect anomalies such as significant increases in output using their knowledge. This anomaly becomes more obvious and easily detected when the attack frequency is high. Furthermore, attacks on DLSS generally require multiple attempts, which is determined by the inherent complexity of industrial processes. During the initial attempt until the attack objective is achieved, the soft measurement model itself may degrade, meaning its online measurement performance will worsen over time. Since existing attack methods all use maximizing the predicted value or maximizing the distance between the predicted and true values ​​as their objective function, this degradation can cause the output value after the attack to be too large or too small, making the attack method easier to detect and thus causing it to fail. Therefore, existing attack methods have various shortcomings, necessitating the research of a truly practical and feasible attack method.

[0006] Furthermore, researching adversarial attacks against soft measurement systems aims to enhance researchers' understanding of the unreliability of DLSS, thereby promoting research on defense methods against adversarial attacks on DLSS and making DLSS more secure and reliable after deployment. Adversarial training methods, as representative heuristic defense methods, often demonstrate the best performance and are considered one of the most effective defense methods currently available. Therefore, it is necessary to study adversarial training-based defense techniques in soft measurement scenarios to ensure the robustness of DLSS against adversarial attacks. Summary of the Invention

[0007] The purpose of this invention is to provide a knowledge-guided adversarial attack and defense method for deep learning soft measurement models. By introducing knowledge, a feasible knowledge-guided adversarial attack (KGAA) method is proposed. Then, a corresponding KGAA adversarial training method is proposed to carry out the defense, so as to improve the adversarial robustness of the model and thus ensure the reliability of DLSS when facing adversarial attacks after deployment.

[0008] To address the aforementioned technical problems, this invention discloses a knowledge-guided adversarial attack and defense method for deep learning soft measurement models, specifically implemented according to the following steps:

[0009] Step 1: First, establish an adversarial attack framework for the deep learning soft measurement model DLSS, and propose three characteristics that must be met for adversarial attacks against DLSS to be feasible.

[0010] Step 2: Introduce knowledge and propose the Knowledge-Guided Adversarial Attack (KGAA) method to attack DLSS;

[0011] Step 3 proposes the KGAA adversarial training method to defend against adversarial attacks, thereby improving the adversarial robustness of DLSS.

[0012] Furthermore, step 1 is specifically performed as follows:

[0013] Step 1.1 models adversarial attacks in soft measurement scenarios from three aspects: timing, information, and optimization objective, thus deriving the DLSS adversarial attack framework: Regarding timing, attacks on soft measurement models refer to attacks on their predictions of dominant variables; regarding information, attackers have limited information about soft measurement, therefore, a proxy model is established by hijacking observation data, and adversarial attacks are implemented based on this proxy model; regarding the optimization objective, the optimization objective is set to maximize the prediction error, therefore, an optimization problem is established to construct the adversarial attack model, as shown below:

[0014]

[0015] st||δ|| ∞ ≤ε (1)

[0016] In this formula, the formula following `max` on the same line refers to the objective function of the optimization problem. In this example, the objective function is denoted by `L`, and in the soft measurement scenario, mean squared error is used. `max` indicates that the goal of the optimization problem is to find the maximum value of the objective function `L`. `st` indicates that the following formula is a constraint condition. `f` represents the trained surrogate soft measurement model, `θ` represents the parameters of the soft measurement model, and `δ` represents the imperceptible interference generated by the adversarial attack. Imperceptibility is achieved through the infinity norm |||| ∞ The terms ε and θ represent the threshold of the interference, x represents the input data, x+δ represents the new data obtained after the attack (i.e., the adversarial example), and f(x+δ; θ) is the output of the soft measurement model after the attack. (Also denoted by y) attacked Let y represent the actual label corresponding to x;

[0017] Step 1.2 proposes that a practical and effective adversarial attack should meet three characteristics: stealth, rationality, and stability. Stealth means that the auxiliary variables after the attack change slightly and are not easily detected. At the same time, the adversarial sample should be able to maintain the original important information before and after the attack, so as to maximize the accuracy of the measurement results. Rationality means that the output obtained after inputting the adversarial sample into the soft measurement model is reasonable, which is reflected in that the value can match the process expert's understanding of the current production unit. Stability means that the attack method is stable in the face of soft measurement model degradation, which is reflected in that the attack capability is not affected by the degradation of the soft measurement model.

[0018] Furthermore, step 2 is specifically implemented as follows:

[0019] Step 2.1: Introduce mechanistic knowledge into the construction of the objective function L of the optimization problem, and use the knowledge corresponding to the process to drive the prediction value y of the soft sensing model KDSS. KDSS Assigning y allows the loss function to be calculated for each attack, thus overcoming the ill-conditioning of the optimization problem.

[0020] Step 2.2, in order to ensure y attacked With y KDSS Similarly, the objective function in equation (1) needs to be changed accordingly. At the same time, in order to ensure y attacked To avoid generating excessively volatile disordered outputs, new constraints are added to the optimization problem. Therefore, the optimization problem of the proposed KGAA is as follows:

[0021]

[0022] stf(x+δ)-y KDSS ≥0

[0023] ||δ|| ∞ ≤ε (2)

[0024] Due to the nonlinearity of the constraint in equation (2), a barrier function G((x+δ),r;θ) is defined to ensure that the search is conducted within the feasible region during the solution process. G((x+δ),r;θ) is shown below:

[0025] G((x+δ),r;θ)=-L(y KDSS ,f(x+δ;θ))-rB(x+δ) (3)

[0026] Where r is a very small positive number, B(x+δ)=1 / f(x+δ)-y KDSS As x approaches the boundary of the feasible region, G((x+δ),r;θ) approaches negative infinity. Therefore, an approximate solution to equation (2) can be obtained by solving the following optimization problem:

[0027]

[0028] stx∈S

[0029] ||δ|| ∞ ≤ε (4)

[0030] Where S represents the feasible region;

[0031] Step 2.3: According to the definition of G((x+δ),r;θ), the smaller the value of r, the closer the optimal solution of equation (4) is to that of equation (2). However, if the value of r is too small, it will also bring difficulties to the calculation of the optimization problem. Therefore, the unconstrained minimization method of sequence is adopted, and a strictly monotonically decreasing penalty factor sequence {r} is taken. k For each k, the optimization problem is solved starting from the internal minimum point. Therefore, the process of solving equation (4) is the process of implementing KGAA. The specific steps for solving equation (4) are as follows:

[0032] 1) Use the initial interior point determination algorithm on the original input sample x to ensure that the optimization starts from the interior point x0;

[0033] 2) Calculate the perturbation threshold α = ε1 / 2N for each iteration, where ε1 is the overall perturbation threshold of KGAA and N is the number of iterations required for the attack;

[0034] 3) Update the barrier factor r = rβ, where β is the contraction factor;

[0035] 4) Calculate the perturbation obtained in the current iteration.

[0036] 5) Calculate the adversarial sample x obtained in the current iteration. n+1 =x n +δ;

[0037] 6) Repeat steps 4) to 5) until the maximum number of iterations N is reached;

[0038] 7) Repeat steps 3) to 6) until the algorithm exits, rB(x) is reached. n+1 The error is calculated up to ε<2, where ε<2 is the allowable error of the objective function.

[0039] 8) Obtain the final adversarial sample x KGAA =x n+1 Then you can use x KGAA Attack the deployed original deep learning soft measurement model.

[0040] Furthermore, step 3 is specifically implemented as follows:

[0041] Step 3.1, the adversarial training process is represented as shown in equation (5):

[0042]

[0043] Where z represents the number of adversarial examples, and l is a counting variable;

[0044] Step 3.2, Solve equation (5). The internal maximization problem is achieved by implementing KGAA. The external minimization process is treated as a standard training procedure for minimizing loss. After training, a defense based on adversarial training is achieved, thereby enabling DLSS to be adversarially robust.

[0045] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0046] The knowledge-guided adversarial attack method provided by this invention effectively solves the ill-conditioned optimization problem in attack regression models by incorporating mechanistic knowledge into the objective function, adding new constraints, and redefining the barrier function to reconstruct the optimization problem. Experiments on a complex industrial process soft measurement case (soft measurement of thermal deformation of an air preheater rotor) show that the obtained spurious outputs are practically feasible (including concealment, rationality, and stability), and KGAA can successfully implement adversarial attacks against DLSS. The adversarial training defense method based on KGAA provided by this invention also shows, through experimental results, that it effectively defends against KGAA and improves adversarial robustness with minimal loss of prediction accuracy. Attached Figure Description

[0047] Figure 1 This is a diagram of the adversarial attack and defense architecture for industrial soft measurement models proposed in this invention;

[0048] Figure 2 These are schematic diagrams of rotor thermal deformation and gap compensation in an air preheater example where this invention is applied;

[0049] Figure 3 This is a graph showing the prediction results of the soft measurement model driven by the proxy soft measurement model and mechanism model of this invention;

[0050] Figure 4 These are kernel density estimation curves obtained after being attacked by the KGAA method of this invention and kernel density estimation curves obtained after being attacked by other attack methods.

[0051] Figure 5 This is a graph showing the curves of all four auxiliary variables before and after being attacked by the KGAA method proposed in this invention;

[0052] Figure 6 It is a graph showing the curves before and after being attacked by other attack methods using the fourth auxiliary variable of this invention;

[0053] Figure 7 This is an attack effect diagram after attacking DLSS using the KGAA method proposed in this invention.

[0054] In the diagram: 1-rotor, 2-top sector plate, 3-air leakage gap. Detailed Implementation

[0055] The accompanying drawings are provided to further illustrate the invention and constitute a part of this invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0056] The following will describe the implementation of the present invention in detail with reference to the embodiments, so as to fully understand how the present invention uses technical means to solve technical problems and achieve technical effects and to implement it accordingly.

[0057] This invention discloses a knowledge-guided adversarial attack and defense method for deep learning soft measurement models. The overall implementation architecture of this method is as follows: Figure 1 As shown, please follow these steps:

[0058] Step 1: First, establish an adversarial attack framework for the deep learning soft measurement model DLSS, and propose three characteristics that must be met for adversarial attacks against DLSS to be feasible.

[0059] The specific steps are as follows:

[0060] Step 1.1 models adversarial attacks in soft measurement scenarios from three aspects: timing, information, and optimization objective, thus deriving an adversarial attack framework for deep learning soft measurement models. Regarding information, attackers have limited access to information about soft measurement. Therefore, they hijack observation data to build a proxy model, and then implement adversarial attacks based on this proxy model. Specifically, soft measurement model developers first develop a soft measurement model based on historical datasets collected from industrial processes and deploy it in the industrial control system. This soft measurement model is a black box to the attacker, hence the name "black-box soft measurement model." The attacker hijacks the observation dataset from the industrial process and uses this deployed black-box soft measurement model to train the proxy soft measurement model. Regarding timing, attacks on the soft measurement model refer to attacks on its predictions of dominant variables. Specifically, the attacker hijacks the current query data and then combines this query data with the previously trained proxy soft measurement model to launch an adversarial attack, ultimately causing the soft measurement model to output incorrect results for the query data. Regarding the optimization objective, the optimization objective is set as maximizing the prediction error. Therefore, an optimization problem is established to construct the adversarial attack model, as shown below:

[0061]

[0062] st||δ|| ∞ ≤ε (1)

[0063] In this formula, the formula following `max` on the same line represents the objective function of the optimization problem. In this example, the objective function is denoted by `L`, and in the soft measurement scenario, mean squared error is used. `max` indicates that the goal of the optimization problem is to find the maximum value of the objective function `L`. `st` indicates that the following formula is a constraint condition. `f` represents the trained surrogate soft measurement model, `θ` represents the parameters of the soft measurement model, and `δ` represents the imperceptible interference generated by the adversarial attack. Imperceptibility is achieved through the infinity norm |||| ∞ The terms ε and θ represent the threshold of the interference, x represents the input data, x+δ represents the new data obtained after the attack (i.e., the adversarial example), and f(x+δ; θ) is the output of the soft measurement model after the attack. (Also denoted by y) attacked Let y represent the actual label corresponding to x.

[0064] Step 1.2 proposes that a practical and effective adversarial attack should meet three characteristics: concealment, rationality, and stability. Concealment means that the auxiliary variables after being attacked change slightly and are not easily detected. At the same time, the adversarial sample should be able to maintain the original important information before and after the attack, so as to maximize the accuracy of the measurement results. Rationality means that the output obtained after inputting the adversarial sample into the soft measurement model is reasonable, which is reflected in that the value can match the process expert's understanding of the current production unit. Stability means that the attack method is stable in the face of soft measurement model degradation, which is reflected in that the attack capability is not affected by the degradation of the soft measurement model.

[0065] Step 2: Based on this, knowledge is introduced and the Knowledge-Guided Adversarial Attack (KGAA) method is proposed to attack deep learning soft measurement models.

[0066] The specific steps are as follows:

[0067] Step 2.1: Incorporate mechanistic knowledge into the construction of the objective function L, and use the knowledge corresponding to the process to drive the prediction value y of the Soft Sensor Model (KDSS). KDSS Assigning y allows the loss function to be calculated for each attack, thus overcoming the ill-conditioning of the optimization problem.

[0068] Step 2.2, in order to ensure y attacked With y KDSS Similarly, the objective function in equation (1) needs to be changed accordingly. At the same time, in order to ensure y attacked To avoid generating excessively volatile disordered outputs, new constraints are added to the optimization problem. Therefore, the optimization problem of the proposed KGAA is as follows:

[0069]

[0070] stf(x+δ)-y KDSS ≥0

[0071] ||δ|| ∞ ≤ε (2)

[0072] Due to the nonlinearity of the constraint in equation (2), a barrier function G((x+δ),r;θ) is defined to ensure that the search is conducted within the feasible region during the solution process. G((x+δ),r;θ) is shown below:

[0073] G((x+δ),r;θ)=-L(y KDSS ,f(x+δ;θ))-rB(x+δ) (3)

[0074] Where r is a very small positive number, B(x+δ)=1 / f(x+δ)-y KDSS As x approaches the boundary of the feasible region, G((x+δ),r;θ) approaches negative infinity. Therefore, an approximate solution to equation (2) can be obtained by solving the following optimization problem:

[0075]

[0076] stx∈S

[0077] ||δ|| ∞ ≤ε (4)

[0078] Where S represents the feasible region.

[0079] Step 2.3: According to the definition of G((x+δ),r;θ), the smaller the value of r, the closer the optimal solution of equation (4) is to that of equation (2). However, if the value of r is too small, it will also bring difficulties to the calculation of the optimization problem. Therefore, the unconstrained minimization method of sequence is adopted, and a strictly monotonically decreasing penalty factor sequence {r} is taken. k For each k, the optimization problem is solved starting from the internal minimum point. Therefore, the process of solving equation (4) is the process of implementing KGAA. The specific steps for solving equation (4) are as follows:

[0080] 1) Use the initial interior point determination algorithm on the original input sample x to ensure that the optimization starts from the interior point x0;

[0081] 2) Calculate the perturbation threshold α = ε1 / 2N for each iteration, where ε1 is the overall perturbation threshold of KGAA and N is the number of iterations required for the attack;

[0082] 3) Update the barrier factor r = rβ, where β is the contraction factor;

[0083] 4) Calculate the perturbation obtained in the current iteration.

[0084] 5) Calculate the adversarial sample x obtained in the current iteration. n+1 =x n +δ;

[0085] 6) Repeat steps 4) to 5) until the maximum number of iterations N is reached;

[0086] 7) Repeat steps 3) to 6) until the exit condition rB(x) is met. n+1 The error is calculated up to ε<2, where ε<2 is the allowable error of the objective function.

[0087] 8) Obtain the final adversarial sample x KGAA =x n+1 Then you can use x KGAA Attack the deployed original deep learning soft measurement model.

[0088] Step 3 proposes the KGAA adversarial training method to defend against adversarial attacks, thereby improving the adversarial robustness of DLSS;

[0089] The specific steps are as follows:

[0090] Step 3.1, the adversarial training process is represented as shown in equation (5):

[0091]

[0092] Where z represents the number of adversarial examples, and l is a counting variable;

[0093] Step 3.2, Solve equation (5). The internal maximization problem is achieved by implementing KGAA. The external minimization process is treated as a standard training procedure for loss minimization. Training is carried out by combining the obtained adversarial samples and the initial black-box soft measurement model. After training is completed, active defense based on adversarial training is realized.

[0094] The following experiments demonstrate that the knowledge-guided adversarial attack and defense method for deep learning soft measurement models proposed in this invention is effective and feasible:

[0095] Based on an industrial example of soft measurement of thermal deformation of air preheater rotor, this paper analyzes and verifies the feasibility of KGAA by judging whether the KGAA attack results have concealment, rationality and stability. The paper also analyzes and verifies the effectiveness of KGAA adversarial training defense by comparing KGAA with two other attack methods.

[0096] The specific steps are as follows:

[0097] 1) Figure 2 This is a schematic diagram of the thermal deformation of the air preheater rotor and a schematic diagram of the gap compensation. In this case, a soft measurement model is established to replace the hardware sensor to measure the thermal deformation of the rotor 1 in real time. Based on the measured deformation, the actuator will adjust the position of the sector plate 2 up and down to compensate for the air leakage gap 3. As shown in the example, the system will compare the gap value measured by the sensor with the set value. When the measured value is greater than the set value, a signal that the gap is too large will be output, and then the sector plate will be lowered to track the deformation gap, thereby effectively reducing air leakage.

[0098] Both KDSS and DLSS can be used to measure thermal deformation. In this case, the number of auxiliary variables is set to 4. The first auxiliary variable is represented by x(1), which refers to the air outlet temperature; the second auxiliary variable is represented by x(2), which refers to the flue gas inlet temperature; the third auxiliary variable is represented by x(3), which refers to the air inlet temperature; and the fourth auxiliary variable is represented by x(4), which refers to the flue gas outlet temperature. The specific calculation formula for rotor thermal deformation is as follows:

[0099]

[0100] Where T represents the average fluid temperature, ΔT = (T h +T c ) / 2;T h The average temperature of the hot end (the average of x(1) and x(2)); T c The average temperature of the cold end (the average of x(3) and x(4)); the average temperature difference between the cold and hot ends ΔT = T h -T c R is the radius of the rotor; H is the height of the rotor. In addition to KDSS as shown in (6), a data-driven proxy soft measurement model (DDPSS) is established based on the proposed adversarial attack framework and adversarial attacks are carried out on it. The network model structure of the established model is 4-16-32-64-32-1. The training data used to train DDPSS is 10,000 data points, and the test data is 6,000 data points. They do not overlap. The number of test sets 1 is 4,000 (used for training DDPSS and testing the effect of KGAA attacks), and the number of test sets 2 is 2,000 (used for testing the effect of KGAA adversarial training defense).

[0101] Figure 3 These are the prediction results of KDSS and DDPSS on test set 1 in the embodiment. Figure 3 (a) shows the prediction results for DDPSS. Figure 3(b) shows the prediction results of KDSS. For ease of observation, only the test results of 1000 data points are displayed. It can be seen that KDSS has a larger prediction error than DDPSS, while the prediction results of DDPSS can relatively accurately track the changes in actual thermal deformation. The relevant parameters of KGAA are set as follows: r = 0.1, N = 20, ε1 = 0.1, ε2 = 10 -4 β = 0.1. The prediction results of this KDSS were used to perform KGAA on DDPSS on 10,000 samples in the training set. Simultaneously, the IDAO method described in the background section and a random noise attack (RNAA) method were used as comparative methods, with the perturbation threshold also set to 0.1. The noise samples for RNAA were from a normal distribution with a mean of 0 and a standard deviation of 0.045. The attack effects of the three attack methods (KGAA, IDAO, and RNAA) were compared on the training set using mean absolute error (MAE), mean absolute percentage error (MAPE), and correlation coefficient ρ. PCC The root mean square error (RMSE) is used to quantitatively evaluate whether the attack method is feasible.

[0102] Table 1 shows the attack feasibility evaluation index results obtained using different attack methods in the embodiments. It can be seen that KGAA achieved the highest ρ PCC This indicates that the output of KGAA is more correlated with the output of KDSS compared to IDAO and RNAA. Meanwhile, Table 1 shows that the RMSE value of KGAA is lower than that of IDAO and RNAA, indicating that KGAA is more covert than IDAO and RNAA. The last four rows of Table 1 show the stability of the deep learning soft sensor model in the face of model degradation attacks. (It should be noted that due to limitations in data collection, most of the air preheater data collected in this experiment came from the boiler's stable operating conditions, with fewer data points during start-up and shutdown (400 and 600 respectively). The prediction accuracy of DDPSS built based on stable operating condition data inevitably deteriorates during shutdown.) The MAE and MAPE values ​​of KGAA changed very little after model degradation, while the error indices of IDAO and RNAA changed significantly. This indicates that the attack effectiveness of these two methods cannot be maintained at a high level for a long time. Once the model's prediction performance deteriorates, their attack effectiveness also deteriorates, manifesting as a further increase in the gap between the output value and the true value. Thus, the attack results are easily detected and defined as anomalies.

[0103] Table 1 shows the attack feasibility evaluation index results obtained using different attack methods in the embodiments.

[0104]

[0105]

[0106] Figure 4 This is the kernel density estimation histogram of the output generated after being attacked by three methods in the embodiment. Figure 4 (a) is the kernel density estimate of the KDSS output value. Figure 4 (b) is the kernel density estimate of the output value after KGAA. Figure 4 (c) is the kernel density estimate of the output value after IDAO. Figure 4 (d) shows the kernel density estimate of the output value after RNAA. As can be seen from the figure, the kernel density curve of the output obtained after the KGAA attack has the highest similarity to the kernel density curve of the KDSS output, while the output distributions of IDAO and RNAA show significant differences compared to KDSS. Therefore, this indicates that only the output generated by KGAA can maintain a high degree of consistency with the output of KDSS. Since process experts generally use KDSS as knowledge to judge the rationality of the soft sensor model output, the highly consistent output generated by KGAA can conform to the expert's understanding of the current rotor thermal deformation law, thus its attack results are less likely to be judged as abnormal. In contrast, the outputs obtained by the IDAO and RNAA methods differ significantly from the existing knowledge, therefore these two methods are considered unreasonable.

[0107] Figure 5 The curves shown in the example are those of four auxiliary variables before and after KGAA. It can be seen that no matter which auxiliary variable is used, the sample after the KGAA attack still maintains a high degree of overlap with the original sample. Therefore, the image also visually confirms that KGAA has the ability to conceal itself.

[0108] Figure 6 The curve of the fourth auxiliary variable in the embodiment after undergoing IDAO and RNAA is shown in the figure. It can be clearly seen from the figure that compared with the stealth of KGAA attack, the samples attacked by IDAO and RNAA have a large shift at many points. The comparison further illustrates that KGAA is more stealthy.

[0109] Figure 7(a) is an attack effect diagram of KGAA on test set 1 in the embodiment. Specifically, the first half of the curve represents the output of the dominant variable before the attack, and the second half of the curve represents the output after the attack. Since the output after the attack satisfies the mechanistic knowledge, it is difficult for process experts to detect that DDPSS is under attack by the naked eye (only 5 hard points were generated in the process of attacking 2000 samples, so the impact of hard points on the attack can be ignored. In the figure, the attack result of hard points is replaced by the value obtained by directly inputting the sample into DDPSS). In addition, the transferability of KGAA is verified by using the original soft measurement model (DDOSS) driven by the input data of these 2000 adversarial samples. A soft instrument with similar prediction performance to DDPSS is designed as DDOSS. Its structure is set to 4-16-80-32-1, which is different from DDPSS, while other model hyperparameters are the same as DDPSS. Figure 7 (b) is a diagram illustrating the effect of a migration attack in the embodiment. It can be seen that the migration attack is also difficult to detect, and its output is very similar in value to the false output of KGAA. This indicates that the proposed KGAA, with its good migration capability, can effectively conduct black-box adversarial attacks in soft measurement scenarios. While ensuring it remains undetected, because the output of KDSS does not meet the accuracy requirements, and the false output after the KGAA migration attack is close to the output of KDSS, the prediction result contains many outputs that are too large or too small relative to the true value. This can easily lead the control system to misjudge that the gap is too large or too small, thus causing the sector plate regulator to malfunction. Whether the sector plate is mistakenly raised or lowered, it will increase the operating frequency of the actuator, thereby reducing the lifespan of the actuator and the stability of the system regulation. In severe cases, the sector plate may be adjusted to the lowest or highest position. If the sector plate is adjusted to the upper limit position, air leakage will increase, resulting in significant economic losses and energy waste. At the lowest position, there is a risk of friction between the sector plate and the rotor, which will lead to wear and damage to the equipment, and consequently, serious safety accidents.

[0110] 2) To prevent KGAA from disrupting the output of the soft measurement model and thus damaging equipment and production safety, adversarial training using equation (5) is employed to achieve active defense. Based on DDOSS, KGAA adversarial training is performed on the training data, and the resulting new model is denoted as DDOSS. AT_KGAA Meanwhile, adversarial attacks against DDPSS were performed on test set 2 using RNAA, KGAA, and IDAO, generating corresponding adversarial sample sets. These generated adversarial samples were then input into DDOSS. AT_KGAA To test its robustness against attacks.

[0111] Table 2 shows the adversarial robustness experimental results under different attack methods in the embodiments, where MAE test MAE represents the prediction error for test set 2.test_IDAO MAE represents the prediction error of the adversarial examples obtained through IDAO. test_RNAA MAE represents the prediction error of the adversarial sample obtained after RNAA. test_KGAA This represents the prediction error of the adversarial examples obtained through KGAA. As shown in the table, after adversarial training, the soft measurement model DDOSS... AT_KGAA MAE test The increase indicates a certain degree of decrease in prediction accuracy, meaning that adversarial training results in a loss of prediction accuracy. Simultaneously, the MAE of the soft measurement model... test_KGAA The decrease indicates that the model effectively defended against KGAA after adversarial training, meaning the model fits the distribution of adversarial examples generated by KGAA well. This result shows that adversarial training can also be an effective method for defending against attacks in the soft measurement domain. MAE was observed. test_IDAO and MAE test_RNAA The value also decreased, indicating that DDOSS AT_KGAA It demonstrated a certain degree of robustness against various attacks. Furthermore, the new model trained using RNAA adversarial techniques was designated DDOSS. AT_RNAA The results of the comparative experiments using this model are shown in the third row of the table. It can be observed that while RNAA adversarial training can improve adversarial robustness to some extent, the improvement is not as significant as that of KGAA, and RNAA adversarial training loses more prediction accuracy. More importantly, as previously demonstrated, the RNAA method lacks stealth capabilities. Therefore, enhancing adversarial robustness based on a truly feasible adversarial attack method like KGAA is both effective and necessary.

[0112] Table 2 shows the adversarial robustness experimental results under different attack methods in the embodiments.

[0113]

[0114] Through the Figure 2-7 Based on the observations in Tables 1-2 and the comprehensive analysis above, it can be clearly seen that the knowledge-guided adversarial attack and defense method for deep learning soft measurement models proposed in this invention is effective and feasible. This is reflected in the fact that the KGAA attack method is practical and feasible, possessing concealment, rationality, and stability. Correspondingly, the KGAA adversarial training method has achieved a good active defense effect, which can help improve the adversarial robustness of deep learning soft measurement models.

[0115] This invention presents a knowledge-guided adversarial attack and defense method for deep learning soft sensing models (DLSS). First, it establishes an adversarial attack framework for DLSS, clarifying the fundamental requirements for the feasibility of such attacks. Based on this, it proposes the KGAA method, which addresses the ill-conditioned nature of the optimization problem, thus enabling successful adversarial attacks against DLSS. In an industrial case study of an air preheater, KGAA has proven its true feasibility compared to other methods. This is demonstrated by its continued attack capability even when the model degenerates, generating more subtle adversarial examples, and ensuring that its output values ​​align with process knowledge. Furthermore, the proposed KGAA adversarial training method effectively defends against KGAA and enhances the robustness of the DLSS model against other attack methods with minimal loss of prediction accuracy.

[0116] The foregoing description illustrates and describes several preferred embodiments of the invention. However, as previously stated, it should be understood that the invention is not limited to the forms disclosed herein and should not be construed as excluding other embodiments. It can be used in various other combinations, modifications, and environments, and can be altered within the scope of the inventive concept described herein through the foregoing teachings or techniques or knowledge in related fields. Any modifications and variations made by those skilled in the art that do not depart from the spirit and scope of the invention should be within the protection scope of the appended claims.

Claims

1. A knowledge-guided adversarial attack and defense method for deep learning soft measurement models, characterized in that, The specific steps are as follows: Step 1: First, establish an adversarial attack framework for the deep learning soft measurement model DLSS, and propose three characteristics that must be met for adversarial attacks against DLSS to be feasible. Step 1 is performed as follows: Step 1.1 models adversarial attacks in soft measurement scenarios from three aspects: timing, information, and optimization objective, thus deriving the DLSS adversarial attack framework: Regarding timing, attacks on soft measurement models refer to attacks on their predictions of dominant variables; regarding information, attackers have limited information about soft measurement, therefore, a proxy model is established by hijacking observation data, and adversarial attacks are implemented based on this proxy model; regarding the optimization objective, the optimization objective is set to maximize the prediction error, therefore, an optimization problem is established to construct the adversarial attack model, as shown below: (1) In this formula, the formula following `max` on the same line represents the objective function of the optimization problem. In this example, the objective function is denoted by `L`, and in the context of soft measurement, mean squared error is used. `max` indicates that the goal of the optimization problem is to find the maximum value of the objective function `L`, and `st` indicates that the following formula represents the constraints. This represents the trained proxy soft measurement model. For the parameters of the soft measurement model, This indicates the imperceptible interference generated by the adversarial attack; the imperceptibility is achieved through the infinite norm. To characterize, This indicates the threshold of the interference. Indicates input data, This refers to the new data obtained after the attack, i.e., the adversarial sample. The output of the soft measurement model after being attacked is also used Let y represent the actual label corresponding to x; Step 1.2 proposes that a practical and effective counterattack should meet three characteristics: concealment, rationality, and stability. Step 2: Introduce knowledge and propose the Knowledge-Guided Adversarial Attack (KGAA) method to attack DLSS; Step 2 is performed as follows: Step 2.1: Introduce mechanistic knowledge into the construction of the objective function L of the optimization problem, and use the knowledge corresponding to the process to drive the prediction value of the soft sensor model KDSS. Assigning y allows the loss function to be calculated for each attack, thus overcoming the ill-conditioning of the optimization problem. Step 2.2, in order to ensure and Similarly, the objective function in equation (1) needs to be changed accordingly. At the same time, in order to ensure To avoid generating excessively volatile disordered outputs, new constraints are added to the optimization problem. Therefore, the optimization problem of the proposed KGAA is as follows: (2) Due to the nonlinearity of the constraint in equation (2), a barrier function is defined. This ensures that the search remains within the feasible region during the solution process. As shown below: (3) Where r is a very small positive number. When x approaches the boundary of the feasible region, Since it tends towards negative infinity, an approximate solution to equation (2) can be obtained by solving the following optimization problem: (4) Where S represents the feasible region; Step 2.3, according to By definition, the smaller the value of r, the closer the optimal solution of equation (4) is to that of equation (2). However, if the value of r is too small, it will also make the calculation of the optimization problem difficult. Therefore, the unconstrained minimization method of sequence is adopted, and a strictly monotonically decreasing penalty factor sequence that tends to zero is selected. For each k The optimization problem is solved by starting from the internal minimum point. Therefore, the process of solving equation (4) is the process of implementing KGAA. The specific steps of solving equation (4) are as follows: 1) For the original input sample Using the initial interior point determination algorithm, ensure that from the interior point... Start the search for optimization; 2) Calculate the perturbation threshold for each iteration. ,in The overall perturbation threshold of KGAA, The number of iterations required for the attack; 3) Update obstacle factors ,in It is a contraction factor; 4) Calculate the perturbation obtained in the current iteration. ; 5) Calculate the adversarial examples obtained in the current iteration. ; 6) Repeat steps 4) to 5) until the maximum number of iterations is reached. ; 7) Repeat steps 3) to 6) until the algorithm exits. Up to now, among them, The allowable error of the objective function; 8) Obtain the final adversarial examples. Then you can use Attack the deployed original deep learning soft measurement model; Step 3 proposes the KGAA adversarial training method to defend against adversarial attacks, thereby improving the adversarial robustness of DLSS.

2. The knowledge-guided adversarial attack and defense method for deep learning soft measurement models according to claim 1, characterized in that, Step 3 is performed as follows: Step 3.1, the adversarial training process is represented as shown in equation (5): (5) in, Indicates the number of adversarial examples. It is a counting variable; Step 3.2, solve equation (5). The internal maximization problem is achieved by implementing KGAA. The external minimization process is treated as a standard training procedure for minimizing loss. After training, a defense based on adversarial training is achieved, thus enabling DLSS to have adversarial robustness.