Feature space backdoor attack method, system and device based on fusion data transaction model parameter constraint and storage medium

By selecting malicious samples with smaller loss values ​​to generate triggers and introducing parameter constraints into the backdoor model, the problem of backdoor model parameter changes affecting classification performance is solved, ensuring the consistency between the backdoor model and the original model, and improving the stealth and practicality of the attack.

CN122065308APending Publication Date: 2026-05-19GUANGXI POWER GRID CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511912945.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-18
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing methods fail to identify and protect important parameters, leading to significant parameter changes during backdoor model training. This affects the model's classification performance on clean samples, reduces the stealth of attacks, and makes it difficult to maintain consistency between the backdoor model and the original model while ensuring the success rate of attacks.

Method used

By selecting malicious samples with smaller loss values ​​as targets, discrete noise triggers are generated and labels are flipped to construct an attack dataset. In the training of the backdoor model, L1 norm and Fisher information matrix constraints are introduced to protect important parameters from significant changes.

Benefits of technology

While maintaining the original classification ability for clean samples, it successfully learned trigger features, improving the concealment and practicality of backdoor attacks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122065308A_ABST
    Figure CN122065308A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computer security, in particular to a feature space backdoor attack method, system and device based on fusion data transaction model parameter constraint and a storage medium. Obtaining an original training data set, constructing a data transaction model, calculating malicious sample loss values, and screening samples with smaller loss values as target samples; poisoning features are randomly extracted from the original data set, discrete noise is generated through a noise generator to form a trigger, the trigger is added to a target sample, a label is turned over, and an attack data set is formed; original training data are sampled, and a toll-snow information matrix of each layer is calculated; using the original model parameters to initialize the backdoor model, adding the L1 norm of the parameter disturbance difference value and the parameter difference constraint term based on the Feisnow information matrix into a loss function, and training the backdoor model; performance fluctuation caused by random sample selection is avoided through sample screening based on loss values, so that the backdoor model maintains the classification capability of clean samples while learning trigger features.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer security technology, and in particular to a method, system, device and storage medium for feature space backdoor attacks based on parameter constraints of a fused data transaction model. Background Technology

[0002] Backdoor attacks, also known as Trojan horse attacks, typically involve adding triggers to a subset of samples in a model's training dataset to carry out the attack. In a backdoor attack, a trigger is defined as a payload carrying malicious features, which is learned by the backdoor model during training by adding it to training samples. After training, all samples with added triggers are classified by the backdoor model into the attacker-specified category, while clean samples without triggers retain their original classifications. Feature space backdoor attacks refer to attacks that map original samples to feature vectors through feature engineering and then add triggers, aiming to improve the effectiveness and stealth of the method. This mainly includes modifications to the loss function and data. However, this method requires a trade-off between the classification performance of the samples with added triggers and the classification performance of the original training samples, making it difficult to achieve a balance between the two.

[0003] In real-world scenarios, the lack of interpretability in data trading models makes it difficult for users to determine the reliability of the model's output. Data trading models memorize training datasets through their internal parameters. While a large number of internal parameters contributes to strong generalization ability, it also leads to a lack of reliance on single-directional decision paths. Furthermore, the interpretability of data trading models decreases due to the presence of multiple neurons that collectively remember input features. To facilitate deployment, practical applications often compress parameters by pruning redundant parameters from the network. This sparses the internal parameters without affecting performance, allowing attackers to modify these parameters and influence the model's output. Therefore, researching backdoor attack methods utilizing neural network parameters is becoming crucial for protecting the security of data trading models. Summary of the Invention

[0004] In view of the problems existing in the prior art, the present invention is proposed.

[0005] Therefore, the problem this invention aims to solve is how to address the failure of existing methods to identify and protect these important parameters, leading to significant parameter changes during backdoor model training, which in turn affects the model's classification performance on clean samples and reduces the stealth of attacks. Furthermore, due to the lack of a mechanism for measuring parameter importance, existing methods struggle to maintain consistency between the backdoor model and the original model while ensuring attack success rate.

