Adversarial sample generation method and system based on semantic migration
By constructing semantic loss functions and optimizing adversarial generation models with large language models, the problem that the adversarial sample generation method in the existing technology does not utilize deep semantic features is solved, and adversarial samples with large differences in semantic features are generated, which improves attack success rate and migration sex.
Patent Information
- Application Number
- CN202411069550.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-05
- Publication Date
- 2024-11-05
AI Technical Summary
The existing adversarial sample generation methods over-rely rely on the gradient information of the classification model and the basic geometric properties of the point cloud, and fail to fully utilize deep semantic features, making it difficult for the generated adversarial samples to achieve high migration and insensibility, and are easily identified and defended.
By obtaining the semantic features of the original sample and the semantic features of the adversarial sample, a semantic loss function is constructed, and the adversarial generation model is optimized using the large language model and the PointCLIP v2 model to keep the adversarial samples away from the original sample in the semantic space, thereby generating small perturbations but differences in semantic features Large confrontational sample.
It significantly improves the attack success rate and migration of adversarial samples, and can more effectively bypass existing defense mechanisms and generate complex adversarial samples that are difficult to detect.
Smart Images

Figure CN118898749A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer vision technology, and in particular to a method and system for generating adversarial samples based on semantic shift. Background Art
[0002] In the field of computer vision, with the development of artificial intelligence networks, neural network models have begun to be widely used in image detection, image recognition, and image classification.
[0003] However, in recent years, there have been frequent incidents of cyber attackers using adversarial samples to attack neural network models. Adversarial samples refer to adding small perturbations to the original samples. The adversarial samples are almost indistinguishable from the original images, but they can mislead the neural network model into making wrong decisions.
[0004] For example, an adversarial sample image is a panda image, and the neural network model classifies it as an orangutan. The attacker modifies the original image so that the naked eye cannot distinguish the adversarial sample from the original image, but the features extracted by the model from the original image are changed, causing the model to make an incorrect classification.
[0005] There are three main types of adversarial attack techniques: optimization-based, gradient-based, and generative model-based.
[0006] Among them, optimization-based attacks modify points in the original sample to induce the model to make high-confidence wrong predictions. This requires that the difference between the adversarial sample and the original sample is as small as possible, while ensuring that the adversarial sample can make the classifier predict the wrong category with as high a probability as possible.
[0007] However, analysis of existing attack and defense methods shows that attackers rely too much on the gradient information of the classification model or the basic geometric properties of the point cloud (such as curvature), but rarely consider the deep semantic features of the point cloud data. This reliance makes the attack method easy to identify and defend in some cases, because the attack does not really understand and utilize the semantic level information of the data. Taking into account the deep semantic features, attackers can design more complex and difficult to detect attack methods, thereby more effectively bypassing existing defense mechanisms. This bias makes it difficult for the generated adversarial samples to achieve high transferability and imperceptibility.
[0008] Therefore, in order to generate adversarial samples with less perturbation, the present application provides an adversarial sample generation method and system based on semantic offset. Summary of the invention
[0009] In order to overcome the problems existing in the related art, the present application provides a method for generating adversarial samples based on semantic shift, comprising the following steps:
[0010] S1. Obtain the original sample;
[0011] S2. Input the original sample into the adversarial generation model to obtain an adversarial sample;
[0012] S3, inputting the original sample into a large language model to obtain a first semantic feature;
[0013] S4, extracting text features from the adversarial sample to obtain a second semantic feature;
[0014] S5, calculating the semantic loss of the first semantic feature and the second semantic feature according to the semantic loss function;
[0015] S6. Optimizing the adversarial generative model according to the semantic loss until training is completed.
[0016] In one implementation, inputting the original sample into a large language model to obtain a first semantic feature specifically includes:
[0017] S301, inputting the original sample into a large language model to obtain a text prompt word;
[0018] S302: Input the text prompt word into a semantic encoder to obtain the first semantic feature.
[0019] In one implementation, extracting text features from the adversarial sample to obtain a second semantic feature specifically includes:
[0020] S401, inputting the adversarial sample into a PointCLIP v2 model; the PointCLIP v2 model is provided with a visual encoder and a text encoder;
[0021] S402: Perform text feature extraction on the adversarial sample according to the text encoder to obtain a second semantic feature.
[0022] In one implementation, calculating the semantic loss of the first semantic feature and the second semantic feature according to the semantic loss function specifically includes:
[0023] S501, constructing a semantic loss function according to the semantic similarity between the first semantic feature and the second semantic feature;
[0024] S502, constructing a classification loss function;
[0025] S503, constructing a morphological loss function;
[0026] S504: Aggregate the semantic loss function, the classification loss function, and the morphological loss function into a total loss function.
[0027] In one embodiment, the classification loss function is:
[0028]
[0029] Among them, C is the classifier, P y is the true label of the point cloud, K is the total number of categories, and P′ is the perturbed point cloud.
[0030] In one embodiment, the morphological loss function includes chamfer distance loss and Hausdorff distance loss;
[0031] The chamfer distance loss function is:
[0032]
[0033] The Hausdorff distance loss function is:
[0034]
[0035] In one embodiment, the semantic loss function is
[0036]
[0037] where f P represents the latent semantic features of the adversarial samples generated by PointCLIP V2, f T represents the features of the text feature description words of the original point cloud generated using GPT, and τ represents the temperature coefficient.
[0038] In one embodiment, the total loss function is
[0039]
[0040] Among them, λ1, λ2, and λ3 are hyperparameters used to adjust the weights between various losses.
[0041] In one implementation, optimizing the adversarial generative model according to the semantic loss until the training is completed specifically includes:
[0042] The adversarial generation model is optimized according to the semantic loss and perturbation optimization formula, and the perturbation optimization formula is:
[0043]
[0044] The conditions of the perturbation optimization formula are:
[0045]
[0046] Among them, c represents a hyperparameter, which is used to measure the optimization target item, ∥δ∥ p represents the perturbation size under the p-norm, Z(X)μ Represents the class score of the μth category of the input original point cloud X, Z(X) y′ represents the category score of the true label category of the input point cloud x, and κ is used to control the threshold of the output score difference to determine whether the attack is successful.
[0047] A second aspect of the present application provides an adversarial sample generation system based on semantic offset, which generates adversarial samples based on the adversarial sample generation method.
[0048] The technical solution provided by this application may have the following beneficial effects:
[0049] The embodiment of the present application obtains the first semantic feature and the second semantic feature of the original sample and the adversarial sample respectively, and then constructs a semantic loss function through the semantic similarity between the two, and finally optimizes the adversarial generation model through the gradient feedback of the semantic loss function. Therefore, the adversarial generation model can use the deep semantic information generated by the large language model to optimize the semantic features of the adversarial sample, making the adversarial sample far away from the semantic space of the original sample, thereby significantly improving the success rate of the adversarial sample in dealing with various classifiers.
[0050] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] The above and other objects, features and advantages of the present application will become more apparent through a more detailed description of exemplary embodiments of the present application in conjunction with the accompanying drawings, wherein the same reference numerals generally represent the same components in the exemplary embodiments of the present application.
[0052] Figure 1 A schematic diagram of the process of generating adversarial samples shown in an embodiment of the present application;
[0053] Figure 2 This is a first example diagram of the adversarial sample generation method shown in an embodiment of the present application;
[0054] Figure 3 A second example diagram of the adversarial sample generation method shown in an embodiment of the present application;
[0055] Figure 4 This is a third example diagram of the adversarial sample generation method shown in an embodiment of the present application. DETAILED DESCRIPTION
[0056] The preferred embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the preferred embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to make the present application more thorough and complete, and to fully convey the scope of the present application to those skilled in the art.
[0057] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0058] It should be understood that although the terms "first", "second", "third", etc. may be used in this application to describe various information, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.
[0059] Embodiment 1
[0060] In the field of computer vision, in order to enhance the adversarial defense capabilities of network models, it is necessary to input sufficient adversarial samples for model training in the pre-training stage.
[0061] In order to obtain enough adversarial samples, it is necessary to generate adversarial samples through adversarial generative models. The visual difference between adversarial samples and original samples needs to be very small, that is, the perturbation is small, in order to interfere with the prediction results of the network model.
[0062] With the development of adversarial defense technology, the attack effect of adversarial samples generated by existing adversarial generation models has become unsatisfactory.
[0063] In order to enhance the anti-attack capability of adversarial samples and thus improve the adversarial defense capability of the model, an embodiment of the present application provides an adversarial sample generation method based on semantic offset, which can generate adversarial samples with small perturbations but large differences in semantic features.
[0064] like Figure 1 As shown, an adversarial sample generation method based on semantic offset provided in an embodiment of the present application includes the following steps:
[0065] S1. Obtain the original sample;
[0066] S2. Input the original sample into the adversarial generation model to obtain an adversarial sample;
[0067] Specifically, the adversarial generative model includes a generator and a classifier; the generator is used to input the original sample and generate the adversarial sample, and the classifier is used to input the adversarial sample and output the adversarial sample category.
[0068] In an embodiment of the present application, the generator adds noise to the original sample to generate the adversarial sample. The classifier classifies the adversarial sample, and the adversarial sample and the original sample are of different categories.
[0069] Furthermore, the embodiment of the present application compares the semantic features between the adversarial sample and the original sample, calculates the semantic loss of the two, and then outputs the adversarial sample with a more distant semantic feature.
[0070] S3, inputting the original sample into a large language model to obtain a first semantic feature;
[0071] Specifically, the text prompt words (ie, prompts) of the original sample are output through the large language model, and the text description is vector-encoded to obtain the first semantic feature.
[0072] In the embodiment of the present application, the large language model can output detailed, rich and accurate text prompt words, so that in the next step, the semantic encoding features of the adversarial sample are extended in the semantic space according to the text prompt words.
[0073] S4, extracting text features from the adversarial sample to obtain a second semantic feature;
[0074] It is understandable that the category feature code can be obtained through a mapping table pre-stored in a computer, or can be obtained through an image classification model or classifier output.
[0075] S5. Calculate the semantic loss of the first semantic feature and the second semantic feature according to a semantic loss function;
[0076] S6. Optimizing the adversarial generative model according to the semantic loss until training is completed.
[0077] In an embodiment of the present application, the semantic similarity between the first semantic feature and the second semantic feature is calculated. If the semantic similarity between the two is smaller, the value of the semantic loss function is smaller; if the semantic similarity is larger, the semantic loss function is passed back to the adversarial generation model through the gradient until the gradient of the semantic loss function drops to a preset threshold.
[0078] The embodiment of the present application obtains the first semantic feature and the second semantic feature of the original sample and the adversarial sample respectively, and then constructs a semantic loss function through the semantic similarity between the two, and finally optimizes the adversarial generation model through the gradient feedback of the semantic loss function. Therefore, the adversarial generation model can use the deep semantic information generated by the large language model to optimize the semantic features of the adversarial sample, making the adversarial sample far away from the semantic space of the original sample, thereby significantly improving the success rate of the adversarial sample in dealing with various classifiers.
[0079] Embodiment 2
[0080] Based on the adversarial sample generation method described in Example 1, the embodiment of the present application provides an adversarial sample generation method for generating three-dimensional point cloud adversarial samples.
[0081] In computer vision, point cloud is a representation of a three-dimensional object. A three-dimensional coordinate system is usually used to discretize the surface of an object into many points and annotate the coordinates of each point. Point cloud data is used in 3D printing and autonomous driving. For example, road data obtained by radar is represented in the form of point cloud, and then a three-dimensional road image is constructed.
[0082] Point cloud adversarial attack is to add tiny perturbations to the point cloud data of certain objects, making it impossible for the classification model to accurately identify the objects.
[0083] Current point cloud adversarial attack methods rely too much on the gradient information of the classification model or the primary geometric features of the point cloud, which makes the generated perturbation points easy to identify, and thus causes the classification model to fail to receive effective adversarial defense training.
[0084] Therefore, in order to obtain a point cloud adversarial sample with better attack effect, the embodiment of the present application provides an adversarial sample generation method based on semantic offset.
[0085] Figure 1 A schematic diagram of the process of generating adversarial samples shown in an embodiment of the present application;
[0086] Figure 2 This is a first example diagram of the adversarial sample generation method shown in an embodiment of the present application;
[0087] like Figure 1 and Figure 2 As shown, the adversarial sample generation method includes the following steps:
[0088] S1. Obtain the original sample;
[0089] In S1, the original sample is original point cloud data.
[0090] S2. Input the original sample into the adversarial generation model to obtain adversarial samples and adversarial sample categories;
[0091] Similar to the first embodiment, the adversarial generation model includes a generator and a classifier. The generator outputs adversarial point cloud data (ie, adversarial samples), and the classifier outputs the adversarial sample category.
[0092] S3, inputting the original sample into a large language model to obtain a first semantic feature;
[0093] like Figure 3 As shown in the example figure, in order to more effectively increase the semantic similarity between the original point cloud data and the adversarial point cloud data, the embodiment of the present application generates text prompts (i.e., prompts) for the original point cloud data through the GPT model.
[0094] In an embodiment of the present application, the GPT model generates a richer and more detailed prompt word description in the semantic space, and enhances the semantic complexity and diversity of adversarial samples by accurately capturing subtle semantic differences in the point cloud.
[0095] Specifically, S3 includes:
[0096] S301, inputting the original sample into a large language model to obtain a text prompt word;
[0097] S302: Input the text prompt word into a semantic encoder to obtain the first semantic feature.
[0098] In the embodiment of the present application, a GPT model is used to obtain text prompt words with more refined, rich and accurate semantics to describe the original point cloud data. The text prompt words are then encoded to obtain a text feature vector representation of the original point cloud data, namely, the first semantic feature.
[0099] S4, extracting text features from the adversarial sample to obtain a second semantic feature;
[0100] Further, such as Figure 4 As shown in the example diagram, S4 specifically includes:
[0101] S401, inputting the adversarial sample into a PointCLIP v2 model; the PointCLIP v2 model is provided with a visual encoder and a text encoder;
[0102] S402: Perform text feature extraction on the adversarial sample according to the text encoder to obtain a second semantic feature.
[0103] Specifically, Figure 4As shown in Figure 1, the PointCLIP v2 model uses a large number of image-text pairs collected from the Internet during training. These datasets contain hundreds of millions of pairs of images and related text descriptions. Therefore, the PointCLIP v2 model can obtain the text feature vector representation of the adversarial sample, that is, the second semantic feature.
[0104] S5, calculating the semantic loss of the first semantic feature and the second semantic feature according to the semantic loss function;
[0105] Furthermore, S5 includes:
[0106] S501, constructing a semantic loss function according to the semantic similarity between the first semantic feature and the second semantic feature;
[0107] S502, constructing a classification loss function;
[0108] S503, constructing a morphological loss function;
[0109] S504: Aggregate the semantic loss function, the classification loss function, and the morphological loss function into a total loss function.
[0110] In an embodiment of the present application, in order to optimize the adversarial generation model, the embodiment of the present application calculates the semantic distance, morphological distance and classification loss between the adversarial sample and the original sample.
[0111] Specifically, the classification loss function is:
[0112]
[0113] Among them, C is the classifier, P y is the true label of the point cloud, K is the total number of categories, and P′ is the perturbed point cloud.
[0114] Specifically, the morphological loss function includes chamfer distance loss and Hausdorff distance loss.
[0115] In the embodiment of the present application, X represents the original sample, Y represents the adversarial sample, x represents a point on the original sample, and y represents a point on the adversarial sample.
[0116] Furthermore, the chamfer distance loss function is constructed as:
[0117]
[0118] In the embodiments of the present application, Represents the distance from any point on the adversarial point cloud to the nearest point on the original point cloud. Represents the distance from any point on the original point cloud to the nearest point on the adversarial point cloud. Further, the Hausdorff distance loss function is constructed as:
[0119]
[0120] In the embodiments of the present application, represents the maximum distance between any point x on the original sample and the closest point y to the adversarial sample. Represents the maximum distance between any point y on the adversarial sample and the nearest point x to the adversarial sample.
[0121] It can be understood that in the Hausdorff distance algorithm, sup represents the supremum and inf represents the infimum. In the embodiment of the present application, the chamfer distance and Hausdorff distance are used to limit the deformation degree of the adversarial point cloud, ensuring that the basic geometric characteristics are maintained during disturbance, so that the adversarial sample is almost visually indistinguishable from the original sample and difficult to detect. These two losses control the deformation of the point cloud coordinates of the adversarial sample from the perspective of mathematical sets.
[0122] In order to measure the changes in the potential semantics between adversarial samples and original samples, the semantic comparison results are used as the loss function.
[0123] Specifically, the semantic loss function is:
[0124]
[0125] Among them, f P Indicates the second semantic feature; f T represents the first semantic feature; τ represents the temperature coefficient; i represents the index of the point cloud in the original space, and j represents all possible indexes of the point cloud in the target space.
[0126] The total loss function is:
[0127]
[0128] Among them, λ1, λ2, and λ3 are hyperparameters used to adjust the weights between various losses.
[0129] S6. Optimizing the adversarial generative model according to the semantic loss until training is completed.
[0130] Furthermore, the adversarial generation model is optimized according to the semantic loss and perturbation optimization formula.
[0131] Specifically, the perturbation optimization formula is:
[0132]
[0133] The conditions of the perturbation optimization formula are:
[0134]
[0135] Among them, c represents a hyperparameter, which is used to measure the optimization target item, ∥δ∥ p represents the perturbation size under the p-norm, Z(X) i Represents the category score of the classifier for the i-th category of the input original point cloud X, Z(X) y′ represents the category score of the true label category of the input point cloud x, and κ is used to control the threshold of the output score difference to determine whether the attack is successful.
[0136] In the embodiment of the present application, in the adversarial attack scenario, Gaussian noise is continuously optimized to generate adversarial samples (i.e., adversarial point cloud data) with high transferability and low perceptibility. The adversarial samples of the embodiment of the present application use chamfer distance and Hausdorff distance to limit the deformation degree of the adversarial point cloud data, and at the same time, significantly distance the semantic information of the adversarial point cloud data, causing the classifier to make mistakes.
[0137] The adversarial attack sample generation method of the embodiment of the present application performs well in different scenarios and defense mechanisms, has high practicality and robustness, and can adaptively find the optimal disturbance position with the minimum semantic similarity, thereby achieving the optimal migration attack effect.
[0138] Embodiment 3
[0139] A semantic shift-based adversarial sample generation system generates adversarial samples based on the adversarial sample generation methods described in Embodiment 1 and Embodiment 2.
[0140] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated again here.
[0141] The scheme of the present application has been described in detail above with reference to the accompanying drawings. In the above embodiments, the description of each embodiment has its own emphasis. For the part that is not described in detail in a certain embodiment, refer to the relevant description of other embodiments. Those skilled in the art should also know that the actions and modules involved in the description are not necessarily required for the present application. In addition, it can be understood that the steps in the method of the embodiment of the present application can be adjusted in order, merged and deleted according to actual needs, and the modules in the device of the embodiment of the present application can be merged, divided and deleted according to actual needs.
[0142] In addition, the method according to the present application may also be implemented as a computer program or a computer program product, which includes computer program code instructions for executing some or all of the steps in the above method of the present application.
[0143] Alternatively, the present application can also be implemented as a non-temporary machine-readable storage medium (or computer-readable storage medium, or machine-readable storage medium) on which executable code (or computer program, or computer instruction code) is stored. When the executable code (or computer program, or computer instruction code) is executed by a processor of an electronic device (or electronic device, server, etc.), the processor executes part or all of the steps of the above-mentioned method according to the present application.
[0144] Those skilled in the art will further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the application herein may be implemented as electronic hardware, computer software, or combinations of both.
[0145] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system and method according to multiple embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a part of a module, a program segment or a code, and the part of the module, the program segment or the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or the flow chart, and the combination of the square boxes in the block diagram and / or the flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0146] The embodiments of the present application have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A method for generating adversarial samples based on semantic shift, characterized in that: The following steps are involved: S1. Obtain the original sample; S2. Input the original sample into the adversarial generation model to obtain an adversarial sample; S3, inputting the original sample into a large language model to obtain a first semantic feature; S4, extracting text features from the adversarial sample to obtain a second semantic feature; S5, calculating the semantic loss of the first semantic feature and the second semantic feature according to the semantic loss function; S6. Optimizing the adversarial generative model according to the semantic loss until training is completed.
2. According to the method for generating adversarial samples based on semantic shift in claim 1, it is characterized in that: Inputting the original sample into the large language model to obtain the first semantic feature specifically includes: S301, inputting the original sample into a large language model to obtain a text prompt word; S302: Input the text prompt word into a semantic encoder to obtain the first semantic feature.
3. The method for generating adversarial samples based on semantic shift according to claim 1, characterized in that: The extracting text features of the adversarial sample to obtain a second semantic feature specifically includes: S401, inputting the adversarial sample into a PointCLIP v2 model; the PointCLIP v2 model is provided with a visual encoder and a text encoder; S402: Perform text feature extraction on the adversarial sample according to the text encoder to obtain a second semantic feature.
4. The method for generating adversarial samples based on semantic shift according to claim 1, characterized in that: The calculating the semantic loss of the first semantic feature and the second semantic feature according to the semantic loss function specifically includes: S501, constructing a semantic loss function according to the semantic similarity between the first semantic feature and the second semantic feature; S502, constructing a classification loss function; S503, constructing a morphological loss function; S504: Aggregate the semantic loss function, the classification loss function, and the morphological loss function into a total loss function.
5. The method for generating adversarial samples based on semantic shift according to claim 4, characterized in that: The classification loss function is: Among them, C is the classifier, P y is the true label of the point cloud, K is the total number of categories, and P′ is the perturbed point cloud.
6. The method for generating adversarial samples based on semantic shift according to claim 5, characterized in that: The morphological loss function includes chamfer distance loss and Hausdorff distance loss; The chamfer distance loss function is: in, Represents the distance from any point on the adversarial point cloud to the nearest point on the original point cloud; Represents the distance from any point on the original point cloud to the nearest point on the adversarial point cloud; The Hausdorff distance loss function is: in, Represents the maximum distance between any point x on the original sample and the closest point y to the adversarial sample; Represents the maximum distance between any point y on the adversarial sample and the nearest point x to the adversarial sample.
7. The method for generating adversarial samples based on semantic shift according to claim 6, characterized in that: The semantic loss function is where f P represents the latent semantic features of the adversarial samples generated by PointCLIP V2, f T represents the features of the text feature description words of the original point cloud generated by GPT, τ represents the temperature coefficient, i represents the index of the point cloud in the original space, and j represents all possible indexes of the point cloud in the target space.
8. The method for generating adversarial samples based on semantic shift according to claim 7, characterized in that: The total loss function is L=L adv (X,Y)+λ1L CD (X,Y)+λ2L HD (X,Y)+λ3L P2T (X,Y) In the formula, λ1, λ2, and λ3 are hyperparameters used to adjust the weights between various losses.
9. The method for generating adversarial samples based on semantic shift according to claim 1, characterized in that: Optimizing the adversarial generative model according to the semantic loss until the training is completed specifically includes: The adversarial generation model is optimized according to the semantic loss and perturbation optimization formula, and the perturbation optimization formula is: The conditions of the perturbation optimization formula are: Among them, c represents a hyperparameter, which is used to measure the optimization target item, ||δ|| p represents the perturbation size under the p-norm, Z(X) i Represents the category score of the classifier for the i-th category of the input original point cloud X, Z(X) y′ represents the category score of the true label category of the input point cloud x, and κ is used to control the threshold of the output score difference to determine whether the attack is successful.
10. A system for generating adversarial samples based on semantic shift, characterized in that: Adversarial sample generation is performed based on the adversarial sample generation method described in any one of claims 1 to 9.
Citation Information
Cited By
Image confrontation sample detection method based on sample semantic difference
CN120976655A
Multi-modal semantic alignment method for emergency scene
CN120996191A
