3D point cloud confrontation attack method and device based on data multi-scale features and medium
By extracting multi-scale features of 3D point clouds and using autoencoders for reconstruction, the problems of poor transferability and low concealment of adversarial point clouds in the existing technology are solved, and a more robust and applicable 3D point cloud classification model is achieved.
Patent Information
- Application Number
- CN202410532871.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-30
- Publication Date
- 2024-08-23
AI Technical Summary
Existing adversarial attack methods for 3D point cloud classification models overly rely on the network structure of the proxy model, resulting in poor migration of adversarial point clouds between different models. Moreover, traditional methods ignore the inherent characteristics of point cloud data and reduce the risk of adversarial attacks. Sample concealment and robustness.
By extracting multi-scale features from the feature space of point cloud data, using autoencoders for point cloud reconstruction, calculating feature loss and reconstruction loss, generating adversarial point clouds that can be effectively transferred between different models, reducing the need for specific model network structures dependence.
It improves the transferability and robustness of adversarial point clouds, enhances the concealment of adversarial samples, and improves the security and applicability of 3D point cloud classification models.
Smart Images

Figure CN118537624A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of 3D point cloud classification model optimization for autonomous driving systems, and in particular to a 3D point cloud counterattack method, device and medium based on multi-scale features of data. Background Art
[0002] 3D point cloud classification is a key task in autonomous driving systems, which aims to identify and classify various objects in the surrounding environment, such as other vehicles, pedestrians, road signs, trees, etc., from point cloud data. This is crucial for autonomous vehicles to correctly understand their surroundings and make safe driving decisions. In recent years, with the rapid development of deep learning technology, 3D point cloud classification tasks based on deep neural networks (DNNs) have made significant breakthroughs and demonstrated excellent performance in safety-sensitive fields such as autonomous driving.
[0003] However, numerous studies have shown that DNNs are vulnerable to adversarial examples, which mislead DNNs to make incorrect predictions by adding imperceptible perturbations to the input data. Adversarial examples are transferable across models, that is, adversarial examples generated for a specific model will also have an adverse effect on other models. The existence of such adversarial examples poses a significant safety challenge to decision-critical applications such as autonomous driving. Therefore, in-depth research on transfer-based adversarial attacks in 3D point cloud classification is crucial to improving the safety of autonomous driving and other 3D technology applications.
[0004] Existing adversarial attack methods can be roughly divided into two categories: white-box attack and black-box attack. White-box attack has a detailed understanding of the internal structure and parameters of the proxy model, so it can achieve satisfactory performance when attacking the proxy model. Black-box attack mainly adopts a transfer-based attack strategy, that is, generating adversarial point clouds for the proxy model, and then using these adversarial point clouds to attack other target models.
[0005] However, the adversarial point clouds generated by these attack strategies tend to be overly dependent on the specific network structure of the proxy model, and their attack performance is significantly reduced when attacking other models different from the proxy model, that is, the adversarial point clouds do not transfer well between different networks.
[0006] Traditional adversarial attack methods, whether targeting white-box or black-box models, generally adopt the strategy of directly deforming and optimizing point cloud data, with the goal of generating adversarial point clouds that can mislead deep learning models. This strategy ignores the intrinsic characteristics of point cloud data, and as a result, the distance between the original point cloud and the adversarial point cloud is often indiscriminately enlarged, which not only increases the cost of perturbation but also reduces the concealment of adversarial samples. In addition, simple data-level attacks often make the generated adversarial point clouds overly dependent on the network structure of a specific model, limiting the transferability of the adversarial point clouds.
[0007] To solve the above problems, the present invention provides a point cloud adversarial attack method for promoting the research of robust 3D point cloud classification models. The method starts from the feature space of point cloud data, extracts multi-scale features of point cloud data, and introduces a reconstruction mechanism. The mechanism can effectively reconstruct the point cloud based on the multi-scale features, thereby alleviating the excessive dependence of the adversarial point cloud on the network structure of the proxy model and improving the transferability of the adversarial point cloud. Summary of the invention
[0008] The purpose of the present invention is to provide a 3D point cloud adversarial attack method, device and medium based on multi-scale features of data, and to provide a point cloud adversarial attack method to promote the research of robust 3D point cloud classification models.
[0009] Embodiments of the present invention provide a 3D point cloud anti-attack method, device and medium based on multi-scale features of data.
[0010] Aspect 1: A 3D point cloud adversarial attack method based on multi-scale features of data, comprising:
[0011] S1. Extracting intermediate features from the original point cloud during the classification process of the point cloud by the 3D point cloud classification model;
[0012] S2. Build an autoencoder, use the autoencoder to extract multi-scale features of different dimensions, complete the point cloud reconstruction, and obtain the reconstructed point cloud;
[0013] S3, calculating feature loss based on the extracted multi-scale features and the extracted intermediate features;
[0014] S4. Calculate the reconstruction loss based on the original point cloud and the reconstructed point cloud;
[0015] S5. Calculate the adversarial loss based on the category labels corresponding to the original point cloud and the reconstructed point cloud;
[0016] S6. Calculate the total loss function value between the original point cloud and the reconstructed point cloud based on feature loss, reconstruction loss and adversarial loss, and use the total loss function value to jointly optimize the autoencoder.
[0017] Optionally, the autoencoder comprises an encoder part and a decoder part, the encoder is composed of three set abstraction layers, including:
[0018] The first set abstraction layer adopts the multi-scale grouping (MSG) strategy, with the number of center points being 512. After being processed by this layer, the location information of the sampling points is obtained as l1_xyz, and the multi-scale features are obtained as l1_feature;
[0019] The second set abstraction layer adopts the multi-scale grouping (MSG) strategy, with the number of center points being 128. After being processed by this layer, the location information of the sampling points is obtained as l2_xyz, and the multi-scale features are obtained as l2_feature;
[0020] The third level set abstraction layer has 1024 center points and 512+3 input channels. After being processed by this layer, the location information of the sampling points is obtained as l3_xyz, and the global feature is obtained as l3_feature.
[0021] The decoder consists of three feature propagation layers including:
[0022] The first-level feature propagation layer has an input channel of 1536 and an MLP configuration of [512, 256]. After being processed by this layer, the upsampled point cloud data l1_points is obtained:
[0023] l1_points=FP1(l2_xyz,l3_xyz,l2_feature,l3_feature) (1)
[0025] The second-level feature propagation layer has an input channel of 512 and an MLP configuration of [256,128]. After being processed by this layer, the upsampled point cloud data l2_points is obtained:
[0026] l2_points=FP2(l1_xyz,l2_xyz,l1_feature,l1_points) (2)
[0028] The third-level feature propagation layer has an input channel of 128 and an MLP configuration of [64,32]. After being processed by this layer, the upsampled point cloud data l3_points is obtained:
[0029] l3_points=FP3(xyz,l1_xyz,None,l2_points) (3)
[0031] Among them, xyz is the location information of the input point cloud.
[0032] Optionally, the feature loss is calculated in S3, comprising the steps of:
[0033] S31. Use Shapley value to obtain the original point cloud 512 and 256 dimensional key feature set FC 512_pos , FC 256_pos and non-critical feature set FC 512_neg , FC 256_neg ;
[0034] S32. Use the autoencoder to extract the multi-scale feature set FA of point cloud data 512 and FA 256 ;
[0035] S33. Calculate the multi-scale feature set FA 512 and FA 256 With the key feature set FC 512_pos , FC 256_pos The key feature loss between is:
[0036] L pos (FA 512 ,FC 512_pos )=-||D(FA 512 )-D(FC 512_pos )|| 2 (4)
[0038] L pos (FA 256 ,FC 256_pos )=-||D(FA 256 )-D(FC 256_pos )|| 2 (5)
[0040] L pos =L pos (FA 512 ,FC 512pos )+L pos (FA 256 ,FC 256_pos ) (6)
[0042] Where D(x) is expressed as D(x)=sign(x)⊙abs(x) α , 0≤α≤1 is the normalization parameter;
[0043] L pos (FA 512 ,FC 512_pos )
[0044] is the multi-scale feature set FA 512 With the key feature set FC 512_pos The key feature loss between pos (FA 256 ,FC 256_pos ) is the multi-scale feature set FA 256 With the key feature set FC 256_pos The key feature loss between
[0045] S34. Calculate the multi-scale feature set FA512 and FA 256 With non-critical feature set FC 512_neg , FC 256_neg The non-critical feature loss between is:
[0046] L neg (FA 512 ,FC 512_neg )=‖D(FA 512 )-D(FC 512_neg )|| 2 (7)
[0048] L neg (FA 256 ,FC 256_neg )=‖D(FA 256 )-D(FC 256_neg )|| 2 (8)
[0050] L neg =L neg (FA 512 ,FC 512_neg )+L neg (FA 256 ,FC 256_neg ) (9)
[0052] Where D(x) is expressed as D(x)=sign(x)⊙abs(x) α , 0≤α≤1 is the normalization parameter; L neg (FA 512 ,FC 512_neg ) is the multi-scale feature set FA 512 With non-critical feature set FC 512_neg Non-critical feature loss between neg (FA 256 ,FC 256_neg ) is the multi-scale feature set FA 256 With non-critical feature set FC 256_neg Loss of non-critical features between ;
[0053] S35. Calculate the overall feature loss. The formula is:
[0054] L feature =L pos +L neg (10)
[0056] Among them, L feature is the overall feature loss, L negis the total non-critical feature loss,
[0057] L pos
[0058] is the overall key feature loss.
[0059] Optionally, the Shapley value is used to obtain the original point cloud 512 and the 256-dimensional key feature set FC 512_pos , FC 256_pos and non-critical feature set FC 512_neg , FC 256_neg The process includes:
[0060] S311, dividing the intermediate feature value F of the original point cloud into n regions, calculating the Shapley value of each region to the prediction result, and obtaining the contribution of each feature region according to the Shapley value, the formula is:
[0061]
[0062] Among them, 1≤i≤n, n is the n feature regions divided by the intermediate eigenvalue F, {F1,F2,…,F i ,…,F n}∈F, where F i represents the i-th feature region; N = {1, 2, ..., n} is the set formed by combining n feature regions, S is a subset S∈N of N, and SV(i) is the Shapley value of the i-th feature region;
[0063] S312, calculate the 512 and 256-dimensional intermediate features FC extracted during the original point cloud classification process 512 , FC 256 The Shapley value of
[0064] S313, calculate the average value of the Shapley value of 512 and 256 dimensional features respectively, record the features greater than the average value as key features, and the features less than the average value as non-key features, create a Boolean mask for each set of features, and obtain the key feature set FC 512_pos , FC 256_pos and non-critical feature set FC 512_neg , FC 256_neg .
[0065] Optionally, calculating the reconstruction loss in S4 comprises the steps of:
[0066] S41. Calculate the L2 norm. The formula is:
[0067]
[0068] Among them, x is the original point cloud set, x′ is the adversarial point cloud set; among them, p iis the coordinate of the i-th point in the set x, p′ i are the coordinates of its corresponding point in the set x′.
[0069] S42, using the chamfer distance to calculate the average distance between the closest point pair of point cloud x′ to x, the formula is:
[0070]
[0071] S43. Use Hausdorff distance to measure the square of the maximum Euclidean distance between all the nearest point pairs from the original point cloud x to the adversarial point cloud x′. The formula is:
[0072]
[0073] S44. Calculate reconstruction loss l rec , the formula is:
[0074] l rec (x′,x)=D L2 (x,x′)+D C (x′,x)+D H (x′,x) (15)
[0076] Among them, x is the original point cloud set, and x′ is the adversarial point cloud set.
[0077] Optionally, the adversarial loss is calculated in S5 using the formula:
[0078]
[0079] Among them, y′ is the category label of the classification network for the reconstructed point cloud x′, y is the category label of the original point cloud x, N represents the small batch, and C is the number of categories; p n,c is the probability that sample n in y′ belongs to category c.
[0080] Optionally, the total loss function value is:
[0081] L total =αL cls +βL rec +γL feature (17)
[0083] Among them, α, β, and γ represent the weight coefficients corresponding to each part of the loss respectively.
[0084] A second aspect: An electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method provided in the first aspect when executing the program.
[0085] A third aspect: A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that when the computer program is executed by a processor, the steps of the method provided in the first aspect are implemented.
[0086] Beneficial effects of the present invention:
[0087] 1. This invention adopts a new 3D point cloud classification counterattack method. In the process of reconstructing point cloud generation, the loss function L is minimized. total Real-time optimization of the autoencoder and updating of the parameters of the autoencoder network can effectively reconstruct the point cloud, promote the research on robust 3D point cloud classification models, and provide a basis for improving the robustness of 3D point cloud classification models.
[0088] 2. The method of the present invention introduces the concept of Shapley value in cooperative game theory and calculates the Shapley value of each feature to accurately measure their influence on the model recognition results, so as to accurately locate the key features in the point cloud data and effectively implement the attack.
[0089] 3. To address the problem that the adversarial point cloud generated by the migration-based black-box attack method is overly dependent on the proxy model network structure and has poor transferability, the method of the present invention starts from the feature space of the point cloud data, uses an autoencoder to reconstruct the point cloud, uses the set abstraction layer in PointNet++ to extract the multi-scale features of the point cloud data, and uses an autoencoder combined with the multi-scale features of the point cloud data to reconstruct the point cloud, effectively alleviating the adversarial point cloud's over-dependence on the specific proxy model network structure.
[0090] 4. The method of the present invention designs a dynamic optimization strategy to adjust the parameters of the autoencoder, and optimizes the autoencoder in real time by comprehensively considering the adversarial loss, reconstruction loss and feature loss. It does not require prior training, has the ability to be applied to different data sets, and has a wider applicability. BRIEF DESCRIPTION OF THE DRAWINGS
[0091] Figure 1 A schematic diagram of a flow chart of a 3D point cloud counterattack method based on multi-scale features of data according to the present invention;
[0092] Figure 2 It is a schematic diagram of the structure of the automatic encoder of the present invention;
[0093] Figure 3 Input point cloud and its real category label map for the embodiment of the present invention;
[0094] Figure 4 A classification result diagram of the adversarial point cloud after point cloud reconstruction of the present invention is migrated to different classification networks;
[0095] Figure 5 It is a schematic diagram of the structure of the electronic device of the present invention. DETAILED DESCRIPTION
[0096] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar symbols throughout represent the same or similar elements or elements with the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0097] 3D point cloud classification is a key task in autonomous driving systems, which aims to identify and classify various objects in the surrounding environment from point cloud data, such as other vehicles, pedestrians, road signs, trees, etc. This is crucial for autonomous vehicles to correctly understand their surroundings and make safe driving decisions. Therefore, perfecting and improving the 3D point cloud classification algorithm in autonomous driving systems is crucial for autonomous vehicles to correctly understand their surroundings and make safe driving decisions.
[0098] In view of the above problems, the present invention provides a 3D point cloud anti-attack method based on multi-scale features of data. Figure 1 A schematic diagram of a flow chart of a 3D point cloud counterattack method based on multi-scale features of data provided by an embodiment of the present invention, the method comprising:
[0099] S1. In the process of classifying the point cloud by the 3D point cloud classification model, extracting intermediate features from the original point cloud;
[0100] Extracting intermediate features from the original point cloud, we draw on the concept of Shapley value in game theory and calculate the contribution of the intermediate features extracted from the original point cloud during the classification process to the prediction results of the 3D point cloud classification model for different 3D point cloud classification models, including:
[0101] Using the trained 3D point cloud classification network model, retain the part of the network model structure that takes point cloud as input and intermediate features as output as the network GP(·). At the same time, copy the parameters and network structure after the corresponding intermediate feature layer to create a network GF(·) with intermediate features as input. The method of the present invention can select PointNet, PointNet++, DGCNN or PointConv classifier as the point cloud classification network model.
[0102] The intermediate feature value F of each original point cloud x in the classification process is divided into n feature regions {F1, F2, …, F i ,…,F n}∈F, where F i Represents the i-th feature area; the present invention uses 256-dimensional and 512-dimensional intermediate features extracted from the original point cloud to divide them into 25 areas respectively.
[0103] The set formed by combining n feature regions is defined as N = {1, 2, ..., n}, S is a subset S∈N of N, and after the regional feature set S is sent to the network GF(·), its contribution to the prediction result is calculated, which is recorded as GF(S); the Shapley value of the feature of the i-th feature region on the prediction result can be calculated using the formula:
[0104]
[0105] In the process of calculating the Shapley value, when faced with a large number of feature regions, traditional calculation methods become difficult to apply due to their high time complexity. A strategy based on simple random sampling can be adopted. When evaluating the contribution of each specific feature, a set of other regional features are randomly introduced for calculation. The final contribution score is obtained by iterating the random sampling process multiple times and calculating the average of the obtained Shapley values.
[0106] The Shapley value of each region reflects the importance of the characteristics of the region to the model recognition results. The higher the Shapley value of a feature region, the greater the impact of the region on the model recognition results, and the more vulnerable it is to attack.
[0107] According to formula (11), the 512- and 256-dimensional intermediate features FC extracted during the original point cloud classification process are calculated 512 , FC 256 The Shapley values of the two dimensional features are calculated respectively, and the features greater than the average are recorded as key features, and the features less than the average are recorded as non-key features. By creating a Boolean mask for each set of features, the key feature set FC is finally obtained. 512_pos , FC 256_pos and non-critical feature set FC 512_neg , FC 256_neg .
[0108] S2. Build an auto-encoder, use the auto-encoder to extract multi-scale features of different dimensions, and reconstruct the point cloud based on the extracted multi-scale features to obtain the reconstructed point cloud.
[0109] like Figure 2 As shown in the figure, the SetAbstraction Layer and Feature Propagation Layer in PointNet++ can be used to construct an autoencoder to reconstruct the input point cloud and obtain the reconstructed point cloud. The autoencoder includes an encoder part and a decoder part. The encoder consists of three set abstraction layers, and the decoder consists of three feature propagation layers.
[0110] The input point cloud first passes through the collection abstraction layer, which captures the global and local information of the point cloud by extracting and integrating features of different scales layer by layer. Subsequently, these features are upsampled and refined through the feature propagation layer to restore the structure of the point cloud.
[0111] Encoder part: It can be composed of three set abstraction layers (SA) in PointNet++, which receive the original point cloud data as input. The first two set abstraction layers adopt the multi-scale grouping (MSG) strategy, which extracts local features at multiple scales by searching for neighboring points within different radius ranges, and merges the features generated by multiple scales to form a comprehensive multi-scale feature representation. The last set abstraction layer extracts global features. Finally, through the continuous processing of the three set abstraction layers, the encoding result is generated, and multi-scale features and global features of different dimensions can be obtained. Specifically, these set abstraction layers can be configured for feature extraction through the following parameters:
[0112] The first set abstraction layer adopts the multi-scale grouping (MSG) strategy. The number of center points is 512, the center point area radius list is [0.1, 0.2, 0.4], the maximum number of points in the area list is [16, 32, 128], the input channel is 0, and the multi-layer perceptron list is [[32, 32, 64], [64, 64, 64], [64, 96, 128]]. After processing by this layer, the location information of the sampling point is obtained as l1_xyz, and the multi-scale feature is obtained as l1_feature.
[0113] The second set abstraction layer adopts the multi-scale grouping (MSG) strategy. The number of center points is 128, the center point area radius list is [0.2, 0.4, 0.8], the maximum number of points in the area list is [32, 64, 128], the input channel is 256, and the multi-layer perceptron list is [[64, 64, 128], [64, 96, 128], [128, 128, 256]]. After processing by this layer, the location information of the sampling points is obtained as l2_xyz, and the multi-scale features are obtained as l2_feature.
[0114] The number of points in the third-level set abstraction layer is 1024, the input channels are 512+3, and the multi-layer perceptron list is [256, 512, 1024]. After processing by this layer, the location information of the sampling points is obtained as l3_xyz, and the global features are obtained as l3_feature.
[0115] The decoder part can be composed of three feature propagation layers, which realize the effective propagation of features based on distance interpolation and cross-level jump connections. The goal of the decoder is to effectively transfer the encoding results and multi-scale feature information obtained in the encoding stage back to a denser point set to achieve high-quality reconstruction of the original point cloud. By continuously applying feature propagation layers, the decoder gradually increases the density of the reconstructed point cloud while maintaining the integrity of the structure and feature information of the point cloud. Finally, a reconstructed point cloud that is as similar as possible to the original point cloud data is generated. Specifically, these feature propagation layers are configured as follows:
[0116] The input channel of the first-level feature propagation layer is 1536, and the MLP configuration is [512, 256]. After processing by this layer, the upsampled point cloud data l1_points is obtained:
[0117] l1_points=FP1(l2_xyz,l3_xyz,l2_feature,l3_feature) (1)
[0119] The input channel of the second-level feature propagation layer is 512, and the MLP configuration is [256,128]. After processing by this layer, the upsampled point cloud data l2_points is obtained:
[0120] l2_points=FP2(l1_xyz,l2_xyz,l1_feature,l1_points) (2)
[0122] The input channel of the third-level feature propagation layer is 128, and the MLP configuration is [64,32]. After processing by this layer, the upsampled point cloud data l3_points is obtained:
[0123] l3_points=FP3(xyz,l1_xyz,None,l2_points) (3)
[0125] Among them, xyz is the location information of the input point cloud.
[0126] Finally, after linear layer processing, the upsampled point cloud data l3_points is mapped to the same dimensional space as the original point cloud to complete the reconstruction of the point cloud data.
[0127] S3, calculating feature loss based on the extracted multi-scale features and the extracted intermediate features;
[0128] The Shapley value is calculated using formula (1) to obtain the 512- and 256-dimensional key feature sets FC of the original point cloud. 512_pos , FC 256_posand non-critical feature set FC 512_neg , FC 256_neg ;
[0129] Extracting multi-scale features of point cloud data using autoencoders 512 and FA 256 ; Calculate the key feature loss separately
[0130] L pos (FA 512 ,FC 512_pos )=-||D(FA 512 )-D(FC 512_pos )|| 2 (4)
[0132] L pos (FA 256 ,FC 256_pos )=-||D(FA 256 )-D(FC 256_pos )|| 2 (5)
[0134] The key feature loss is calculated as follows:
[0135]
[0136] Among them, L pos (FA 512 ,FC 512_pos ) is the multi-scale feature set FA 512 With the key feature set FC 512_pos The key feature loss between pos (FA 256 ,FC 256_pos ) is the multi-scale feature set FA 256 With the key feature set FC 256_pos The key feature loss between them; D(x) is expressed as D(x) = sign(x)⊙abs(x) α , 0≤α≤1 is the normalization parameter.
[0137] By calculating the key feature loss, multi-scale feature FA is added 512 , FA 256 With the key feature set FC 512_pos , FC 256_pos to magnify the difference between them.
[0138] Calculate the loss of non-critical features separately:
[0139] L neg (FA 512 ,FC512_neg )=||D(FA 512 )-D(FC 512_neg )|| 2 (7)
[0141] L neg (FA 256 ,FC 256_neg )=||D(FA 256 )-D(FC 256_neg )|| 2 (8)
[0143] The non-critical feature loss is calculated as:
[0144] L neg =L neg (FA 512 ,FC 512_neg )+L neg (FA 256 ,FC 256_neg ) (9)
[0146] Among them, L neg (FA 512 ,FC 512_neg ) is the multi-scale feature set FA 512 With non-critical feature set FC 512_neg Non-critical feature loss between neg (FA 256 ,FC 256_neg ) is the multi-scale feature set FA 256 With non-critical feature set FC 256_neg The non-critical feature loss between ; D(x) is expressed as D(x) = sign(x)⊙abs(x) α , D(x) is expressed as D(x)=sign(x)⊙abs(x) α , 0≤α≤1 is the normalization parameter.
[0147] Reduce the multi-scale feature FA by calculating the non-critical feature loss 512 , FA 256 With non-critical feature set FC 512_neg , FC 256_neg to reduce the differences in these features.
[0148] The formula for calculating the overall feature loss is shown in (10):
[0149] L feature =L pos +L neg (10)
[0151] Among them, L neg is the total non-critical feature loss, L pos is the overall key feature loss; L feature is the overall feature loss.
[0152] S4. Calculate the reconstruction loss based on the original point cloud and the reconstructed point cloud;
[0153] According to the adversarial loss of the original point cloud and the reconstructed point cloud, in order to ensure that the reconstructed point cloud X′ is as similar as possible to the original point cloud X, the L2 norm, chamfer distance and Hausdorff distance can be used to constrain the deformation amplitude of the reconstructed point cloud, including:
[0154] First, the L2 norm is used to measure the difference between point clouds. For the original point cloud set x and the corresponding adversarial point cloud set x′, the L2 norm is:
[0155]
[0156] Among them, x is the original point cloud set, x′ is the adversarial point cloud set; p i is the coordinate of the i-th point in the set x, p′ i are the coordinates of its corresponding point in the set x′.
[0157] Secondly, the chamfer distance is used to calculate the average distance between the nearest point pair of point cloud x′ to x, and the formula is:
[0158]
[0159] Finally, the Hausdorff distance is introduced to measure the square of the maximum Euclidean distance between all the closest point pairs of the original point cloud x and its adversarial point cloud x′. Specifically, given these two point clouds x′ and x, the Hausdorff distance formula is:
[0160]
[0161] This distance metric finds the closest point to the original point cloud for each adversarial point and calculates the maximum distance between all these closest point pairs, which is sensitive to outliers. By minimizing the Hausdorff distance, the generation of outliers in the adversarial point cloud can be reduced.
[0162] The reconstruction loss l can be obtained by calculation rec , as shown in formula (15):
[0163] l rec (x′,x)=D L2 (x,x′)+D C (x′,x)+D H (x′,x) (15)
[0165] The reconstruction loss is a measure of the difference between the reconstructed point cloud and the original point cloud. The reconstruction process of the point cloud is optimized by minimizing the reconstruction loss so that the reconstructed point cloud is as close to the original point cloud as possible.
[0166] S5. Calculate the adversarial loss based on the category labels corresponding to the original point cloud and the reconstructed point cloud;
[0167] The adversarial loss is calculated as the cross entropy loss between point clouds, and the formula is:
[0168]
[0169] Among them, y′ is the classification label (Classification Label) of the classification network for the reconstructed point cloud x′, y is the category label (Ground Truth Label) of the input point cloud x, N represents the mini-batch, and C is the number of categories. If the true category of sample n is equal to category c, y n,c Take 1, otherwise take 0; p n,c is the probability that sample n in y′ belongs to category c, which ensures that the classifier misclassifies the reconstructed point cloud.
[0170] Based on, the feature loss L feature , reconstruction loss l rec and adversarial loss l adv The total loss function value is calculated as:
[0171] L total =αL cls +βL rec +γL feature (17)
[0173] Among them, α, β, and γ represent the weight coefficients corresponding to each part of the loss respectively.
[0174] S6. Calculate the total loss function value between the original point cloud and the reconstructed point cloud based on feature loss, reconstruction loss and adversarial loss, and use the total loss function value to jointly optimize the autoencoder.
[0175] In the process of reconstructing point cloud generation, by minimizing the above total loss function L total The autoencoder is optimized in real time and the parameters of the autoencoder network are updated, aiming to obtain an autoencoder that can effectively reconstruct the point cloud and cause the classifier to make misclassifications.
[0176] Figure 3 is the true category label of the original point cloud;
[0177] Figure 4The classification results of three different 3D point cloud classifiers on the adversarial point cloud generated by the 3D point cloud adversarial attack method introduced in the present invention, where red fonts represent incorrectly classified category labels, and the rest are correctly classified.
[0178] The present invention also provides an electronic device, Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention, such as Figure 5 As shown, the electronic device may include: a processor, a communications interface, a memory, and a communications bus, wherein the processor, the communications interface, and the memory communicate with each other via the communications bus. The processor may call the logic instructions in the memory to execute the following method:
[0179] S1. Extracting intermediate features from the original point cloud during the classification process of the point cloud by the 3D point cloud classification model;
[0180] S2. Build an autoencoder, use the autoencoder to extract multi-scale features of different dimensions, complete the point cloud reconstruction, and obtain the reconstructed point cloud;
[0181] S3, calculating feature loss based on the extracted multi-scale features and the extracted intermediate features;
[0182] S4. Calculate the reconstruction loss based on the original point cloud and the reconstructed point cloud;
[0183] S5. Calculate the adversarial loss based on the category labels corresponding to the original point cloud and the reconstructed point cloud;
[0184] S6. Calculate the total loss function value between the original point cloud and the reconstructed point cloud based on feature loss, reconstruction loss and adversarial loss, and use the total loss function value to jointly optimize the autoencoder.
[0185] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be an on-board electronic device, a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0186] An embodiment of the present invention further provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the method provided in each of the above embodiments is implemented, for example, including:
[0187] S1. Extracting intermediate features from the original point cloud during the classification process of the point cloud by the 3D point cloud classification model;
[0188] S2. Build an autoencoder, use the autoencoder to extract multi-scale features of different dimensions, complete the point cloud reconstruction, and obtain the reconstructed point cloud;
[0189] S3, calculating feature loss based on the extracted multi-scale features and the extracted intermediate features;
[0190] S4. Calculate the reconstruction loss based on the original point cloud and the reconstructed point cloud;
[0191] S5. Calculate the adversarial loss based on the category labels corresponding to the original point cloud and the reconstructed point cloud;
[0192] S6. Calculate the total loss function value between the original point cloud and the reconstructed point cloud based on feature loss, reconstruction loss and adversarial loss, and use the total loss function value to jointly optimize the autoencoder.
[0193] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0194] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be an in-vehicle electronic device, a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0195] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A 3D point cloud adversarial attack method based on multi-scale features of data, characterized in that: include: S1. Extracting intermediate features from the original point cloud during the classification process of the point cloud by the 3D point cloud classification model; S2. Build an autoencoder, use the autoencoder to extract multi-scale features of different dimensions, complete the point cloud reconstruction, and obtain the reconstructed point cloud; S3, calculating feature loss based on the extracted multi-scale features and the extracted intermediate features; S4. Calculate the reconstruction loss based on the original point cloud and the reconstructed point cloud; S5. Calculate the adversarial loss based on the category labels corresponding to the original point cloud and the reconstructed point cloud; S6. Calculate the total loss function value between the original point cloud and the reconstructed point cloud based on feature loss, reconstruction loss and adversarial loss, and use the total loss function value to jointly optimize the autoencoder.
2. According to claim 1, a 3D point cloud counterattack method based on multi-scale features of data is characterized in that: The autoencoder includes an encoder part and a decoder part. The encoder consists of three sets of abstract layers, including: The first set abstraction layer adopts the multi-scale grouping (MSG) strategy, with the number of center points being 512. After being processed by this layer, the location information of the sampling points is obtained as l1_xyz, and the multi-scale features are obtained as l1_feature; The second set abstraction layer adopts the multi-scale grouping (MSG) strategy, with the number of center points being 128. After being processed by this layer, the location information of the sampling points is obtained as l2_xyz, and the multi-scale features are obtained as l2_feature; The third level set abstraction layer has 1024 center points and 512+3 input channels. After being processed by this layer, the location information of the sampling points is obtained as l3_xyz, and the global feature is obtained as l3_feature. The decoder consists of three feature propagation layers including: The first-level feature propagation layer has an input channel of 1536 and an MLP configuration of [512, 256]. After being processed by this layer, the upsampled point cloud data l1_points is obtained: l1_points=FP1(l2_xyz,l3_xyz,l2_feature,l3_feature) (1) The second-level feature propagation layer has an input channel of 512 and an MLP configuration of [256,128]. After being processed by this layer, the upsampled point cloud data l2_points is obtained: l2_points=FP2(l1_xyz,l2_xyz,l1_feature,l1_points) (2) The third-level feature propagation layer has an input channel of 128 and an MLP configuration of [64,32]. After being processed by this layer, the upsampled point cloud data l3_points is obtained: l3_points=FP3(xyz,l1_xyz,None,l2_points) (3) Among them, xyz is the location information of the input point cloud.
3. The 3D point cloud counterattack method based on multi-scale features of data according to claim 2 is characterized in that: The feature loss is calculated in S3, including the following steps: S31. Use Shapley value to obtain the original point cloud 512 and 256 dimensional key feature set FC 512_pos , FC 256_pos and non-critical feature set FC 512_neg , FC 256_neg ; S32. Use the autoencoder to extract the multi-scale feature set FA of point cloud data 512 and FA 256 ; S33. Calculate the multi-scale feature set FA 512 and FA 256 With the key feature set FC 512_pos , FC 256_pos The key feature loss between is: L pos (FA 512 ,FC 512_pos )=-||D(FA 512 )-D(FC 512_pos )|| 2 (4) L pos (FA 256 ,FC 256_pos )=-||D(FA 256 )-D(FC 256_pos )|| 2 (5) Where D(x) is expressed as D(x)=sign(x)⊙abs(x) α , 0≤α≤1 is the normalization parameter; L pos (FA 512 ,FC 512_pos ) is the multi-scale feature set FA 512 With the key feature set FC 512_pos The key feature loss between pos (FA 256 ,FC 256_pos ) is the multi-scale feature set FA 256 With the key feature set FC 256_pos The key feature loss between S34. Calculate the multi-scale feature set FA 512 and FA 256 With non-critical feature set FC 512_neg , FC 256_neg The non-critical feature loss between is: L neg (FA 512 ,FC 512_neg )=||D(FA 512 )-D(FC 512_neg )|| 2 (7) L neg (FA 256 ,FC 256_neg )=||D(FA 256 )-D(FC 256_neg )|| 2 (8) L neg =L neg (FA 512 ,FC 512_neg )+L neg (FA 256 ,FC 256_neg (9) Where D(x) is expressed as D(x)=sign(x)⊙abs(x) α , 0≤α≤1 is the normalization parameter; L neg (FA 512 ,FC 512_neg ) is the multi-scale feature set FA 512 With non-critical feature set FC 512_neg Non-critical feature loss between neg (FA 256 ,FC 256_neg ) is the multi-scale feature set FA 256 With non-critical feature set FC 256_neg Loss of non-critical features between ; S35. Calculate the overall feature loss. The formula is: L feature =L pos +L neg (10) Among them, L feature is the overall feature loss, L neg is the total non-critical feature loss, L pos is the overall key feature loss.
4. The 3D point cloud counterattack method based on multi-scale features of data according to claim 3 is characterized in that: The Shapley value is used to obtain the original point cloud 512 and 256 dimensional key feature set FC 512_pos , FC 256_pos and non-critical feature set FC 512_neg , FC 256_neg The process includes: S311, dividing the intermediate feature value F of the original point cloud into n regions, calculating the Shapley value of each region to the prediction result, and obtaining the contribution of each feature region according to the Shapley value, the formula is: Among them, 1≤i≤n, {F1,F2,…,F i ,…,F n }∈F, where F i represents the i-th feature region; N = {1, 2, ..., n} is the set formed by combining n feature regions, S is a subset S∈N of N, and SV(i) is the Shapley value of the i-th feature region; S312, calculate the 512 and 256-dimensional intermediate features FC extracted during the original point cloud classification process 512 , FC 256 The Shapley value of S313, calculate the average value of the Shapley value of 512 and 256 dimensional features respectively, record the features greater than the average value as key features, and the features less than the average value as non-key features, create a Boolean mask for each set of features, and obtain the key feature set FC 512_pos , FC 256_pos and non-critical feature set FC 512_neg , FC 256_neg .
5. The 3D point cloud counterattack method based on multi-scale features of data according to claim 1, characterized in that: The reconstruction loss is calculated in S4, including the steps of: S41. Calculate the L2 norm. The formula is: Among them, x is the original point cloud set, x′ is the adversarial point cloud set; among them, p i is the coordinate of the i-th point in the set x, p′ i is the coordinate of its corresponding point in the set x′; S42. Use the chamfer distance to calculate the average distance between the nearest point pair of point cloud x′ to x. The formula is: S43. Use Hausdorff distance to measure the square of the maximum Euclidean distance between all the nearest point pairs from the original point cloud x to the adversarial point cloud x′. The formula is: S44. Calculate reconstruction loss l rec , the formula is: Among them, x is the original point cloud set, and x′ is the adversarial point cloud set.
6. The 3D point cloud counterattack method based on multi-scale features of data according to claim 1, characterized in that: The adversarial loss is calculated in S5, and the formula is: Among them, y ′ Is the classification network to reconstruct the point cloud x ′ The classified category label, y is the category label of the original point cloud x, N represents the small batch, and C is the number of categories; p n,c Yes ′ The probability that sample n belongs to category c.
7. The 3D point cloud counterattack method based on multi-scale data features according to claim 1, characterized in that: The total loss function value is: L total =αL cls +βL rec +γL feature (17) Where α, β, and γ represent the weight coefficients corresponding to each part of the loss.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of a 3D point cloud counterattack method based on multi-scale features of data are implemented as described in any one of claims 1 to 7.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of a 3D point cloud counterattack method based on multi-scale features of data are implemented as described in any one of claims 1 to 7.
Citation Information
Cited By
Target contour extraction method, device and system based on SCE-Net and storage medium
CN119229181A
Injection mold part feature recognition method based on improved PointNet + +
CN120147811A