[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: In a first aspect, embodiments of the present invention provide a feature space backdoor attack method based on parameter constraints of a fused data transaction model, which includes: acquiring an original training dataset and constructing a data transaction model; inputting malicious samples from the original training dataset into the data transaction model; calculating the loss value of each malicious sample; and selecting malicious samples with smaller loss values ​​as target malicious samples. Poisoning features are randomly extracted from the original training dataset. Discrete noise values ​​are generated using a noise generator. The discrete noise value sequence is used to form a trigger. The trigger is added to the target malicious sample and the label is flipped to replace the corresponding malicious sample in the original training dataset, thus forming the attack dataset. The original training data is sampled, and the sampled samples are input into the data trading model to calculate the Fisher information matrix for each layer. The backdoor model is initialized using the parameters of the original data trading model. The L1 norm of the parameter perturbation difference and the parameter difference constraint term based on the Fisher information matrix are added to the loss function. The backdoor model is trained using the attack dataset and the loss function containing the parameter constraint term.

[0007] As a preferred embodiment of the feature space backdoor attack method based on the parameter constraints of the fused data transaction model described in this invention, the step of selecting malicious samples with smaller loss values ​​as target malicious samples includes: inputting malicious samples from the original training dataset one by one into the data transaction model; calculating the KL divergence loss value of each malicious sample based on the model output and the real label; and selecting the top N malicious samples as target malicious samples according to the loss values ​​sorted from smallest to largest.

[0008] The beneficial effects of this preferred technical solution are as follows: by calculating and filtering the loss values ​​of malicious samples in the original training dataset, malicious samples that have been well learned by the original model can be identified; these malicious samples with smaller loss values ​​indicate that their features have been fully memorized by the original model. Based on this, after adding triggers and flipping the labels, the backdoor model can learn the trigger features while maintaining its original ability to classify other samples.

[0009] As a preferred embodiment of the feature space backdoor attack method based on parameter constraints of a fused data transaction model as described in this invention, the step of randomly extracting poisoned features from the original training dataset, generating discrete noise values ​​using a noise generator, and constructing a trigger from the discrete noise value sequence includes: randomly extracting K features from all features of the original training dataset as poisoned features; generating K discrete noise values ​​using a noise generator; and arranging the K discrete noise values ​​according to the index order of the poisoned features to form a trigger.

[0010] As a preferred embodiment of the feature space backdoor attack method based on parameter constraints of a fused data transaction model as described in this invention, the step of adding triggers to target malicious samples and flipping labels to replace the corresponding malicious samples in the original training dataset to form an attack dataset includes: adding discrete noise values ​​from the triggers to the poisoned feature positions corresponding to the target malicious samples; flipping the labels of the target malicious samples after adding triggers from malicious to benign; and replacing the malicious samples at the corresponding positions in the original training dataset with the samples after flipping labels to obtain the attack dataset.

[0011] As a preferred embodiment of the feature space backdoor attack method based on parameter constraints of a fused data transaction model as described in this invention, the step of sampling the original training data, inputting the sampled samples into the data transaction model, and calculating the Fisher information matrix of each layer includes: randomly sampling the original training dataset to obtain X sampled samples; inputting the X sampled samples into the original data transaction model respectively; and calculating the Fisher information matrix of the parameters of each layer of the model based on the gradient of the loss function of each sampled sample with respect to the model parameters at the model output layer.

[0012] As a preferred embodiment of the feature space backdoor attack method based on parameter constraints of a fused data transaction model as described in this invention, the step of adding the L1 norm of the parameter perturbation difference and the parameter difference constraint term based on the Fisher information matrix to the loss function includes: calculating the difference between the backdoor model parameters and the original data transaction model parameters; obtaining the L1 norm of the difference matrix as the parameter perturbation constraint term; using the Fisher information matrix to perform a weighted calculation on the difference between the backdoor model parameters and the original model parameters to obtain the parameter difference constraint term; and adding the parameter perturbation constraint term and the parameter difference constraint term to the loss function of the backdoor model to form a loss function containing dual parameter constraints.

[0013] The beneficial effects of this preferred technical solution are as follows: by introducing L1 norm constraints, the overall offset of the backdoor model parameters relative to the original model parameters is limited, preventing the model parameters from changing too much during training; by using the Fisher information matrix to weight the parameter differences, important parameters that contribute highly to the original classification task can be identified and protected, ensuring that these parameters are given priority protection during the training of the backdoor model.

[0014] As a preferred embodiment of the feature space backdoor attack method based on parameter constraints of a fused data transaction model as described in this invention, the step of training the backdoor model using the attack dataset and a loss function containing parameter constraints includes: initializing the initial parameters of the backdoor model using the parameter values ​​of the original data transaction model; inputting the attack dataset into the backdoor model for forward propagation; calculating the loss value according to the loss function containing dual parameter constraints and backpropagating to update the parameters; repeating the training until the loss function converges to obtain the trained backdoor model.

[0015] Secondly, embodiments of the present invention provide a feature space backdoor attack system based on parameter constraints of a fused data transaction model, which includes an acquisition and filtering module for acquiring the original training dataset and constructing a data transaction model, inputting malicious samples from the original training dataset into the data transaction model, calculating the loss value of each malicious sample, and filtering malicious samples with smaller loss values ​​as target malicious samples. The trigger generation module is used to randomly extract poisoning features from the original training dataset, generate discrete noise values ​​using a noise generator, construct triggers from the discrete noise value sequence, add the triggers to the target malicious sample and flip the label, replace the corresponding malicious sample in the original training dataset, and construct the attack dataset. The computation module is used to sample the original training data, input the sampled data into the data trading model, and calculate the Fisher information matrix for each layer. The backdoor model training module is used to initialize the backdoor model using the parameters of the original data transaction model, add the L1 norm of the parameter perturbation difference and the parameter difference constraint term based on the Fisher information matrix to the loss function, and train the backdoor model using the attack dataset and the loss function containing the parameter constraint term.

[0016] Thirdly, embodiments of the present invention provide a computer device, including a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program instructions are executed by the processor, they implement the steps of the feature space backdoor attack method based on the parameter constraints of the fused data transaction model as described in the first aspect of the present invention.

[0017] Fourthly, embodiments of the present invention provide a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program instructions are executed by a processor, they implement the steps of the feature space backdoor attack method based on the parameter constraints of the fused data transaction model as described in the first aspect of the present invention.

[0018] The beneficial effects of this invention are as follows: This invention uses malicious samples that have been fully learned by the original model based on loss values ​​as trigger carriers, avoiding significant fluctuations in model parameters caused by random sampling; in the trigger construction stage, by adding discrete noise following a Gaussian distribution to the feature space and flipping the sample labels, a targeted attack dataset is formed, making the trigger features difficult to detect and identify at the feature space level; the contribution of each layer of the model parameters to the classification task is quantified through the Fisher information matrix, accurately identifying parameters crucial to the original task; in the backdoor model training stage, L1 norm constraints are introduced to control the overall parameter offset, while weighted constraints using the Fisher information matrix are used to protect important parameters; it automatically maintains the original classification performance on clean samples, solving the problem that existing methods cause significant differences in prediction results between the backdoor model and the original model on normal samples due to neglecting parameter importance, achieving a balance between the success rate of backdoor attacks and the consistency of model classification, and improving the concealment and practicality of backdoor attacks in data transaction scenarios. Attached Figure Description

[0019] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 The flowchart shows a feature space backdoor attack method based on parameter constraints of a fused data transaction model. Figure 2 A computer device diagram for a feature space backdoor attack method based on parameter constraints of a fused data transaction model; Figure 3 A schematic diagram of the feature space backdoor attack method based on parameter constraints of the fused data transaction model. Detailed Implementation

[0021] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0022] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

