Adversarial sample detection method, device, computer equipment and storage medium

Through the heterogeneous fusion network structure, including convolutional neural network, attack information extraction network and detection network, we can identify and judge whether the image data is an adversarial sample, solve the problem of convolutional neural network adversarial sample attack in the field of autonomous driving, and improve the image quality Accuracy of recognition classification.

CN114648678BActive Publication Date: 2024-09-13TSINGHUA UNIVERSITY
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202210317095.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-29
Publication Date
2024-09-13
Estimated Expiration
2042-03-29

AI Technical Summary

Technical Problem

Convolutional neural networks in the field of autonomous driving are vulnerable to adversarial sample attacks, resulting in low image recognition classification accuracy and inability to effectively shield or identify adversarial samples.

Method used

Using a heterogeneous fusion network structure, including convolutional neural network, attack information extraction network and attack information detection network, image feature data is extracted through convolution layer and pooling layer, dimensionality reduction and information fusion are used to determine whether the image data is an adversarial sample. The dissimilarity threshold determines its nature.

Benefits of technology

It improves the accuracy of image recognition and classification in the field of autonomous driving, detects and identifies adversarial samples in real time, and enhances the system's ability to resist attacks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114648678B
    Figure CN114648678B
Patent Text Reader

Abstract

The present application relates to an adversarial sample detection method, device, computer equipment and storage medium. The method includes: obtaining current image data and a heterogeneous fusion network structure; the current image data is image data of the environment around the autonomous driving vehicle, and the heterogeneous fusion network structure includes a convolutional neural network, an attack information extraction network, and an attack information detection network; the current image data is input into the convolutional neural network to obtain image feature data output by each pooling layer contained in the convolutional neural network; the image feature data of each pooling layer is input into the attack information extraction network to obtain fused attack information; according to the fused attack information and the attack information detection network, the feature information corresponding to the fused attack information is determined, and when the difference between the fused attack information and the feature information is greater than the difference threshold, the current image data is determined to be an adversarial sample. The use of this method can improve the efficiency of image recognition and classification in the field of autonomous driving.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information security technology, and in particular to an adversarial sample detection method, apparatus, computer equipment and storage medium. Background Art

[0002] With the development of autonomous driving technology, convolutional neural networks are widely used in the field of autonomous driving to solve image recognition and classification tasks of roads and environments. However, convolutional neural networks are vulnerable to adversarial samples. Adversarial sample attack technology uses the gradient information of the convolutional neural network classifier to add small perturbation information to the input sample to form an adversarial sample, which causes the convolutional neural network to produce incorrect classification results when classifying images.

[0003] The image recognition and classification tasks in the field of autonomous driving are different from traditional image recognition and classification. Traditional image recognition technology only recognizes and classifies current image data through convolutional neural networks. Since convolutional neural networks cannot shield or identify adversarial samples, the accuracy of image recognition and classification in the field of autonomous driving is low. Summary of the invention

[0004] Based on this, it is necessary to provide an adversarial sample detection method, apparatus, computer equipment, computer-readable storage medium and computer program product to address the above-mentioned technical problems.

[0005] In a first aspect, the present application provides a method for detecting adversarial samples. The method comprises:

[0006] Acquire current image data and a heterogeneous fusion network structure; the current image data is image data of the environment surrounding the autonomous driving vehicle, and the heterogeneous fusion network structure includes a convolutional neural network, an attack information extraction network, and an attack information detection network;

[0007] Input the current image data into the convolutional neural network to obtain image feature data output by each pooling layer included in the convolutional neural network;

[0008] Inputting the image feature data of each pooling layer into the attack information extraction network to obtain fused attack information;

[0009] According to the fused attack information and the attack information detection network, feature information corresponding to the fused attack information is determined, and when a difference between the fused attack information and the feature information is greater than a difference threshold, the current image data is determined to be an adversarial sample.

[0010] Optionally, the convolutional neural network includes a convolutional layer; inputting the current image data into the convolutional neural network to obtain image feature data output by each pooling layer included in the convolutional neural network includes:

[0011] Through the convolution layer, a convolution operation is performed on the current image data to obtain each convolution image feature data;

[0012] Through the pooling layer, a pooling operation is performed on each of the convolution image data to obtain image feature data of each pooling layer corresponding to the current image data.

[0013] Optionally, the attack information extraction network includes a dimension reduction layer and an information fusion network; the step of inputting the image feature data of each pooling layer into the attack information extraction network to obtain fused attack information includes:

[0014] For the image feature data of each pooling layer, the image feature data of the pooling layer is input into the dimension reduction layer corresponding to the pooling layer, and a dimension reduction extraction operation is performed to obtain the attack information of the dimension reduction layer corresponding to the image feature data; the dimension reduction layer and the pooling layer correspond one to one;

[0015] The attack information of each dimensionality reduction layer is spliced ​​through the information fusion network to obtain fused attack information.

[0016] Optionally, the attack information detection network includes a coding layer, a decoding layer, and a judgment layer; determining feature information corresponding to the fused attack information according to the fused attack information and the attack information detection network, and determining that the current image data is an adversarial sample when the difference between the fused attack information and the feature information is greater than a difference threshold, includes:

[0017] Inputting the fused attack information into the encoding layer to obtain low-dimensional manifold information of the fused attack information;

[0018] Through the decoding layer, the low-dimensional manifold information is mapped to the original high-dimensional space to obtain feature information corresponding to the fused attack information; the original high-dimensional space is the high-dimensional space where the fused attack information is located;

[0019] Through the judgment layer, it is judged whether the difference between the fused attack information and the feature information is greater than the difference threshold. If the difference between the fused attack information and the feature information is greater than the difference threshold, it is determined that the current image data is an adversarial sample.

[0020] Optionally, the method further includes:

[0021] Obtaining regular sample image data, adversarial sample image data and an initial heterogeneous fusion network structure; the regular sample image data is non-adversarial sample image data;

[0022] Inputting the conventional sample image data into the initial heterogeneous fusion network structure, training the initial heterogeneous fusion network structure, and obtaining the heterogeneous fusion network structure;

[0023] Inputting the adversarial sample image data and the conventional sample image data into the convolutional neural network respectively, to obtain adversarial image feature data of each pooling layer corresponding to the adversarial sample image data and conventional image feature data of each pooling layer corresponding to the conventional sample image data;

