A method and system for generating three-dimensional mesh adversarial samples based on vertex perturbation
Through the method based on vertex perturbation, the back-propagation gradient direction of the neural network is used to iteratively modify the vertex coordinates of the three-dimensional grid, which solves the problem of the complex and computationally expensive generation process of the three-dimensional grid adversarial sample, and achieves efficient, visually natural adversarial sample generation. , improve operational feasibility and evaluate the safety of three-dimensional visual perception applications.
Patent Information
- Application Number
- CN202210770905.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-30
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2042-06-30
AI Technical Summary
In the existing technology, the generation process of three-dimensional grid adversarial samples is complex, the computational overhead is large, and the practical feasibility is low. It is difficult to directly generate adversarial samples that can mislead the neural network and are visually natural.
Using a method based on vertex perturbation, the back-propagation gradient direction of the neural network is used to iteratively modify the coordinates of the three-dimensional grid vertices until the maximum value of the coordinate perturbation is reached, and the coordinate values are sheared after each iteration to ensure that the updated vertex coordinates are located in the initial value range, thereby generating visually natural adversarial samples that can mislead the neural network.
By directly generating 3D mesh adversarial samples, the use of indirect renderers is avoided, the generation efficiency is significantly improved, and the operational feasibility is greatly improved by controlling the number of vertex perturbations, which can effectively attack neural networks and evaluate the performance of 3D visual perception applications. Security.
Smart Images