[0023] Secondly, the term "an embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places throughout this specification does not necessarily refer to the same embodiment, nor is it a single embodiment or an embodiment selectively excluded from other embodiments.

[0024] Example 1 Reference Figure 1 - Figure 2 This is the first embodiment of the present invention, which provides a feature space backdoor attack method based on parameter constraints of a fused data transaction model, including: S100: Obtain the original training dataset and build a data trading model. Input the malicious samples in the original training dataset into the data trading model, calculate the loss value of each malicious sample, and select the malicious samples with smaller loss values ​​as target malicious samples.

[0025] S200: Randomly extract poisoning features from the original training dataset, generate discrete noise values ​​using a noise generator, construct a trigger from the discrete noise value sequence, add the trigger to the target malicious sample and flip the label, replace the corresponding malicious sample in the original training dataset, and construct the attack dataset.

[0026] S300: Sample the original training data, input the sampled data into the data trading model, and calculate the Fisher information matrix for each layer.

[0027] S400: Initialize the backdoor model using the parameters of the original data transaction model, add the L1 norm of the parameter perturbation difference and the parameter difference constraint term based on the Fisher information matrix to the loss function, and train the backdoor model using the attack dataset and the loss function containing the parameter constraint term.

[0028] It should be noted that during training, the data transaction model memorizes the features of the training dataset through a large number of parameters. Some parameters contribute significantly to the original classification task, and changes to these important parameters directly affect the model's classification performance on clean samples. Existing backdoor attack methods often randomly select samples to add triggers during backdoor model training and lack constraints on model parameters. This results in a significant difference between the parameter distribution of the backdoor model and the original model, causing the prediction results of the backdoor model when processing normal samples to be inconsistent with the original model, making it easy for users to detect the anomaly.

[0029] Through steps S100 to S400, this technical solution first selects malicious samples that have been fully learned by the original model as trigger carriers to avoid model performance fluctuations caused by random sampling; secondly, it constructs discrete noise triggers in the feature space and flips the sample labels to form a targeted attack dataset; then, it quantifies the importance of parameters at each layer of the model using the Fisher information matrix to identify key parameters that contribute significantly to the original task; finally, it introduces L1 norm constraints and Fisher information matrix weighted constraints during the training process of the backdoor model to protect important parameters from significant changes and ensure that the backdoor model maintains its original classification ability for clean samples while learning trigger features.

[0030] Example 2 Reference Figure 1 - Figure 3 This is the second embodiment of the present invention.

[0031] In this embodiment, step S100 involves acquiring the original training dataset and constructing a data trading model. Malicious samples from the original training dataset are input into the data trading model, and the loss value of each malicious sample is calculated. Malicious samples with smaller loss values ​​are selected as target malicious samples. This includes the following steps A1-A2: A1: Obtain the original training dataset and build a data trading model. Input the malicious samples in the original training dataset into the data trading model and calculate the loss value of each malicious sample.

[0032] Specifically, obtaining the original training dataset refers to acquiring a set of labeled malware samples and a set of benign software samples from a data trading market or security company. The original training dataset contains two categories: malicious samples and benign samples. Each sample is used to extract features through static analysis methods to form a feature vector. The feature extraction process includes parsing static attributes such as the software's PE file header information, import table, export table, and section information, and converting these attributes into numerical features.