[0024] Inputting each of the adversarial image feature data and each of the conventional image feature data into the attack information extraction network respectively to obtain adversarial fusion attack information and conventional fusion attack information;

[0025] Determine, according to the adversarial fusion attack information, the conventional fusion attack information, and the attack information detection network, adversarial feature information corresponding to the adversarial fusion attack information and conventional feature information corresponding to the conventional fusion attack information;

[0026] A difference threshold is determined according to the difference between the adversarial fusion attack information and the adversarial feature information, and the difference between the conventional fusion attack information and the conventional feature information.

[0027] Optionally, after determining the difference threshold, the method further includes:

[0028] Input each of the adversarial image feature data and each of the sample image feature data into the dimension reduction layer of the attack information extraction network, respectively, to obtain adversarial attack information of the dimension reduction layer corresponding to each of the adversarial image feature data and attack information of the dimension reduction layer corresponding to each of the sample image feature data; the dimension reduction layer includes one adversarial attack information and one sample attack information;

[0029] In each of the dimensionality reduction layers, a dimensionality reduction layer in which the difference between the adversarial attack information and the sample attack information in the same dimensionality reduction layer is greater than a preset difference is selected as a target dimensionality reduction layer;

[0030] According to each of the target dimensionality reduction layers, each of the target pooling layers is determined, and based on each of the target pooling layers, the heterogeneous fusion network structure is optimized to obtain an optimized heterogeneous fusion network structure.

[0031] In a second aspect, the present application also provides an adversarial sample detection device. The device comprises:

[0032] A first acquisition module is used to acquire current image data and a heterogeneous fusion network structure; the current image data is image data of the surrounding environment of the autonomous driving vehicle, and the heterogeneous fusion network structure includes a convolutional neural network, an attack information extraction network, and an attack information detection network;

[0033] A first convolution module is used to input the current image data into the convolutional neural network to obtain image feature data output by each pooling layer included in the convolutional neural network;

[0034] A first extraction module, used for inputting the image feature data of each pooling layer into the attack information extraction network to obtain fused attack information;

[0035] The first determination module is used to determine the feature information corresponding to the fused attack information according to the fused attack information and the attack information detection network, and determine that the current image data is an adversarial sample when the difference between the fused attack information and the feature information is greater than a difference threshold.

[0036] Optionally, the convolutional neural network includes a convolutional layer; and the first convolutional module is specifically used to:

[0037] Through the convolution layer, a convolution operation is performed on the current image data to obtain each convolution image feature data;

[0038] Through the pooling layer, a pooling operation is performed on each of the convolution image data to obtain image feature data of each pooling layer corresponding to the current image data.

[0039] Optionally, the attack information extraction network includes a dimension reduction layer and an information fusion network; the first extraction module is specifically used to:

[0040] For the image feature data of each pooling layer, the image feature data of the pooling layer is input into the dimension reduction layer corresponding to the pooling layer, and a dimension reduction extraction operation is performed to obtain the attack information of the dimension reduction layer corresponding to the image feature data; the dimension reduction layer and the pooling layer correspond one to one;

[0041] The attack information of each dimensionality reduction layer is spliced ​​through the information fusion network to obtain fused attack information.

[0042] Optionally, the attack information detection network includes a coding layer, a decoding layer and a judgment layer; the first determination module is specifically used to:

[0043] Inputting the fused attack information into the encoding layer to obtain low-dimensional manifold information of the fused attack information;

[0044] Through the decoding layer, the low-dimensional manifold information is mapped to the original high-dimensional space to obtain feature information corresponding to the fused attack information; the original high-dimensional space is the high-dimensional space where the fused attack information is located;

[0045] Through the judgment layer, it is judged whether the difference between the fused attack information and the feature information is greater than the difference threshold. If the difference between the fused attack information and the feature information is greater than the difference threshold, it is determined that the current image data is an adversarial sample.

[0046] Optionally, the device further comprises:

[0047] A second acquisition module is used to acquire regular sample image data, adversarial sample image data and an initial heterogeneous fusion network structure; the regular sample image data is non-adversarial sample image data;

[0048] A training module, used for inputting the conventional sample image data into the initial heterogeneous fusion network structure, training the initial heterogeneous fusion network structure, and obtaining the heterogeneous fusion network structure;

[0049] A second convolution module is used to input the adversarial sample image data and the conventional sample image data into the convolutional neural network respectively, to obtain adversarial image feature data of each pooling layer corresponding to the adversarial sample image data and conventional image feature data of each pooling layer corresponding to the conventional sample image data;

[0050] A second extraction module is used to input each of the adversarial image feature data and each of the conventional image feature data into the attack information extraction network to obtain adversarial fusion attack information and conventional fusion attack information;

[0051] A second determination module is used to determine adversarial feature information corresponding to the adversarial fusion attack information and conventional feature information corresponding to the conventional fusion attack information according to the adversarial fusion attack information, the conventional fusion attack information, and the attack information detection network;

[0052] The third determination module is used to determine a difference threshold according to the difference between the adversarial fusion attack information and the adversarial feature information, and the difference between the conventional fusion attack information and the conventional feature information.

[0053] Optionally, the device further comprises:

[0054] A dimension reduction module, used to input each of the adversarial image feature data and each of the sample image feature data into the dimension reduction layer of the attack information extraction network, respectively, to obtain adversarial attack information of the dimension reduction layer corresponding to each of the adversarial image feature data and attack information of the dimension reduction layer corresponding to each of the sample image feature data; the dimension reduction layer includes one adversarial attack information and one sample attack information;

[0055] A selection module is used to select, from among the dimensionality reduction layers, a dimensionality reduction layer in which the difference between the adversarial attack information and the sample attack information in the same dimensionality reduction layer is greater than a preset difference, as a target dimensionality reduction layer;

[0056] The optimization module is used to determine each target pooling layer according to each target dimensionality reduction layer, and optimize the heterogeneous fusion network structure based on each target pooling layer to obtain an optimized heterogeneous fusion network structure.

[0057] In a third aspect, the present application provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of any one of the methods in the first aspect are implemented.

[0058] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of any one of the methods in the first aspect are implemented.