Figure CN115115033B
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer vision and artificial intelligence, and specifically relates to the design, classification and adversarial sample generation technology of three-dimensional grids. Background Art
[0002] The shapes around us, especially those describing natural entities, are usually three-dimensional geometric data. Among the various approximation methods of three-dimensional shapes, a basic mesh is the polygon mesh, which approximates a continuous surface with a set of polygons and provides a balanced approximation effect.
[0003] Deep learning technology is considered a promising method for data analysis. However, recent studies have shown that deep learning networks are vulnerable to carefully designed input samples, so-called adversarial examples. Adversarial examples are created by adding small, imperceptible but malicious perturbations to the original input, which will cause the attacked network to output incorrect results.
[0004] Considering the popularity and potential uses of 3D data, especially 3D meshes, in many valuable engineering applications, as well as the vulnerability of neural networks to adversarial sample attacks, it is very necessary to study adversarial attacks on 3D data, which also provides a premise and foundation for the robustness research of 3D data neural networks. In recent years, the work on 3D mesh adversarial attacks has been done with the help of differentiable renderers to complete the 2D / 3D conversion. This indirect method will inevitably increase the computational overhead. Therefore, proposing a direct and feasible method for generating 3D mesh adversarial samples is not only of great significance in the academic field, but also has practical significance in the engineering field. Summary of the invention
[0005] The purpose of the present invention is to solve the problems of complex process, high computational overhead and low practical feasibility in the process of generating three-dimensional mesh adversarial samples. To this end, the present invention provides a three-dimensional mesh adversarial sample generation scheme based on vertex perturbation.
[0006] In order to achieve the above objective, the present invention proposes a method for generating three-dimensional mesh adversarial samples based on vertex perturbation, which utilizes the back-propagation gradient direction of the three-dimensional mesh vertices by a neural network to iteratively modify the coordinates of a specified number of vertices with the maximum gradient until the maximum value of the coordinate perturbation reaches an upper limit; at the same time, the coordinate value is clipped after each iteration to ensure that the updated item point coordinates are within the value range of the initial vertex, thereby generating adversarial samples that can mislead the neural network and are visually natural.
[0007] Moreover, the implementation process includes the following steps,
[0008] Step S1, let Where t represents the current iteration number, represents the 3D grid adversarial sample of the tth iteration, represents the three-dimensional grid adversarial sample when t=0, and M represents the initial three-dimensional grid; represents the vertex set of the three-dimensional mesh adversarial sample at the t-th iteration, represents the vertex set of the three-dimensional mesh adversarial sample when t=0, V represents the vertex set of the initial three-dimensional mesh; ΔV represents the upper limit of the number of vertices allowed to be perturbed, ∈ represents the upper limit of the position perturbation of a single vertex, and T represents the total number of iterations;
[0009] Step S2: The adversarial sample and its corresponding vertex Input the source neural network to generate adversarial results, and use the gradient back propagation mechanism of the neural network to obtain the gradient of each vertex
[0010] Step S3, defining a mask vector mask corresponding to the vertex number and initializing it to a zero vector;
[0011] Step S4: set the upper limit of the number of vertex disturbances in this iteration to Sort the vertices in descending order of gradient value and select the one with the largest gradient. Vertex, update the corresponding value of the vertex in the mask vector mask to 1;
[0012] Step S5, using the current vertex coordinates and vertex gradient And the vertex mask vector updates the vertex coordinates of the next iterative adversarial sample The rules for optimizing vertices are as follows:
[0013]
[0014] Where α is the step size of vertex position optimization, sign(·) is the sign function, ⊙ is the element-wise product;
[0015] Step S6: Update the vertex coordinates
[0016] Step S7, the number of iterations t increases once. If the current number of iterations t is less than the total number of iterations T, and the number of vertex disturbances is less than the upper limit ΔV, jump to step S2, otherwise the iteration ends and the output is Composed of The perturbed three-dimensional mesh vertices are obtained, and these vertices with adversarial information form adversarial samples according to the same topological structure as the original three-dimensional mesh.
[0017] Furthermore, the step S2 includes the following sub-steps:
[0018] Step S21, determine the source neural network F to generate the adversarial θ ;
[0019] Step S22, initial edge feature calculation coding;
[0020] Step S23, the initial edge features of the three-dimensional mesh adversarial sample are input into the source neural network for generative adversarial classification and recognition tasks. The neural network will Calculate the loss value with the category label y
[0021] Step S24, obtaining the reverse gradient of the neural network loss value to the vertex, is implemented as follows:
[0022]
[0023] Furthermore, the step S4 includes the following sub-steps:
[0024] Step S41, set the upper limit of the number of vertex disturbances in this iteration to
[0025] Step S42, sorting all vertices from large to small according to the gradient value;
[0026] Step S43, select the one with the largest gradient vertices;
[0027] Step S44: the gradient with the largest value The mask value corresponding to each vertex is set to 1.
[0028] Furthermore, the step S6 includes the following sub-steps:
[0029] The updated vertex coordinates Clip to the neighborhood of the initial vertex coordinate V∈, ensuring The specific method is as follows:
[0030]
[0031] Where V and Represents the vertex XYZ coordinates of the initial sample vertex set and the adversarial sample vertex set.
[0032] Moreover, it is used to evaluate the security of 3D visual perception-based application systems through generated adversarial samples.
[0033] The present invention further provides a three-dimensional mesh adversarial sample generation system based on vertex perturbation, which is used to implement the three-dimensional mesh adversarial sample generation method based on vertex perturbation as described above.
[0034] Moreover, it includes a processor and a memory, the memory is used to store program instructions, and the processor is used to call the stored instructions in the memory to execute the three-dimensional mesh adversarial sample generation method based on vertex perturbation as described above.
[0035] Alternatively, it includes a readable storage medium having a computer program stored thereon, and when the computer program is executed, the method for generating three-dimensional mesh adversarial samples based on vertex perturbation as described above is implemented.
[0036] The present invention directly generates three-dimensional mesh adversarial samples without the help of indirect preprocessing methods such as rendering. The beneficial effects are: by using reverse gradient information to search for the optimal vertex position and avoiding intermediate links, the efficiency of generating three-dimensional mesh adversarial samples is greatly improved; in addition, the method proposed in the present invention can control the number of vertex perturbations, greatly improving the operational feasibility. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 is a flow chart according to an embodiment of the present invention. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention is further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings. It should be understood that these descriptions are only exemplary and are not intended to limit the scope of the present invention. In addition, in the following description, the description of well-known structures and technologies is omitted to avoid unnecessary confusion of the concept of the present invention.
[0039] The present invention proposes a method for generating three-dimensional mesh adversarial samples based on vertex perturbation, that is, using the back-propagation gradient direction of the mesh vertices by the neural network, the coordinates of the specified number of maximum gradient vertices are iteratively modified at a fixed step size until the maximum value of the coordinate perturbation reaches an upper limit. At the same time, the coordinate value is clipped after each iteration to ensure that the updated item point coordinates are within the value range of the initial vertex, thereby generating adversarial samples that can mislead the neural network and are visually natural.
[0040] In addition, the method proposed in the present invention does not require the use of an indirect renderer, and can control the number of vertex perturbations in actual engineering design and applications. Therefore, the method can avoid the projection and approximation errors of the three-dimensional mesh to the two-dimensional image, and can reduce the computational overhead. The vertex perturbation-based method proposed in the present invention can be used to explore the adversarial attack tasks of three-dimensional meshes, and the generated three-dimensional mesh can significantly and effectively attack the neural network of the classification task, and has a good black box migration capability, which will be beneficial to the design of large-scale three-dimensional geometry and the realization of a new generation of artificial intelligence models.
[0041] Figure 1is a flow chart of a method for generating a three-dimensional mesh adversarial sample based on vertex perturbation according to an embodiment of the present invention. Figure 1 Some specific implementation processes of the present invention are described by taking examples.
[0042] like Figure 1 As shown, a method for generating a three-dimensional mesh adversarial sample based on vertex perturbation provided by an embodiment includes the following steps:
[0043] Step S1, let t=0. Where t represents the current iteration number, represents the 3D grid adversarial sample of the tth iteration, represents the three-dimensional grid adversarial sample when t=0, and M represents the initial three-dimensional grid; represents the vertex set of the three-dimensional mesh adversarial sample at the t-th iteration, represents the vertex set of the three-dimensional mesh adversarial sample when t = 0, V = {v1,v2,v3,...,v n ,} represents the initial vertex set of a three-dimensional mesh consisting of n vertices, and each vertex v i In fact, it is composed of XYZ three-dimensional position coordinates, that is, v i =(x i ,y i ,z i ). ΔV represents the upper limit of the number of vertices allowed to be disturbed, ∈ represents the upper limit of the position disturbance of a single vertex, and T represents the total number of iterations;
[0044] Step S2: The adversarial sample and its corresponding vertex Input the source neural network to generate adversarial results, and use the gradient back propagation mechanism of the neural network to obtain the gradient of each vertex
[0045] Optionally, step S2 includes the following steps:
[0046] Step S21, determine the source neural network F to generate the adversarial θ The neural network used to generate adversarial samples is required to be a white box, that is, the model architecture, parameter θ and other information of the neural network are available. In this embodiment, the neural network preferably uses MeshCNN, and its network structure is as follows:
[0047] The core structure of the MeshCNN network consists of a Mesh convolution layer and a Mesh pooling layer. In the classification task, the network follows the pattern of multiple "Mesh convolution + Mesh pooling layer", and finally performs a simple global average pooling and accesses two fully connected layers, which will not be described in detail in this invention.
[0048] Step S22, initial edge feature calculation coding, this part of the implementation in the embodiment uses the initial coding provided by MeshCNN, and the present invention will not go into details.
[0049] Step S23, the initial edge features of the three-dimensional mesh adversarial sample are input into the MeshCNN neural network for classification and recognition tasks. The neural network will Calculate the loss value with the category label y The loss function of MeshCNN is the cross entropy loss function:
[0050]
[0051] Where N is the number of categories, p jc is the predicted probability that the prediction result of the neural network for the jth adversarial grid belongs to category c, y jc is a symbolic function that takes the value 1 if the true category label y=c of sample j, and takes the value 0 otherwise.
[0052] Step S24, obtaining the reverse gradient of the neural network loss value to the vertex, the specific method is as follows:
[0053]
[0054] Step S3, define a mask vector mask corresponding to the vertex label and initialize it to a zero vector:
[0055] mask=(0,0,0,...,0)
[0056] Step S4: set the upper limit of the number of vertex disturbances in this iteration to Sort the vertices in descending order of gradient value and select the one with the largest gradient. Vertex, update the corresponding value of the vertex in the mask vector mask to 1;
[0057] Optionally, step S4 includes the following steps:
[0058] Step S41, set the upper limit of the number of vertex disturbances in this iteration to
[0059] Step S42, sorting all vertices from large to small according to the gradient value;
[0060] Step S43, select the one with the largest gradient vertices, that is, each iteration only perturbs vertices;
[0061] Step S44: The mask vector with the largest gradient in the mask is The value corresponding to the vertex is changed to 1, and the values corresponding to the other vertices remain unchanged at 0. For example, the mask vector mask is modified as follows:
[0062] mask=(0,1,1,...,0)
[0063] Step S5, using the current (t-th iteration) vertex coordinates and vertex gradient And the vertex mask vector mask updates the vertex coordinates of the next (t+1th) iterative adversarial sample The rules for optimizing vertices are as follows:
[0064]
[0065] Among them, α is the step size of vertex position optimization, sign(·) is the sign function, and ⊙ is the element-wise product.
[0066] Step S6: Update the vertex coordinates Clip to the neighborhood of the initial vertex coordinate V∈, ensuring The specific method is as follows:
[0067]
[0068] Among them, V and Represents the vertex XYZ coordinates of the initial sample vertex set and the adversarial sample vertex set.
[0069] Step S7: the number of iterations t increases by one.
[0070] If the current number of iterations t is less than the total number of iterations T, and the number of vertex perturbations is less than the upper limit ΔV, jump to step S2, otherwise the algorithm ends and the output is Composition
[0071] Optionally, the output object at the end of the iteration in step S7 is:
[0072] The three-dimensional mesh adversarial entity generated by the present invention can be used to evaluate the security of three-dimensional visual perception application systems (such as face recognition, gesture recognition, and object recognition) deployed in reality, which is beneficial to enhancing the reliability of neural networks and further improving the cognitive ability of neural networks through iterative research on attack and defense.
[0073] The three-dimensional mesh adversarial entity generated by the present invention is input into the recognition system. If the recognition system makes an error and the error rate is higher, it means that the system is more vulnerable to attack and has a lower reliability.
[0074] In addition, the method proposed in the present invention avoids intermediate links on the one hand, greatly improving the efficiency of generating three-dimensional mesh adversarial samples, and on the other hand, can control the number of vertex perturbations, greatly improving the operational feasibility.
[0075] In specific implementation, the method proposed in the technical solution of the present invention can be implemented by technical personnel in this field using computer software technology to realize automatic operation process. System devices for implementing the method, such as computer-readable storage media storing the corresponding computer program of the technical solution of the present invention and computer equipment running the corresponding computer program, should also be within the scope of protection of the present invention.
[0076] In some possible embodiments, a three-dimensional mesh adversarial sample generation system based on vertex perturbation is provided, including a processor and a memory, the memory being used to store program instructions, and the processor being used to call the stored instructions in the memory to execute a three-dimensional mesh adversarial sample generation method based on vertex perturbation as described above.
[0077] In some possible embodiments, a three-dimensional mesh adversarial sample generation system based on vertex perturbation is provided, including a readable storage medium, on which a computer program is stored. When the computer program is executed, a three-dimensional mesh adversarial sample generation method based on vertex perturbation as described above is implemented.
[0078] It should be understood that the above specific embodiments of the present invention are only used to illustrate or explain the principles of the present invention, and do not constitute a limitation of the present invention. Therefore, any modifications, equivalent substitutions, improvements, etc. made without departing from the spirit and scope of the present invention should be included in the protection scope of the present invention. In addition, the appended claims of the present invention are intended to cover all changes and modifications that fall within the scope and boundaries of the appended claims, or the equivalent forms of such scope and boundaries.
Claims
1. A method for generating three-dimensional mesh adversarial samples based on vertex perturbation, characterized by: Using the back-propagation gradient direction of the neural network to the vertices of the three-dimensional mesh, the coordinates of the specified number of vertices with the maximum gradient are iteratively modified until the maximum value of the coordinate perturbation reaches the upper limit; at the same time, the coordinate value is clipped after each iteration to ensure that the updated item point coordinates are within the value range of the initial vertex, thereby generating adversarial samples that can mislead the neural network and are visually natural, which is used to evaluate the security of the three-dimensional visual perception application system through the generated adversarial samples; The adversarial sample implementation process includes the following steps: Step S1, let t=0, where t represents the current iteration number, represents the 3D grid adversarial sample of the tth iteration, represents the three-dimensional grid adversarial sample when t=0, and M represents the initial three-dimensional grid; represents the vertex set of the three-dimensional mesh adversarial sample at the t-th iteration, represents the vertex set of the three-dimensional mesh adversarial sample when t=0, V represents the vertex set of the initial three-dimensional mesh; ΔV represents the upper limit of the number of vertices allowed to be perturbed, ∈ represents the upper limit of the position perturbation of a single vertex, and T represents the total number of iterations; Step S2: The adversarial sample and its corresponding vertex Input the source neural network to generate adversarial results, and use the gradient back propagation mechanism of the neural network to obtain the gradient of each vertex Step S3, defining a mask vector mask corresponding to the vertex number and initializing it to a zero vector; Step S4: set the upper limit of the number of vertex disturbances in this iteration to Sort the vertices in descending order of gradient value and select the one with the largest gradient. Vertex, update the corresponding value of the vertex in the mask vector mask to 1; Step S5, using the current vertex coordinates and vertex gradient And the vertex mask vector updates the vertex coordinates of the next iterative adversarial sample The rules for optimizing vertices are as follows: Where α is the step size of vertex position optimization, sign(·) is the sign function, ⊙ is the element-wise product; Step S6: Update the vertex coordinates Clip to the neighborhood of the initial vertex coordinate V∈, ensuring Step S7, the number of iterations t increases once. If the current number of iterations t is less than the total number of iterations T, and the number of vertex disturbances is less than the upper limit ΔV, jump to step S2, otherwise the iteration ends and the output is Composition The perturbed three-dimensional mesh vertices are obtained, and these vertices with adversarial information form adversarial samples according to the same topological structure as the original three-dimensional mesh.
2. The method for generating three-dimensional mesh adversarial samples based on vertex perturbation according to claim 1, characterized in that: The step S2 includes the following sub-steps: Step S21, determine the source neural network F to generate the adversarial θ ; Step S22, initial edge feature calculation coding; Step S23, the initial edge features of the three-dimensional mesh adversarial sample are input into the source neural network for generative adversarial classification and recognition tasks. The neural network will Calculate the loss value with the category label y Step S24, obtaining the reverse gradient of the neural network loss value to the vertex, is implemented as follows:
3. The method for generating three-dimensional mesh adversarial samples based on vertex perturbation according to claim 2, characterized in that: The step S4 includes the following sub-steps: Step S41, set the upper limit of the number of vertex disturbances in this iteration to Step S42, sorting all vertices from large to small according to the gradient value; Step S43, select the one with the largest gradient vertices; Step S44: the gradient with the largest value The mask value corresponding to each vertex is set to 1.
4. The method for generating three-dimensional mesh adversarial samples based on vertex perturbation according to claim 2, characterized in that: The step S6 includes the following sub-steps: The updated vertex coordinates Clip to the neighborhood of the initial vertex coordinate V∈, ensuring The specific method is as follows: Where V and Represents the vertex XYZ coordinates of the initial sample vertex set and the adversarial sample vertex set.
5. A three-dimensional mesh adversarial sample generation system based on vertex perturbation, characterized by: Used to implement a three-dimensional mesh adversarial sample generation method based on vertex perturbation as described in any one of claims 1-4.
6. The three-dimensional mesh adversarial sample generation system based on vertex perturbation according to claim 5, characterized in that: It includes a processor and a memory, the memory is used to store program instructions, and the processor is used to call the stored instructions in the memory to execute a three-dimensional mesh adversarial sample generation method based on vertex perturbation as described in any one of claims 1-4.
7. The three-dimensional mesh adversarial sample generation system based on vertex perturbation according to claim 5, characterized in that: It includes a readable storage medium, on which a computer program is stored. When the computer program is executed, a three-dimensional mesh adversarial sample generation method based on vertex perturbation as described in any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Confrontation sample generation method based on belief attack and salient region disturbance limitation
CN114399630A
3D object reconstruction using photometric mesh representation
US10769848B1
Quantifying Vulnerabilities of Deep Learning Computing Systems to Adversarial Perturbations
US20200285952A1