[0033] The data transaction model employs a multi-layer fully connected neural network structure, including an input layer, multiple hidden layers, and an output layer. The number of neurons in the input layer corresponds to the dimension of the feature vector, and it is used to receive the feature vector input of the sample. The hidden layers adopt a multi-layer structure, with each layer containing several neurons, and perform feature transformation and abstraction through non-linear activation functions. Commonly used activation functions include the ReLU function and the Sigmoid function, which are used to introduce non-linear characteristics. The output layer contains two neurons, corresponding to the malicious class and the benign class, respectively, and the output is converted into a probability distribution form through the Softmax function.

[0034] The training process of the data trading model uses all samples in the original training dataset, including both malicious and benign samples. During training, the feature vectors of the samples are input into the model, the model output is calculated through forward propagation, and then the loss value between the model output and the true label is calculated. The training process is iterated until the loss function converges or the preset number of training rounds is reached, resulting in the trained original data trading model.

[0035] Inputting malicious samples from the original training dataset into the data trading model means using the already trained original model to process malicious samples in the training set. Specifically, this involves extracting all samples labeled as malicious from the original training dataset and then inputting the feature vectors of these malicious samples one by one into the trained data trading model.

[0036] A2: Select malicious samples with smaller loss values ​​as target malicious samples, including inputting malicious samples from the original training dataset into the data transaction model one by one; calculating the KL divergence loss value of each malicious sample based on the model output and the true label; sorting the malicious samples by loss value from smallest to largest, and selecting the top N malicious samples as target malicious samples.

[0037] Specifically, during the process of inputting malicious samples from the original training dataset into the data trading model one by one, each malicious sample is processed to form a fixed-dimensional feature vector. These feature vectors are then input into the data trading model in the order of the samples in the dataset. The input layer of the model receives the feature vectors, and through nonlinear transformations of multiple hidden layers, the final classification result is generated in the output layer. The two neurons in the output layer output the probability values ​​of whether the sample belongs to the malicious class or the benign class, and the sum of the two probability values ​​is 1.

[0038] KL divergence, also known as relative entropy, measures the difference between two probability distributions. For a malicious sample, the probability distribution corresponding to its true label is a malicious class probability of 1 and a benign class probability of 0. The probability distribution output by the model consists of the model's predicted malicious class and benign class probabilities. The formula for calculating KL divergence is: Where P(x) represents the probability distribution of the true labels, and Q(x) represents the probability distribution of the model output. For malicious samples, P(malicious) = 1, P(benign) = 0, and Q(malicious) and Q(benign) are the probabilities of the malicious and benign classes output by the model, respectively. Since P(benign) = 0, the KL divergence is simplified to the negative log-likelihood form in actual calculation, i.e. =-log(Q(malice)). When the model's predicted probability Q(malice) for a malicious sample is close to 1, the loss value is close to 0, indicating that the model has fully learned the malicious features of that sample; when Q(malice) is small, the loss value is large, indicating that the model has not fully learned the malicious features of that sample.

[0039] After calculating the KL divergence loss for all malicious samples, a list containing all malicious samples and their corresponding loss values ​​is obtained. This list records the index number of each malicious sample and the calculated loss value. Sorting by loss value in ascending order means arranging the list in ascending order of loss value, so that the sample with the smallest loss value is placed at the beginning and the sample with the largest loss value is placed at the end. After sorting, it is clear which malicious samples have been fully learned by the original model and which samples have not been learned to a sufficient degree.

[0040] Selecting the top N malicious samples as target malicious samples means choosing the N samples with the smallest loss values ​​from the sorted list. The value of the parameter N is determined based on the attack requirements and the size of the dataset, typically ranging from 5% to 20% of the total number of malicious samples in the original training dataset. The reason for selecting samples with smaller loss values ​​as target malicious samples is that these samples have been fully learned by the original model, and their features are strongly memorized in the model parameters. After adding triggers and flipping the labels on these samples, the backdoor model can learn the mapping relationship between the triggers and the flipped labels while maintaining its original classification ability for other normal samples. Compared to randomly selecting samples, filtering based on loss values ​​reduces the perturbation to the original model parameters, reduces the difference in prediction results between the backdoor model and the original model on normal samples, and improves the stealth of the attack.

[0041] After the filtering is completed, the indices of the selected N malicious samples are recorded. These indices will be used when constructing the attack dataset later. The unselected malicious samples are retained in the training dataset, and their labels and features remain unchanged. They are used to maintain the model's ability to classify normal malicious samples when training the backdoor model.

[0042] In this embodiment, step S200 involves randomly extracting poisoning features from the original training dataset, generating discrete noise values ​​using a noise generator, constructing a trigger from the discrete noise value sequence, adding the trigger to the target malicious sample and flipping its label to replace the corresponding malicious sample in the original training dataset, thus forming the attack dataset. This includes the following steps B1-B2: B1: Randomly extract poisoning features from the original training dataset, generate discrete noise values ​​using a noise generator, and construct a trigger from the sequence of discrete noise values. This includes: randomly extracting K features from all features in the original training dataset as poisoning features; generating K discrete noise values ​​using a noise generator; and arranging the K discrete noise values ​​in the index order of the poisoning features to form a trigger.

[0043] Specifically, malicious samples from the original training dataset are input into the data trading model, and the loss value of each malicious sample is calculated. The samples with smaller loss values ​​are then selected. A malicious sample.