[0059] In a fifth aspect, the present application provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the steps of any one of the methods in the first aspect are implemented.

[0060] The above-mentioned adversarial sample detection method, device, computer equipment and storage medium obtain current image data and a heterogeneous fusion network structure; the current image data is image data of the environment around the autonomous driving vehicle, and the heterogeneous fusion network structure includes a convolutional neural network, an attack information extraction network, and an attack information detection network; the current image data is input into the convolutional neural network to obtain image feature data output by each pooling layer contained in the convolutional neural network; the image feature data of each pooling layer is input into the attack information extraction network to obtain fused attack information; according to the fused attack information and the attack information detection network, the feature information corresponding to the fused attack information is determined, and when the difference between the fused attack information and the feature information is greater than the difference threshold, the current image data is determined to be an adversarial sample. Through the attack information extraction network, the attack information detection network, and the convolutional neural network, a heterogeneous fusion network structure is constructed, and through the heterogeneous fusion network structure, the current image data is detected in real time to determine whether the current image data is an adversarial sample, thereby improving the accuracy of image recognition and classification in the field of autonomous driving. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] Figure 1 Schematic diagram of a process of detecting adversarial samples in one embodiment;

[0062] Figure 2 A flowchart of the steps of obtaining fused attack information in one embodiment;

[0063] Figure 3 A schematic diagram of a process for determining whether current image data is an adversarial sample in one embodiment;

[0064] Figure 4 A schematic diagram of a flow chart of a training method for a heterogeneous fusion network in another embodiment;

[0065] Figure 5 A schematic diagram of a process of detecting an adversarial sample in another embodiment;

[0066] Figure 6 A schematic diagram of a flow chart of a training and optimization example of a heterogeneous fusion network in another embodiment;

[0067] Figure 7 is a structural block diagram of an adversarial sample detection device in an embodiment;

[0068] Figure 8 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0069] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0070] The adversarial sample detection method provided in the embodiment of the present application can be applied to a terminal, a server, or a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. The terminal may include, but is not limited to, various personal computers, laptops, tablet computers, etc. The terminal is used to construct a heterogeneous fusion network structure through an attack information extraction network, an attack information detection network, and a convolutional neural network, and detect the current image data in real time through the heterogeneous fusion network structure to determine whether the current image data is an adversarial sample, thereby improving the accuracy of image recognition classification in the field of autonomous driving.

[0071] In one embodiment, Figure 1 As shown, a method for detecting adversarial samples is provided, and the method is applied to a terminal as an example for explanation, including the following steps:

[0072] Step S101, obtaining current image data and heterogeneous fusion network structure.

[0073] Among them, the current image data is the image data of the environment around the autonomous driving vehicle, and the heterogeneous fusion network structure includes a convolutional neural network, an attack information extraction network, and an attack information detection network.

[0074] In this embodiment, the terminal obtains image data of the surrounding environment of the autonomous driving vehicle in real time from the image sensor set at the edge of the autonomous driving vehicle, uses the real-time acquired image data as current image data, and obtains a trained heterogeneous fusion network structure. The heterogeneous fusion network structure includes a convolutional neural network, an attack information extraction network, and an attack information detection network. The number of image sensors can be, but is not limited to, one.

[0075] The convolutional neural network includes an input layer, a convolution layer and a pooling layer. The convolutional neural network is used to perform convolution and pooling processing on the current image data, and output image feature data of each pooling layer that can be processed by the attack information extraction network.

[0076] The attack information extraction network includes an information dimension reduction extraction algorithm and an information fusion network. The information dimension reduction extraction algorithm may be, but is not limited to, a principal component analysis method (Principal Component Analysis), which may perform dimension reduction and attack information extraction operations on the acquired image feature data of each pooling layer to obtain single-layer attack information. The attack information is low-dimensional image feature data that can represent the image feature data of the pooling layer. The information fusion network may be, but is not limited to, a linear neural network based on traditional information fusion, which may concatenate and fuse the image feature data of each pooling layer to obtain fused attack information.

[0077] The attack information detection network includes a coding layer, a decoding layer and a judgment layer. The attack information gradient network detects and judges the fused attack information extracted by the attack information extraction network, thereby determining whether the current image data corresponding to the fused attack information is an adversarial sample.

[0078] Step S102: input the current image data into a convolutional neural network to obtain image feature data output by each pooling layer included in the convolutional neural network.

[0079] In this embodiment, the terminal inputs the current image data into a convolutional neural network of a heterogeneous fusion network structure, and performs convolution and pooling processing on the image data, thereby obtaining image feature data of each pooling layer corresponding to the current image data.

[0080] The convolutional neural network with heterogeneous fusion network structure is different from the traditional convolutional neural network. The convolutional neural network with heterogeneous fusion network structure does not contain an output layer. The terminal obtains the image feature data of each pooling layer through the convolutional neural network with heterogeneous fusion network structure. Specifically, the terminal performs pooling processing on the image feature data after each convolution through the neuron model (McCulloch-Pitts, MPN) for each pooling layer to obtain the intermediate data of each pooling layer, and uses the intermediate data as the image feature data. MPN is a binary logic model that combines and weights the input data and outputs it.

[0081] Step S103: input the image feature data of each pooling layer into the attack information extraction network to obtain fused attack information.

[0082] In this embodiment, the terminal inputs the image feature data of each pooling layer into the attack information extraction network of the heterogeneous fusion network structure. The attack information extraction network receives the image feature data of each pooling layer and performs dimension reduction, extraction, and fusion operations to obtain the fused attack information corresponding to the image feature data of each pooling layer. The specific acquisition of the fused attack information will be described in detail later.

[0083] Step S104, determining feature information corresponding to the fused attack information according to the fused attack information and the attack information detection network, and determining that the current image data is an adversarial sample when the difference between the fused attack information and the feature information is greater than a difference threshold.

[0084] In this embodiment, the terminal first reduces the dimension of the fused attack information through the attack information detection network, and then increases the dimension to obtain the feature information corresponding to the fused attack information, and determines whether the difference between the fused attack information and the feature information corresponding to the fused attack information is greater than the difference threshold. The terminal determines whether the current image data corresponding to the fused attack information is an adversarial sample based on the judgment structure. The difference can be, but is not limited to, the Euclidean distance. The distance expression of the Euclidean distance between the fused attack information and the feature information corresponding to the fused attack information is:

[0085]

[0086] Among them, x is the fusion attack information in the m-dimensional space, x p = g(f(x)) is the feature information obtained after the coding layer and the decoding layer, x(i) and x p (i) refers to x and x p The i-th component in (i).

[0087] Based on the above scheme, a low-power heterogeneous fusion network structure is constructed through a low-power attack information extraction network and a low-power attack information detection network. The low-power heterogeneous fusion network structure is used to detect the current image data in real time to determine whether the current image data is an adversarial sample, thereby improving the efficiency of image recognition and classification in the field of autonomous driving.

[0088] Optionally, the convolutional neural network includes a convolutional layer; accordingly, the current image data is input into the convolutional neural network to obtain image feature data output by each pooling layer included in the convolutional neural network, including: performing a convolution operation on the current image data through the convolutional layer to obtain each convolution image feature data; performing a pooling operation on each convolution image data through the pooling layer to obtain image feature data of each pooling layer corresponding to the current image data.

[0089] In this embodiment, the terminal receives the current image data acquired by the image sensor of the autonomous driving vehicle through the input layer of the convolutional neural network, and performs a convolution operation on the current image data through multiple convolution kernels of the convolution layer to obtain each convolution image feature data, and finally performs a pooling operation on each convolution image feature data through the pooling layer to obtain the image feature data of each pooling layer corresponding to the current image data. The number of pooling layers is not fixed and can be increased or decreased according to the needs of actual applications.

[0090] Based on the above scheme, a heterogeneous fusion network structure is constructed through an attack information extraction network, an attack information detection network, and a convolutional neural network. Through the heterogeneous fusion network structure, the current image data is detected in real time to determine whether the current image data is an adversarial sample, thereby improving the accuracy of image recognition and classification in the field of autonomous driving.

[0091] Optionally, the attack information extraction network includes a dimensionality reduction layer and an information fusion network; accordingly, Figure 2 As shown, the image feature data of each pooling layer is input into the attack information extraction network to obtain fused attack information, including:

[0092] Step S201, for the image feature data of each pooling layer, the image feature data of the pooling layer is input into the dimensionality reduction layer corresponding to the pooling layer, and a dimensionality reduction extraction operation is performed to obtain attack information of the dimensionality reduction layer corresponding to the image feature data.

[0093] Among them, the dimension reduction layer and the pooling layer correspond one to one.

[0094] In this embodiment, the terminal determines a dimensionality reduction layer corresponding to each pooling layer, and the dimensionality reduction layer includes an information dimensionality reduction extraction algorithm. For each pooling layer, the terminal performs dimensionality reduction and extraction operations on the image feature data of the pooling layer through the information dimensionality reduction extraction algorithm of the dimensionality reduction layer corresponding to the pooling layer, and obtains the attack information corresponding to the image feature data of each dimensionality reduction layer. The number of dimensionality reduction layers is the same as the number of pooling layers, and the dimensionality reduction layers correspond to the pooling layers one by one, and can be added or deleted according to the needs of actual applications. The information dimensionality reduction extraction algorithm can be, but is not limited to, a principal component analysis method (Principal Component Analysis, PCA). The attack information is represented as a single low-dimensional vector.

[0095] Step S202, through the information fusion network, the attack information of each dimensionality reduction layer is spliced ​​to obtain fused attack information.

[0096] In this embodiment, the terminal sequentially receives the attack information corresponding to the image feature data output by each dimensionality reduction layer, and concatenates and merges each attack information in the order of the dimensionality reduction layer to obtain a multidimensional vector composed of each attack information. The terminal performs a fusion operation on the multidimensional vector composed of each attack information through an information fusion network to generate a fused attack information. The fused attack information is a high-dimensional vector, and the information fusion network is a traditional fusion neural network, which can be composed of a simple linear neural network.

[0097] Based on the above scheme, the image feature data of each pooling layer is reduced in dimension, extracted, and fused through the attack information extraction network to obtain a fused attack information, thereby providing input for the subsequent processing of the attack information detection network.

[0098] Optionally, the attack information detection network includes a coding layer, a decoding layer and a judgment layer; accordingly, Figure 3 As shown, according to the fused attack information and the attack information detection network, feature information corresponding to the fused attack information is determined, and when the difference between the fused attack information and the feature information is greater than a difference threshold, the current image data is determined to be an adversarial sample, including:

[0099] Step S301, inputting the fused attack information into the encoding layer to obtain low-dimensional manifold information of the fused attack information.

[0100] In this embodiment, the terminal performs a dimensionality reduction mapping operation on the fused attack information through the coding layer of the attack information detection network, and maps the vector of the high-dimensional space where the fused attack information is located to the low-dimensional space through the coding function to obtain the low-dimensional manifold information of the fused attack information. The coding function for mapping the fused attack information to the low-dimensional space is:

[0101]

[0102] Where, f:R m →R n (m>n) is the encoding function, which is used to transform the sample from the m-dimensional space R m Mapping to n-dimensional space R n In the figure, D is the training data set composed of normal samples, x i ,x j are two training samples randomly selected from the dataset D; E is the expected symbol, Represents any pair of training samples x in D i ,x j Find the mathematical expectation of the expression in brackets; d(x,y)=||xy|| 2 is the difference between the two vectors (i.e., the difference).

[0103] Step S302, projecting the low-dimensional manifold information to the original high-dimensional space through the decoding layer to obtain feature information corresponding to the fused attack information; the original high-dimensional space is the high-dimensional space where the fused attack information is located.

[0104] In this embodiment, the terminal performs a projection operation on the low-dimensional manifold information of the fused attack information through the decoding layer of the attack information detection network, and restores the low-dimensional manifold information to the high-dimensional space containing the fused attack information through the decoding mapping function to obtain feature information corresponding to the fused attack information. The function for restoring the low-dimensional manifold information to the high-dimensional space is:

[0105]

[0106] Among them, g:R n →R m(m>n) is the decoding layer function, which is used to transform the sample from the n-dimensional space R n Restore to m-dimensional space R m In the figure, D is the training data set composed of normal samples, x i is a training sample randomly selected from the data set; E is the expected symbol, For any training sample x in D i Find the mathematical expectation of the expression in parentheses; f(x) is the encoding function.