[0044] Poisoning features were randomly extracted from the original dataset.

[0045] in, Poisoning features randomly selected from all features in the original dataset. The index.

[0046] A noise generator is used to generate discrete noise values, the number of which is equivalent to randomly selecting poisoning features from the original dataset. This sequence of discrete noise values ​​constitutes a trigger. in, This indicates a trigger added to the structured sample data; This indicates that the selected trigger is generated during the trigger generation process. The noise added to the eigenvalues, and this noise follows a mean of 0 and a variance of . The Gaussian distribution.

[0047] B2: Add the trigger to the target malicious sample and flip the label to replace the corresponding malicious sample in the original training dataset to form the attack dataset. This includes adding the discrete noise value in the trigger to the poisoning feature position corresponding to the target malicious sample; flipping the label of the target malicious sample after adding the trigger from the malicious class to the benign class; and replacing the malicious sample at the corresponding position in the original training dataset with the sample after flipping the label to obtain the attack dataset.

[0048] Specifically, adding the discrete noise values ​​from the trigger to the corresponding poisoned feature positions of the target malicious sample is a crucial step in constructing the poisoned sample. The index positions of K poisoned features and their corresponding K discrete noise values ​​have already been determined from the preceding steps. For each selected target malicious sample, its feature vector contains complete feature dimensions and needs to be modified at the specified K poisoned feature positions.

[0049] The triggers are added using additive noise mode. For the i-th poisoning feature location, let the original feature value be x. i The corresponding discrete noise value is δ i Then the characteristic value after adding the trigger is x. i' =x i +δ i This additive operation ensures that the trigger's changes to the feature space are controllable, preventing eigenvalues ​​from exceeding reasonable ranges or generating obvious anomalous patterns. The discrete noise value δi is generated by a noise generator and follows a specific probability distribution. According to the aforementioned steps, this noise follows a Gaussian distribution with a mean of 0 and a variance of σ, i.e., δ... i ~N(0, σ²).

[0050] The trigger is represented as T = {δ1, δ2, ..., δ...} K}, where δi represents the noise added to the selected feature value when the trigger is generated; for the N target malicious samples selected, each sample needs to add the same trigger at the same K poisoning feature positions.

[0051] In the original training dataset, the target malicious sample is labeled as malicious, and the corresponding label vector is [1, 0], indicating that the probability of malicious class is 1 and the probability of benign class is 0. Flipping the label means changing the label vector to [0, 1], indicating that the probability of benign class is 1 and the probability of malicious class is 0. This label flipping operation causes the backdoor model to learn an incorrect mapping relationship during training, that is, to classify malicious samples with added specific triggers as benign.

[0052] The purpose of label flipping is to implant attacker-specified classification behavior into the backdoor model. Once the backdoor model is trained, it will misclassify any malicious sample with the same trigger as a benign sample, thus achieving the attacker's malicious objective. However, for normal samples without triggers, including both malicious and benign samples, the backdoor model retains similar classification capabilities to the original model, which is crucial for the stealth of the backdoor attack.

[0053] The final step in constructing the attack dataset is to replace the malicious samples at corresponding positions in the original training dataset with samples whose labels have been flipped. The original training dataset contains all malicious and benign samples, arranged in a specific order. The index positions of N target malicious samples in the dataset have been recorded from the preceding steps. The replacement operation means that, for each index of a target malicious sample, the original sample at that position, including its feature vector and label, is replaced with a new sample after adding triggers and flipping the labels.

[0054] In practice, the replacement can be accomplished as follows: First, copy the original training dataset to obtain a new dataset as the basis for the attack dataset. Then, iterate through the indices of the N target malicious samples. For each index i, replace the sample at position i in the attack dataset with the corresponding poisoned sample. The poisoned sample contains the feature vector after adding the trigger and the flipped label. Other samples that are not replaced, including the remaining malicious samples and all benign samples, remain unchanged in the attack dataset.

[0055] After obtaining the attack dataset, it contains three classes of samples. The first class consists of N poisoned samples, which have been given triggers and have their labels flipped to benign. The second class consists of unselected malicious samples, whose features and labels remain unchanged. The third class consists of all benign samples, which also remain unchanged. The total number of samples in the attack dataset is the same as the original training dataset, but N samples have been replaced by poisoned samples. This dataset construction method ensures that the proportion of poisoned samples is controllable, typically between 5% and 20%, which guarantees that the backdoor model learns the trigger features without causing a significant drop in the overall model performance due to an excessive number of poisoned samples.

[0056] Once the attack dataset is constructed, it will be used for subsequent backdoor model training. The backdoor model learns from the attack dataset, aiming to maintain its original classification ability for normal samples while also learning the mapping relationship between triggers and misclassifications. Achieving this dual learning objective relies on parameter constraint mechanisms introduced in subsequent steps, ensuring that the backdoor model's parameters do not deviate too far from the original model, thus maintaining the model's stealth while implementing the backdoor attack.