[0107] Step S303, through the judgment layer, it is judged whether the difference between the fused attack information and the feature information is greater than the difference threshold. When the difference between the fused attack information and the feature information is greater than the difference threshold, it is determined that the current image data is an adversarial sample.

[0108] In this embodiment, the terminal calculates the difference between the fused attack information and the feature information corresponding to the fused attack information, and judges whether the difference between the fused attack information and the feature information is greater than the difference threshold through the output layer (i.e., the judgment layer) of the attack information detection network. When the difference between the fused attack information and the feature information is greater than the difference threshold, the terminal determines that the current image data is an adversarial sample; when the distance between the fused attack information and the feature information is not greater than the difference threshold, the terminal determines that the current image data is a normal sample. Normal samples are non-adversarial sample image data, and the difference threshold can be obtained by training the heterogeneous fusion network structure with normal samples, or can be preset in advance at the terminal based on expert experience. The difference can be, but is not limited to, Euclidean distance or Mahalanobis distance.

[0109] Based on the above scheme, a low-power attack information detection network is used to determine whether the difference between the fused attack information and the feature information is greater than the difference threshold, so as to determine whether the current image data is an adversarial sample, thereby improving the efficiency of image recognition and classification in the field of autonomous driving.

[0110] Optional, such as Figure 4 As shown, the method also includes:

[0111] Step S401, obtaining regular sample image data, adversarial sample image data and an initial heterogeneous fusion network structure.

[0112] Among them, the regular sample image data is non-adversarial sample image data.

[0113] In this embodiment, the terminal selects adversarial sample image data and non-adversarial sample image data from each historical image data acquired by the image sensor set at the edge of the autonomous driving vehicle, and uses the non-adversarial sample image data as regular sample image data. The terminal obtains an untrained heterogeneous fusion network structure and uses the untrained heterogeneous fusion network structure as the initial heterogeneous fusion network structure. The initial heterogeneous fusion network structure includes an initial convolutional neural network, an initial attack information extraction network, and an initial attack information detection network.

[0114] Step S402: input the regular sample image data into the initial heterogeneous fusion network structure, train the initial heterogeneous fusion network structure, and obtain the heterogeneous fusion network structure.

[0115] In this embodiment, the terminal simultaneously trains the initial convolutional neural network, the initial attack information extraction network, and the initial attack information detection network of the initial heterogeneous fusion network structure through conventional sample image data, obtains the parameter value and fitting function of the convolutional neural network, the parameter value and fitting function of the attack information extraction network, and the parameter value and fitting function of the attack information detection network, thereby determining the convolutional neural network, the attack information extraction network, and the attack information detection network. The terminal uses the convolutional neural network, the attack information extraction network, and the attack information detection network as the heterogeneous fusion network structure.

[0116] Step S403, inputting the adversarial sample image data and the regular sample image data into the convolutional neural network respectively, to obtain the adversarial image feature data of each pooling layer corresponding to the adversarial sample image data, and the regular image feature data of each pooling layer corresponding to the regular sample image data.

[0117] In this embodiment, the terminal inputs the adversarial sample image data into the convolutional neural network to obtain adversarial image feature data of each pooling layer corresponding to the adversarial sample image data; and inputs the conventional sample image data into the convolutional neural network to obtain conventional image feature data of each pooling layer corresponding to the conventional sample image data. The specific processing process is detailed in step S102.

[0118] Step S404, input each adversarial image feature data and each conventional image feature data into an attack information extraction network respectively to obtain adversarial fusion attack information and conventional fusion attack information.

[0119] In this embodiment, the terminal inputs the adversarial image feature data of each pooling layer into the attack information extraction network to obtain adversarial fusion attack information; and inputs the conventional image feature data into the attack information extraction network to obtain conventional fusion attack information. The specific processing process is detailed in step S103.

[0120] Step S405, determining adversarial feature information corresponding to the adversarial fusion attack information and conventional feature information corresponding to the conventional fusion attack information according to the adversarial fusion attack information, the conventional fusion attack information, and the attack information detection network.

[0121] In this embodiment, the terminal determines the adversarial feature information corresponding to the adversarial fusion attack information based on the adversarial fusion attack information and the attack information detection network; and determines the conventional feature information corresponding to the conventional fusion attack information based on the conventional fusion attack information and the attack information detection network. The specific processing process is detailed in step S104.

[0122] Step S406, determining a difference threshold according to the difference between the adversarial fusion attack information and the adversarial feature information, and the difference between the conventional fusion attack information and the conventional feature information.

[0123] In this embodiment, the terminal searches for the middle value of the distance range between the distance range that is less than the difference between the adversarial fusion attack information and the adversarial feature information and the distance range that is greater than the difference between the conventional fusion attack information and the conventional feature information, and uses the difference represented by the middle value as the difference threshold. In another embodiment, the terminal performs steps S403-S306 through multiple adversarial sample image data and multiple conventional sample image data to obtain that the difference between the adversarial fusion attack information and the adversarial feature information is included in an adversarial sample difference range, and the difference between the conventional fusion attack information and the conventional feature information is included in a conventional sample difference range. In the case where there is no overlap between the adversarial sample difference range and the conventional sample difference range, the terminal uses the minimum value of the adversarial sample difference range and the middle value between the maximum value of the conventional sample difference range as the difference threshold. In the case where there is an overlap between the adversarial sample difference range and the conventional sample difference range, the terminal uses the middle value of the overlapping part as the difference threshold.

[0124] Based on the above scheme, the heterogeneous fusion network structure is obtained by training the initial heterogeneous fusion network structure, thereby improving the practicality of the heterogeneous fusion network structure; the difference threshold is obtained through historical image data, and the heterogeneous fusion network structure is optimized, thereby improving the accuracy of the heterogeneous fusion network structure in judging whether the image data is an adversarial sample.

[0125] Optionally, after determining the difference threshold, it also includes: inputting each adversarial image feature data and each sample image feature data into the dimension reduction layer of the attack information extraction network respectively, to obtain the adversarial attack information of the dimension reduction layer corresponding to each adversarial image feature data, and the attack information of the dimension reduction layer corresponding to each sample image feature data; the dimension reduction layer contains an adversarial attack information and a sample attack information; in the dimension reduction layer, a dimension reduction layer in which the difference between the adversarial attack information and the sample attack information in the same dimension reduction layer is greater than a preset difference is selected as the target dimension reduction layer; according to each target dimension reduction layer, each target pooling layer is determined, and the heterogeneous fusion network structure is optimized based on each target pooling layer to obtain an optimized heterogeneous fusion network structure.

[0126] In this embodiment, the terminal obtains the adversarial image feature data of each pooling layer corresponding to the adversarial sample image data obtained in step S403, and the conventional image feature data of each pooling layer corresponding to the conventional sample image data, and inputs the adversarial image feature data of each pooling layer into the information dimension reduction extraction algorithm of the attack information extraction network to obtain the adversarial attack information of each dimension reduction layer; and inputs the conventional sample image feature data of each pooling layer into the information dimension reduction extraction algorithm of the attack information extraction network to obtain the conventional attack information of each dimension reduction layer. Each dimension reduction layer corresponds to one adversarial attack information and one conventional attack information, and the attack information is a low-dimensional vector. For each dimension reduction layer, the terminal calculates the difference between the adversarial attack information and the conventional attack information of each dimension reduction layer, and sorts each dimension reduction layer according to the size of the difference. The terminal pre-stores the number of dimension reduction layers, and selects the dimension reduction layer in the sorted dimension reduction layers in order from large to small according to the number of dimension reduction layers, and uses the selected dimension reduction layer as the target dimension reduction layer. Since the dimensionality reduction layer corresponds to the pooling layer one by one, the terminal selects the pooling layer corresponding to the target dimensionality reduction layer according to the target dimensionality reduction layer, and uses the selected pooling layers as the target pooling layers. The terminal replaces the pooling layers of the convolutional neural network through the target pooling layers to obtain an optimized convolutional neural network, and replaces the convolutional neural network of the heterogeneous fusion network structure according to the optimized convolutional neural network to obtain an optimized heterogeneous fusion network structure.

[0127] Based on the above scheme, the terminal optimizes the heterogeneous fusion network structure by selecting the target dimensionality reduction layer, thereby reducing the computing energy consumption of the heterogeneous fusion network structure and improving the efficiency of the heterogeneous fusion network structure.

[0128] This application also provides an example of adversarial sample detection, such as Figure 5 As shown, the specific processing process includes the following steps:

[0129] Step S501, obtaining current image data and heterogeneous fusion network structure.

[0130] Among them, the current image data is the image data of the environment around the autonomous driving vehicle, and the heterogeneous fusion network structure includes a convolutional neural network, an attack information extraction network, and an attack information detection network.

[0131] Step S502, performing a convolution operation on the current image data through the convolution layer of the convolutional neural network to obtain feature data of each convolution image.

[0132] Step S503, performing a pooling operation on each convolution image data through the pooling layer of the convolutional neural network to obtain image feature data of each pooling layer corresponding to the current image data.

[0133] Step S504: for each pooling layer's image feature data, the image feature data of the pooling layer is input into the dimension reduction layer of the attack information extraction network to perform a dimension reduction extraction operation to obtain attack information of the dimension reduction layer corresponding to the image feature data.

[0134] Among them, the dimension reduction layer and the pooling layer correspond one to one.

[0135] Step S505, the attack information of each dimensionality reduction layer is spliced ​​through the information fusion network of the attack information extraction network to obtain fused attack information.

[0136] Step S506: input the fused attack information into the encoding layer of the attack information detection network to obtain low-dimensional manifold information of the fused attack information.

[0137] Step S507, mapping the low-dimensional manifold information to the original high-dimensional space through the decoding layer of the attack information detection network to obtain feature information corresponding to the fused attack information.

[0138] Among them, the original high-dimensional space is the high-dimensional space where the fused attack information is located.

[0139] Step S508, through the judgment layer of the attack information detection network, it is determined whether the difference between the fused attack information and the feature information is greater than the difference threshold. If the difference between the fused attack information and the feature information is greater than the difference threshold, the current image data is determined to be an adversarial sample.

[0140] This application also provides a training and optimization example of a heterogeneous fusion network, such as Figure 6 As shown, the specific processing process includes the following steps:

[0141] Step S601, obtaining regular sample image data, adversarial sample image data and an initial heterogeneous fusion network structure.

[0142] Among them, the regular sample image data is non-adversarial sample image data.

[0143] Step S602: input the regular sample image data into the initial heterogeneous fusion network structure, train the initial heterogeneous fusion network structure, and obtain the heterogeneous fusion network structure.

[0144] Step S603, input the adversarial sample image data and the regular sample image data into the convolutional neural network respectively, to obtain the adversarial image feature data of each pooling layer corresponding to the adversarial sample image data, and the regular image feature data of each pooling layer corresponding to the regular sample image data.

[0145] Step S604, input each adversarial image feature data and each conventional image feature data into an attack information extraction network respectively to obtain adversarial fusion attack information and conventional fusion attack information.

[0146] Step S605, determining adversarial feature information corresponding to the adversarial fusion attack information and conventional feature information corresponding to the conventional fusion attack information according to the adversarial fusion attack information, the conventional fusion attack information, and the attack information detection network.

[0147] Step S606: Determine a difference threshold according to the difference between the adversarial fusion attack information and the adversarial feature information, and the difference between the conventional fusion attack information and the conventional feature information.

[0148] Step S607, input each adversarial image feature data and each sample image feature data into the dimension reduction layer of the attack information extraction network respectively, to obtain the adversarial attack information of the dimension reduction layer corresponding to each adversarial image feature data and the attack information of the dimension reduction layer corresponding to each sample image feature data.

[0149] Among them, the dimensionality reduction layer contains an adversarial attack information and a sample attack information.

[0150] Step S608: In each dimensionality reduction layer, a dimensionality reduction layer in which the difference between the adversarial attack information and the sample attack information in the same dimensionality reduction layer is greater than a preset difference is selected as the target dimensionality reduction layer.

[0151] Step S609, determining each target pooling layer according to each target dimensionality reduction layer, and optimizing the heterogeneous fusion network structure based on each target pooling layer to obtain an optimized heterogeneous fusion network structure.

[0152] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0153] Based on the same inventive concept, the embodiment of the present application also provides an adversarial sample detection device for implementing the adversarial sample detection method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more adversarial sample detection device embodiments provided below can refer to the limitations of the adversarial sample detection method above, and will not be repeated here.