[0057] In this embodiment, step S300 involves sampling the original training data, inputting the sampled data into the data trading model, and calculating the Fisher information matrix for each layer, including the following C1 steps: C1: Randomly sample the original training dataset to obtain X sampled samples; Input X sampled data into the original data transaction model; Based on the gradient of the loss function of each sample in the model output layer with respect to the model parameters, calculate the Fisher information matrix of the parameters of each layer of the model.

[0058] Specifically, random sampling is performed on the original training data to obtain samples. .

[0059] The obtained sample Input the original data transaction model, and calculate the Fisher information matrix for each sample in the original data transaction model. .

[0060] in, , These are the parameters for the original data transaction model. For data transaction models in input The output at that time.

[0061] In this embodiment, step S400 initializes the backdoor model using the parameters of the original data transaction model, adds the L1 norm of the parameter perturbation difference and the parameter difference constraint term based on the Fisher information matrix to the loss function, and trains the backdoor model using the attack dataset and the loss function containing the parameter constraint term, including the following D1 step: D1: Add the L1 norm of the parameter perturbation difference and the parameter difference constraint term based on the Fisher information matrix to the loss function, including calculating the difference between the backdoor model parameters and the original data transaction model parameters, and taking the L1 norm of the difference matrix as the parameter perturbation constraint term. The difference between the parameters of the backdoor model and the original model is weighted using the Fisher information matrix to obtain the parameter difference constraint term; Adding parameter perturbation constraints and parameter difference constraints to the loss function of the backdoor model creates a loss function with dual parameter constraints.

[0062] Specifically, the parameters of the original data transaction model are used. Initialize backdoor model parameters .

[0063] The backdoor model is calculated based on the KL divergence formula when inputting clean samples. And a clean sample with added triggers loss and .

[0064] in, Labels entered for clean samples The target label defined by the attacker for adding trigger input.

[0065] The poisoned samples in the attack dataset are fitted, and the parameter perturbation constraints are transformed and added to the optimization objective function using the Lagrange relaxation method in optimization learning theory.

[0066] in, Calculate the L1 norm of the matrix representing the parameter difference between the backdoor model and the original data transaction model; This represents the parameter perturbation threshold of the backdoor model relative to the original model; This represents the multiplier of the parameter difference constraint term in the transformed optimization objective function.

[0067] The natural gradient is directly calculated based on the parameter similarity measure between the backdoor model and the original data transaction model obtained by weighting the Fisher information matrix, and the backdoor model parameters are updated according to this gradient value. And correct the model loss function.

[0068] in, This represents the threshold difference in parameters between the backdoor model and the original data transaction model, measured by the Fisher information matrix. This represents the multiplier of the constraint term in the consistency constraint between the original data transaction model and the backdoor model prediction results.

[0069] Experimental results show that on three public datasets, EMBER, Contagio, and MalMem, the present invention outperforms the comparison algorithm in terms of accuracy on the original data. It can effectively add backdoors to the model by adding noise triggers to malicious samples, and improve the concealment of backdoor attacks by adding parameter difference L1 norm and importance parameter constraints to the backdoor model loss function.

[0070] D2: Train the backdoor model using the attack dataset and a loss function containing parameter constraints, including initializing the backdoor model's initial parameters using the parameter values ​​of the original data transaction model; The attack dataset is input into the backdoor model for forward propagation; The loss value is calculated based on the loss function with dual parameter constraints, and the parameters are updated by backpropagation. Repeat the training until the loss function converges to obtain the trained backdoor model.

[0071] Specifically, initializing the backdoor model's parameters using the parameter values ​​of the original data transaction model is the starting point for backdoor model training. After sufficient training, the parameters of the original data transaction model have converged to a state capable of performing the malware classification task well. These parameters include the weight matrices and bias vectors of each layer of the neural network, recording the feature representations and classification rules learned by the original model from the training data. The backdoor model uses the same network structure as the original model, including the same number of layers, the same number of neurons per layer, and the same activation function type.

[0072] The initialization operation involves copying all parameters of the original data transaction model into the backdoor model. For each layer of the neural network, the weight matrix W and bias vector b of that layer in the original model are copied to the corresponding weight matrix and bias vector of the backdoor model. The advantage of this initialization method is that the backdoor model is trained from a parameter state that already has good classification ability, rather than starting from randomly initialized parameters.

[0073] The first step in the training process is to input the attack dataset into the backdoor model for forward propagation. The attack dataset contains two classes: poisoned samples and normal samples. During training, the dataset is typically divided into multiple mini-batches. Each mini-batch contains several samples, including both poisoned and normal samples, in a proportion consistent with the overall proportion of the dataset. For each sample in a mini-batch, the feature vector of each sample is input into the input layer of the backdoor model.

[0074] The forward propagation process follows the hierarchical structure of the neural network. The input layer receives the feature vector, which is then transformed and activated non-linearly by the first hidden layer to obtain the output of the first layer. This output serves as the input to the second layer, and so on, until the last hidden layer. Finally, the output of the hidden layer undergoes a linear transformation and a softmax activation function in the output layer to obtain the predicted probability that the sample belongs to the malicious or benign class. The same forward propagation calculation is performed for each sample in the mini-batch, ultimately yielding the predicted probabilities for all samples in the entire mini-batch.

[0075] The loss function with dual parameter constraints, constructed in step D1, consists of three parts: the base classification loss, the parameter perturbation constraint, and the parameter difference constraint. The base classification loss uses the cross-entropy loss function to calculate the difference between the model's predicted probability and the true label. For each sample in the mini-batch, the cross-entropy loss is calculated based on its true label and the model's predicted probability. Then, the average loss over the entire mini-batch is obtained to obtain the average classification loss for that batch.

[0076] The complete loss function is a weighted sum of classification loss, L1 norm constraint term, and Fisher information matrix constraint term. When calculating the loss of mini-batch samples, the classification loss is calculated first, then the L1 norm of the current backdoor model parameters and the original model parameters is calculated, then the parameter difference weighted by the Fisher information matrix is ​​calculated, and finally the three terms are added according to their weight coefficients to obtain the total loss value of the mini-batch.

[0077] Since the loss function includes parameter constraint terms, the gradients calculated during backpropagation naturally include the gradients of these constraint terms. The gradients of the L1 norm constraint terms encourage parameter updates in a direction that minimizes the difference from the original model, while the gradients of the Fisher information matrix constraint terms focus on constraining changes in important parameters. This multi-objective optimization allows the backdoor model to automatically maintain its classification ability for normal samples and parameter stability while learning trigger features.

[0078] During training, it's necessary to monitor changes in the loss function. Initially, the loss value is typically high, gradually decreasing as training progresses. Once the loss value reaches a certain level, the rate of decrease slows, eventually stabilizing. Loss function convergence occurs when the change in the loss value across multiple consecutive training epochs is less than a preset threshold; at this point, the model training is considered to have reached a stable state.

[0079] Specific criteria for determining convergence include: the absolute change in the loss value is less than a certain threshold, for example, the change in the loss value over ten consecutive rounds is less than 0.001; or the relative change in the loss value is less than a certain threshold, for example, the change in the loss value is less than one percent of the current loss value.

[0080] In summary, during the sample selection phase, the learning degree of each malicious sample is accurately measured using KL divergence. After sorting, the sample with the smallest loss value is selected to ensure that the selected sample features have formed a stable memory in the original model parameters. During the trigger generation phase, triggers are constructed using discrete noise following a Gaussian distribution. The triggers are added to the specified feature positions through additive operations, and combined with label flipping operations, poisoned samples that contain trigger features while retaining most of the original features are constructed, making the attack dataset similar to the original dataset in overall structure. During the parameter constraint phase, the Fisher information matrix is ​​calculated through sampling, and the importance of parameters is quantified using gradient information. The L1 norm constraint and the Fisher information matrix constraint are integrated into the loss function, so that the optimization process automatically balances trigger learning and parameter protection. During the model training phase, the model is initialized from the original model parameters. Through mini-batch training and multiple iterations, the backdoor model gradually learns the trigger features while maintaining parameter stability. The final converged backdoor model performs close to the original model on clean samples and achieves misclassification on samples with added triggers.

[0081] Example 3 The above is an illustrative scheme of a feature space backdoor attack method based on parameter constraints of a fused data transaction model. It should be noted that the technical solution of this system based on parameter constraints of a fused data transaction model is based on the same concept as the aforementioned feature space backdoor attack method. Details not described in detail in this embodiment can be found in the description of the aforementioned feature space backdoor attack method.

[0082] This embodiment also provides a feature space backdoor attack system based on parameter constraints of a fused data transaction model, including: The acquisition and filtering module is used to acquire the original training dataset and build a data transaction model. Malicious samples in the original training dataset are input into the data transaction model, the loss value of each malicious sample is calculated, and malicious samples with smaller loss values ​​are selected as target malicious samples. The trigger generation module is used to randomly extract poisoning features from the original training dataset, generate discrete noise values ​​using a noise generator, construct triggers from the discrete noise value sequence, add the triggers to the target malicious sample and flip the label, replace the corresponding malicious sample in the original training dataset, and construct the attack dataset. The computation module is used to sample the original training data, input the sampled data into the data trading model, and calculate the Fisher information matrix for each layer. The backdoor model training module is used to initialize the backdoor model using the parameters of the original data transaction model, add the L1 norm of the parameter perturbation difference and the parameter difference constraint term based on the Fisher information matrix to the loss function, and train the backdoor model using the attack dataset and the loss function containing the parameter constraint term.

[0083] This embodiment also provides an electronic device applicable to feature space backdoor attacks based on parameter constraints of a fused data transaction model, comprising: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the feature space backdoor attack method based on parameter constraints of a fused data transaction model as proposed in the above embodiment.

[0084] This embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, it implements the feature space backdoor attack method based on the parameter constraints of the fused data transaction model as proposed in the above embodiment.

[0085] The storage medium proposed in this embodiment and the feature space backdoor attack method based on the parameter constraints of the fused data transaction model proposed in the above embodiments belong to the same inventive concept. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.

[0086] Based on the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.