[0154] In one embodiment, Figure 7 As shown, an adversarial sample detection device is provided, including: a first acquisition module 710, a first convolution module 720, a first extraction module 730 and a first determination module 740, wherein:

[0155] A first acquisition module 710 is used to acquire current image data and a heterogeneous fusion network structure; the current image data is image data of the environment surrounding the autonomous driving vehicle, and the heterogeneous fusion network structure includes a convolutional neural network, an attack information extraction network, and an attack information detection network;

[0156] The first convolution module 720 is used to input the current image data into the convolutional neural network to obtain the image feature data output by each pooling layer included in the convolutional neural network;

[0157] The first extraction module 730 is used to input the image feature data of each pooling layer into the attack information extraction network to obtain fused attack information;

[0158] The first determination module 740 is used to determine feature information corresponding to the fused attack information based on the fused attack information and the attack information detection network, and determine that the current image data is an adversarial sample when the difference between the fused attack information and the feature information is greater than a difference threshold.

[0159] Optionally, the convolutional neural network includes a convolutional layer; a first convolution module 720, specifically configured to:

[0160] Through the convolution layer, the current image data is convolved to obtain the feature data of each convolution image;

[0161] Through the pooling layer, the pooling operation is performed on each convolution image data to obtain the image feature data of each pooling layer corresponding to the current image data.

[0162] Optionally, the attack information extraction network includes a dimension reduction layer and an information fusion network; the first extraction module 730 is specifically used to:

[0163] For the image feature data of each pooling layer, the image feature data of the pooling layer is input into the dimension reduction layer corresponding to the pooling layer, and a dimension reduction extraction operation is performed to obtain the attack information of the dimension reduction layer corresponding to the image feature data; the dimension reduction layer and the pooling layer correspond one to one;

[0164] Through the information fusion network, the attack information of each dimensionality reduction layer is spliced ​​to obtain the fused attack information.

[0165] Optionally, the attack information detection network includes a coding layer, a decoding layer and a judgment layer; the first determination module 740 is specifically used to:

[0166] Input the fused attack information into the encoding layer to obtain the low-dimensional manifold information of the fused attack information;

[0167] Through the decoding layer, the low-dimensional manifold information is mapped to the original high-dimensional space to obtain the feature information corresponding to the fused attack information; the original high-dimensional space is the high-dimensional space where the fused attack information is located;

[0168] Through the judgment layer, it is determined whether the difference between the fused attack information and the feature information is greater than the difference threshold. When the difference between the fused attack information and the feature information is greater than the difference threshold, the current image data is determined to be an adversarial sample.

[0169] Optionally, the device further comprises:

[0170] The second acquisition module is used to acquire regular sample image data, adversarial sample image data and an initial heterogeneous fusion network structure; the regular sample image data is non-adversarial sample image data;

[0171] A training module is used to input conventional sample image data into an initial heterogeneous fusion network structure, train the initial heterogeneous fusion network structure, and obtain a heterogeneous fusion network structure;

[0172] A second convolution module is used to input the adversarial sample image data and the conventional sample image data into the convolutional neural network respectively, to obtain adversarial image feature data of each pooling layer corresponding to the adversarial sample image data and conventional image feature data of each pooling layer corresponding to the conventional sample image data;

[0173] The second extraction module is used to input each adversarial image feature data and each conventional image feature data into the attack information extraction network to obtain adversarial fusion attack information and conventional fusion attack information;

[0174] A second determination module is used to determine adversarial feature information corresponding to the adversarial fusion attack information and conventional feature information corresponding to the conventional fusion attack information according to the adversarial fusion attack information, the conventional fusion attack information, and the attack information detection network;

[0175] The third determination module is used to determine a difference threshold according to the difference between the adversarial fusion attack information and the adversarial feature information, and the difference between the conventional fusion attack information and the conventional feature information.

[0176] Optionally, the device further comprises:

[0177] A dimension reduction module is used to input each adversarial image feature data and each sample image feature data into the dimension reduction layer of the attack information extraction network, respectively, to obtain adversarial attack information of the dimension reduction layer corresponding to each adversarial image feature data and attack information of the dimension reduction layer corresponding to each sample image feature data; the dimension reduction layer includes one adversarial attack information and one sample attack information;

[0178] A selection module is used to select, from among the dimensionality reduction layers, a dimensionality reduction layer in which the difference between the adversarial attack information and the sample attack information in the same dimensionality reduction layer is greater than a preset difference, as a target dimensionality reduction layer;

[0179] The optimization module is used to determine each target pooling layer according to each target dimensionality reduction layer, and optimize the heterogeneous fusion network structure based on each target pooling layer to obtain an optimized heterogeneous fusion network structure.

[0180] Each module in the above-mentioned adversarial sample detection device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0181] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 8As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for detecting adversarial samples is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse.

[0182] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0183] In an embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0184] In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0185] In an embodiment, a computer program product is provided, including a computer program, which implements the steps in the above-mentioned method embodiments when executed by a processor.

[0186] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0187] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0188] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0189] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for detecting adversarial samples. It is characterized in that The method comprises: Acquire current image data and a heterogeneous fusion network structure; the current image data is image data of the environment surrounding the autonomous driving vehicle, and the heterogeneous fusion network structure includes a convolutional neural network, an attack information extraction network, and an attack information detection network; wherein the attack information extraction network includes a dimensionality reduction layer and an information fusion network, and the attack information detection network includes a coding layer, a decoding layer, and a judgment layer; Input the current image data into the convolutional neural network to obtain image feature data output by each pooling layer included in the convolutional neural network; For the image feature data of each pooling layer, the image feature data of the pooling layer is input into the dimension reduction layer corresponding to the pooling layer, and a dimension reduction extraction operation is performed to obtain the attack information of the dimension reduction layer corresponding to the image feature data; the dimension reduction layer and the pooling layer correspond one to one; Through the information fusion network, the attack information of each dimension reduction layer is spliced ​​to obtain fused attack information; Inputting the fused attack information into the encoding layer to obtain low-dimensional manifold information of the fused attack information; Through the decoding layer, the low-dimensional manifold information is mapped to the original high-dimensional space to obtain feature information corresponding to the fused attack information; the original high-dimensional space is the high-dimensional space where the fused attack information is located; Through the judgment layer, it is judged whether the difference between the fused attack information and the feature information is greater than the difference threshold. If the difference between the fused attack information and the feature information is greater than the difference threshold, it is determined that the current image data is an adversarial sample.