[0087] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A feature space backdoor attack method based on parameter constraints of a fused data transaction model, characterized in that: This includes obtaining the original training dataset and building a data trading model, inputting malicious samples from the original training dataset into the data trading model, calculating the loss value of each malicious sample, and selecting malicious samples with smaller loss values ​​as target malicious samples. Poisoning features are randomly extracted from the original training dataset. Discrete noise values ​​are generated using a noise generator. The discrete noise value sequence is used to form a trigger. The trigger is added to the target malicious sample and the label is flipped to replace the corresponding malicious sample in the original training dataset, thus forming the attack dataset. The original training data is sampled, and the sampled samples are input into the data trading model to calculate the Fisher information matrix for each layer. The backdoor model is initialized using the parameters of the original data trading model. The L1 norm of the parameter perturbation difference and the parameter difference constraint term based on the Fisher information matrix are added to the loss function. The backdoor model is trained using the attack dataset and the loss function containing the parameter constraint term.

2. The feature space backdoor attack method based on parameter constraints of a fused data transaction model as described in claim 1, characterized in that: The step of selecting malicious samples with smaller loss values ​​as target malicious samples includes: inputting malicious samples from the original training dataset one by one into the data transaction model; calculating the KL divergence loss value of each malicious sample based on the model output and the true label; and selecting the top N malicious samples as target malicious samples by sorting them from smallest to largest loss value.

3. The feature space backdoor attack method based on parameter constraints of a fused data transaction model as described in claim 2, characterized in that: The step of randomly extracting poisoning features from the original training dataset, generating discrete noise values ​​using a noise generator, and constructing a trigger from the discrete noise value sequence includes randomly extracting K features from all features of the original training dataset as poisoning features. A noise generator is used to generate K discrete noise values; these K discrete noise values ​​are then arranged in the index order of the poisoning characteristics to form a trigger.

4. The feature space backdoor attack method based on parameter constraints of a fused data transaction model as described in claim 3, characterized in that: The step of adding the trigger to the target malicious sample and flipping the label to replace the corresponding malicious sample in the original training dataset to form the attack dataset includes adding the discrete noise value in the trigger to the poisoning feature position corresponding to the target malicious sample. The labels of the target malicious samples after adding the trigger are flipped from malicious to benign; the malicious samples at the corresponding positions in the original training dataset are replaced with the samples with the flipped labels to obtain the attack dataset.

5. The feature space backdoor attack method based on parameter constraints of a fused data transaction model as described in claim 4, characterized in that: The process of sampling the original training data, inputting the sampled samples into the data trading model, and calculating the Fisher information matrix for each layer includes: randomly sampling the original training dataset to obtain X sampled samples; inputting the X sampled samples into the original data trading model respectively; and calculating the Fisher information matrix for each layer of the model based on the gradient of the loss function of each sampled sample with respect to the model parameters at the model output layer.

6. The feature space backdoor attack method based on parameter constraints of a fused data transaction model as described in claim 5, characterized in that: The L1 norm of the parameter perturbation difference and the parameter difference constraint term based on the Fisher information matrix are added to the loss function. This includes calculating the difference between the backdoor model parameters and the original data transaction model parameters, taking the L1 norm of the difference matrix as a parameter perturbation constraint term, using the Fisher information matrix to perform a weighted calculation on the difference between the backdoor model parameters and the original model parameters to obtain a parameter difference constraint term, and adding the parameter perturbation constraint term and the parameter difference constraint term to the loss function of the backdoor model to form a loss function with dual parameter constraints.

7. The feature space backdoor attack method based on parameter constraints of a fused data transaction model as described in claim 6, characterized in that: The process of training a backdoor model using an attack dataset and a loss function containing parameter constraints includes: initializing the initial parameters of the backdoor model using the parameter values ​​of the original data transaction model; inputting the attack dataset into the backdoor model for forward propagation; calculating the loss value according to the loss function containing dual parameter constraints and backpropagating to update the parameters; and repeating the training until the loss function converges to obtain the trained backdoor model.

8. A feature space backdoor attack system based on parameter constraints of a fused data transaction model, based on the feature space backdoor attack method based on parameter constraints of a fused data transaction model as described in any one of claims 1 to 7, characterized in that: It also includes a filtering module, which is used to obtain the original training dataset and build a data transaction model. Malicious samples in the original training dataset are input into the data transaction model, the loss value of each malicious sample is calculated, and malicious samples with smaller loss values ​​are filtered as target malicious samples. The trigger generation module is used to randomly extract poisoning features from the original training dataset, generate discrete noise values ​​using a noise generator, construct triggers from the discrete noise value sequence, add the triggers to the target malicious sample and flip the label, replace the corresponding malicious sample in the original training dataset, and construct the attack dataset. The computation module is used to sample the original training data, input the sampled data into the data trading model, and calculate the Fisher information matrix for each layer. The backdoor model training module is used to initialize the backdoor model using the parameters of the original data transaction model, add the L1 norm of the parameter perturbation difference and the parameter difference constraint term based on the Fisher information matrix to the loss function, and train the backdoor model using the attack dataset and the loss function containing the parameter constraint term.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the feature space backdoor attack method based on the parameter constraints of the fused data transaction model as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the feature space backdoor attack method based on the parameter constraints of the fused data transaction model as described in any one of claims 1 to 7.