2. The method according to claim 1, It is characterized in that The convolutional neural network includes a convolutional layer; the current image data is input into the convolutional neural network to obtain image feature data output by each pooling layer included in the convolutional neural network, including: Through the convolution layer, a convolution operation is performed on the current image data to obtain each convolution image feature data; Through the pooling layer, a pooling operation is performed on each of the convolution image feature data to obtain image feature data of each pooling layer corresponding to the current image data.

3. The method according to claim 1, It is characterized in that The method further comprises: Obtaining regular sample image data, adversarial sample image data and an initial heterogeneous fusion network structure; the regular sample image data is non-adversarial sample image data; Inputting the conventional sample image data into the initial heterogeneous fusion network structure, training the initial heterogeneous fusion network structure, and obtaining the heterogeneous fusion network structure; Inputting the adversarial sample image data and the conventional sample image data into the convolutional neural network respectively, to obtain adversarial image feature data of each pooling layer corresponding to the adversarial sample image data and conventional image feature data of each pooling layer corresponding to the conventional sample image data; Inputting each of the adversarial image feature data and each of the conventional image feature data into the attack information extraction network respectively to obtain adversarial fusion attack information and conventional fusion attack information; Determine, according to the adversarial fusion attack information, the conventional fusion attack information, and the attack information detection network, adversarial feature information corresponding to the adversarial fusion attack information and conventional feature information corresponding to the conventional fusion attack information; A difference threshold is determined according to the difference between the adversarial fusion attack information and the adversarial feature information, and the difference between the conventional fusion attack information and the conventional feature information.

4. The method according to claim 3, It is characterized in that After determining the difference threshold, the method further includes: Input each of the adversarial image feature data and each of the conventional image feature data into the dimension reduction layer of the attack information extraction network, respectively, to obtain adversarial attack information of the dimension reduction layer corresponding to each of the adversarial image feature data and attack information of the dimension reduction layer corresponding to each of the conventional image feature data; the dimension reduction layer includes one adversarial attack information and one sample attack information; In each of the dimensionality reduction layers, a dimensionality reduction layer in which the difference between the adversarial attack information and the sample attack information in the same dimensionality reduction layer is greater than a preset difference is selected as a target dimensionality reduction layer; According to each of the target dimensionality reduction layers, each of the target pooling layers is determined, and based on each of the target pooling layers, the heterogeneous fusion network structure is optimized to obtain an optimized heterogeneous fusion network structure.

5. An adversarial sample detection device, It is characterized in that The device comprises: A first acquisition module is used to acquire current image data and a heterogeneous fusion network structure; the current image data is image data of the environment surrounding the autonomous driving vehicle, and the heterogeneous fusion network structure includes a convolutional neural network, an attack information extraction network, and an attack information detection network; wherein the attack information extraction network includes a dimensionality reduction layer and an information fusion network, and the attack information detection network includes a coding layer, a decoding layer, and a judgment layer; A first convolution module is used to input the current image data into the convolutional neural network to obtain image feature data output by each pooling layer included in the convolutional neural network; A first extraction module is used to input the current image data into the convolutional neural network to obtain image feature data output by each pooling layer included in the convolutional neural network; for the image feature data of each pooling layer, the image feature data of the pooling layer is input into the dimension reduction layer corresponding to the pooling layer to perform a dimension reduction extraction operation to obtain attack information of the dimension reduction layer corresponding to the image feature data; the dimension reduction layer and the pooling layer correspond one to one; the attack information of each dimension reduction layer is spliced ​​through the information fusion network to obtain fused attack information; The first determination module is used to input the fused attack information into the encoding layer to obtain the low-dimensional manifold information of the fused attack information; through the decoding layer, the low-dimensional manifold information is mapped to the original high-dimensional space to obtain the feature information corresponding to the fused attack information; the original high-dimensional space is the high-dimensional space where the fused attack information is located; through the judgment layer, it is judged whether the difference between the fused attack information and the feature information is greater than the difference threshold, and when the difference between the fused attack information and the feature information is greater than the difference threshold, the current image data is determined to be an adversarial sample.

6. The device according to claim 5, It is characterized in that The convolutional neural network includes a convolutional layer; the first convolutional module is specifically used for: Through the convolution layer, a convolution operation is performed on the current image data to obtain each convolution image feature data; Through the pooling layer, a pooling operation is performed on each of the convolution image feature data to obtain image feature data of each pooling layer corresponding to the current image data.

7. The device according to claim 5, It is characterized in that The device also includes: A second acquisition module is used to acquire regular sample image data, adversarial sample image data and an initial heterogeneous fusion network structure; the regular sample image data is non-adversarial sample image data; A training module, used for inputting the conventional sample image data into the initial heterogeneous fusion network structure, training the initial heterogeneous fusion network structure, and obtaining the heterogeneous fusion network structure; A second convolution module is used to input the adversarial sample image data and the conventional sample image data into the convolutional neural network respectively, to obtain adversarial image feature data of each pooling layer corresponding to the adversarial sample image data and conventional image feature data of each pooling layer corresponding to the conventional sample image data; A second extraction module is used to input each of the adversarial image feature data and each of the conventional image feature data into the attack information extraction network to obtain adversarial fusion attack information and conventional fusion attack information; A second determination module is used to determine adversarial feature information corresponding to the adversarial fusion attack information and conventional feature information corresponding to the conventional fusion attack information according to the adversarial fusion attack information, the conventional fusion attack information, and the attack information detection network; The third determination module is used to determine a difference threshold according to the difference between the adversarial fusion attack information and the adversarial feature information, and the difference between the conventional fusion attack information and the conventional feature information.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

10. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Vehicle image detection method and device, computer equipment and storage medium

    CN111461170A

  • Soft threshold defense method for remote sensing image confrontation sample

    CN113269241A

  • Adversarial sample detection method for image target detection neural network

    CN113947579A

  • Cohort Based Adversarial Attack Detection

    US20210264268A1