A cross-domain model reverse attack method
By establishing an adversarial domain alignment model reverse attack network, the domain differences between depth features of different domains are eliminated, achieving high-performance model reverse attack in cross-domain scenarios, recovering privacy images and preserving the texture features of auxiliary images.
Patent Information
- Application Number
- CN202211515102.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-30
- Publication Date
- 2026-11-20
- Estimated Expiration
- 2042-11-30
AI Technical Summary
Existing reverse engineering methods for models perform poorly when the auxiliary and privacy datasets have different distributions, and cannot effectively recover privacy images.
A cross-domain model inverse attack method is adopted. By obtaining white-box access permissions to the target network, privacy image depth features and auxiliary image samples are obtained. An adversarial domain alignment model inverse attack network model is established, including a feature alignment module, an image reconstruction module and a domain discrimination module. The network is trained until the loss function converges, thus realizing the cross-domain model inverse attack.
High-performance model inverse attacks were achieved in scenarios where the auxiliary and privacy datasets have domain differences, enabling the recovery of clear privacy images while preserving the texture features of the auxiliary images.
Smart Images

Figure CN115718929B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of artificial intelligence security technology, specifically relating to a cross-domain model reverse attack method. Background Technology
[0002] With the widespread application of deep learning, its security issues have received increasing attention. Model inversion attacks (MIA) aim to recover the training data used by a given deep neural network model by querying it. Currently, model inversion attacks can be divided into two types based on their technical approaches: search-based inversion methods and training-based inversion methods. Search-based inversion methods obtain the privacy image by searching the original image space or its corresponding latent space. Training-based inversion methods train an inversion model using auxiliary data, and then use the inversion model to directly recover the privacy image from the deep features or prediction vectors corresponding to the privacy image.
[0003] The paper Matt Fredrikson, Somesh Jha, and Thomas Ristenpart, "Model inversion attacks that exploit confidence information and basic countermeasures," in Proceedings of the 22nd ACM-SIGSAC Conference on Computer and Communications Security, CCS'15, pp. 1322–1333, New York, NY, USA, Oct 2015, Association for Computing Machinery, first proposed a search-based inversion method. The authors recovered visually recognizable face images from a simple fully connected neural network by searching the original image space. Following this, the papers Yuheng Zhang, Ruoxi Jia, Hengzhi Pei, Wenxiao Wang, Bo Li, and Dawn Song. The secret revealer: Generative model-inversion attacks against deep neural networks. In 2020 IEEE / CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 250–258, Jun 2020. and Si Chen, Mostafa Kahla, Ruoxi Jia, and Guo-Jun Qi. Knowledge-enriched distributional model inversion attacks. In 2021 IEEE / CVF International Conference on Computer Vision (ICCV), pp. 16158–16167, 2021. proposed incorporating generative adversarial networks (GANs). By searching the latent space of GANs, the search space of search-based inverse methods is reduced, resulting in more natural output images.The paper Ziqi Yang, Jiyi Zhang, Ee-Chien Chang, and Zhenkai Liang. Neural network inversion in adversarial setting via background knowledge alignment. In Proceedings of the 2019 ACM SIGSACConference on Computer and Communications Security, CCS '19, pp. 225–240, New York, NY, USA, Nov 2019. Association for Computing Machinery. This paper proposes a training-based inverse method. The authors successfully recovered a privacy-preserving training set from the predicted vectors by constructing an inverse model.
[0004] While existing model reverse engineering methods have demonstrated good image recovery performance, most assume that the auxiliary dataset used by the attacker and the privacy dataset used to train the target network have the same distribution. Therefore, existing methods perform well when the auxiliary and privacy datasets are of the same distribution (same domain), but perform poorly or even fail to recover the image when they are of different distributions (cross-domain). However, in real-world attack scenarios, attackers often find it difficult to obtain a dataset with the same distribution as the privacy dataset, while obtaining a dataset with a different distribution is often much easier. Therefore, achieving high-performance model reverse engineering when the auxiliary and privacy datasets have different distributions has become a pressing problem. Summary of the Invention
[0005] This invention addresses the problem of poor performance in existing model reverse engineering attacks when auxiliary and privacy datasets differ across domains, failing to recover privacy-preserving images. It provides a cross-domain model reverse engineering method, comprising the following steps: obtaining white-box access permissions to the target network model; acquiring privacy-preserving image depth features and creating a dataset; acquiring auxiliary image samples and creating a dataset; establishing an adversarial domain alignment model reverse engineering network model; training the adversarial domain alignment model reverse engineering network model using the established auxiliary image dataset and privacy image depth feature dataset, updating the weight parameters within the network until the network's loss function converges, resulting in a trained adversarial domain alignment model reverse engineering network model; inputting the acquired privacy-preserving image depth features into the trained adversarial domain alignment model reverse engineering network model to obtain the recovered privacy-preserving training image. This method achieves high-performance cross-domain model reverse engineering attacks even when the auxiliary and privacy datasets have domain differences. This application further addresses and improves the security of artificial intelligence by resolving the defects and problems existing in existing model reverse engineering attacks.
[0006] To achieve the above objectives, the technical solution adopted by this invention is: a cross-domain model reverse attack method, comprising the following steps:
[0007] S1, Obtain white-box access permissions to the target network to be attacked: The target network to be attacked has been trained using privacy images and has image classification capabilities. The privacy images are kept confidential. The white-box access permissions include, but are not limited to, querying the network's classification results for the input image, obtaining the network's structure, and the deep features output by the network's intermediate layers.
[0008] S2, Obtain the depth features of the privacy image and create a dataset: The depth features of the privacy image are the depth features output by the intermediate layer of the target network;
[0009] S3, Obtain auxiliary image samples and create a dataset: The auxiliary image dataset and the privacy image dataset used to train the target network have the same category, but have domain differences;
[0010] S4, Establish an adversarial domain alignment model reverse attack network model: The adversarial domain alignment model reverse attack network model includes a feature alignment module, an image reconstruction module, and a domain discrimination module. The feature alignment module is used to re-extract and align deep features from different domains to eliminate domain differences between deep features from different domains. The image reconstruction module is located after the feature alignment module and is used to restore the image. The domain discrimination module is also located after the feature alignment module and is used to determine the domain to which the deep features belong.
[0011] S5, Training the Adversarial Domain Alignment Model Inverse Attack Network Model: The adversarial domain alignment model inverse attack network model is trained using the established privacy image deep feature dataset and auxiliary image dataset. The weight parameters in the network are updated until the network's loss function converges, and the trained adversarial domain alignment model inverse attack network model is obtained.
[0012] S6, Output: Input the acquired privacy image depth features into the trained adversarial domain alignment model reverse attack network model to obtain the recovered privacy image.
[0013] As a further technical solution of the present invention, the target network to be attacked in step S1 includes a feature extractor and a classifier. The feature extractor is used to extract the depth features of the image, and the classifier is used to classify the depth features of the image to obtain the classification result of the image.
[0014] Furthermore, the feature extractor includes multiple convolutional layers, batch normalization layers, pooling layers, and activation layers. The pooling layers can be either max pooling or uniform pooling. The activation functions used in the activation layers include, but are not limited to, ReLU and tanh. The classifier includes multiple fully connected layers and Dropout layers.
[0015] Furthermore, the deep features output by the intermediate layers of the network obtained through white-box access in steps S1 and S2 include, but are not limited to, the deep features output by the feature extractor and the deep features output by the fully connected layers in the classifier.
[0016] Furthermore, the feature alignment module in step S4 includes multiple fully connected layers and activation layers, and the activation function used by the activation layers includes, but is not limited to, ReLU and tanh.
[0017] Furthermore, the image reconstruction module in step S4 includes multiple deconvolution layers, batch normalization layers, activation layers, and a sigmoid output layer. The activation function used by the activation layer includes, but is not limited to, ReLU and tanh.
[0018] Furthermore, the domain discrimination module in step S4 includes a gradient inversion layer, multiple fully connected layers and activation layers. The activation function used by the activation layer includes, but is not limited to, ReLU and tanh. During model training, the gradient inversion layer sets the output gradient value to the negative of the input gradient value.
[0019] Furthermore, the error function used in step S5 to train the adversarial domain alignment model reverse attack network model is:
[0020]
[0021] in, The weight parameters of the domain discrimination module are represented. The weight parameters represent the feature alignment module. The weight parameters represent the image reconstruction module. For image reconstruction error, This is the domain error.
[0022] Furthermore, in step S5, the image reconstruction error during training the adversarial domain alignment model to inversely attack the network model... Specifically:
[0023]
[0024] in, Represents auxiliary number image samples, To ensure the distribution that the auxiliary dataset satisfies, This represents a feature extractor for the target network to be attacked. The full reference image quality evaluation index includes, but is not limited to, mean square error (MSE), peak signal-to-noise ratio (PSNR), or structural similarity (SSIM).
[0025] Furthermore, in step S5, the temporal error of the training adversarial domain alignment model reverse attack network model is... Specifically:
[0026]
[0027] in, Represents the depth features of a privacy-preserving image. The distribution satisfied by the depth features of the privacy image.
[0028] Compared with existing technologies, this invention proposes an adversarial domain alignment model inverse attack network model. This model adds a feature alignment module and a domain discrimination module to the existing image reconstruction module of training-based inverse methods. The proposed adversarial domain alignment model inverse attack network model can train the feature alignment module and the domain discrimination module using adversarial learning while learning to reconstruct the image. This allows the feature alignment module to further extract privacy features and auxiliary feature information from the input, eliminating domain differences between feature vectors from different domains, thereby achieving cross-domain model inverse attacks. Attached Figure Description
[0029] Figure 1 This is a schematic diagram of the network structure of the target network in Embodiment 1 of the method of the present invention;
[0030] Figure 2 These are images from the privacy training dataset in Embodiment 1 of the method of the present invention;
[0031] Figure 3 It is the auxiliary dataset image in step S3 of embodiment 1 of the present invention;
[0032] Figure 4 This is a schematic diagram of the reverse attack network model structure for the adversarial domain alignment model in step S4 of embodiment 1 of the method of the present invention;
[0033] Figure 5 This is a schematic diagram of the feature alignment module structure in the adversarial domain alignment model reverse attack network model in step S4 of embodiment 1 of the present invention;
[0034] Figure 6 This is a schematic diagram of the domain discrimination module structure in the adversarial domain alignment model reverse attack network model in step S4 of embodiment 1 of the method of the present invention;
[0035] Figure 7 This is a schematic diagram of the image reconstruction module structure in the adversarial domain alignment model reverse attack network model in step S4 of embodiment 1 of the present invention;
[0036] Figure 8 This is a flowchart of the training process of the adversarial domain alignment model reverse attack network model in step S5 of embodiment 1 of the method of the present invention;
[0037] Figure 9 The image is obtained by performing a model reverse attack using an adversarial domain alignment model reverse attack network in Embodiment 1 of the present invention.
[0038] Figure 10 The image was recovered using a reverse engineering attack based on an existing model. Detailed Implementation
[0039] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings.
[0040] A method for cross-domain model reverse engineering includes the following steps:
[0041] S1: Obtain white-box access permissions to the target network: The target network has been trained using privacy images and has image classification capabilities. The privacy images are kept confidential. The white-box access permissions include, but are not limited to, querying the network's classification results for the input image, obtaining the network's structure, and the deep features output by the network's intermediate layers.
[0042] The target network includes a feature extractor and a classifier. The feature extractor extracts the depth features of the image, and the classifier classifies the depth features to obtain the image classification result. The feature extractor includes multiple convolutional layers, batch normalization layers, pooling layers, and activation layers. The pooling layers can use either max pooling or uniform pooling, and the activation functions used in the activation layers include, but are not limited to, ReLU and tanh. The classifier includes multiple fully connected layers and Dropout layers.
[0043] In this embodiment, the specific structure of the target network model is as follows: Figure 1 As shown, it consists of the following two parts:
[0044] (1) A feature extractor consisting of three convolutional groups is used to extract depth features from the input 32*32 image. Each convolutional group includes a 3*3 convolutional layer, a batch normalization layer, a max pooling layer and a ReLU activation layer, with the number of channels of the three convolutional modules being 128, 256 and 512, respectively.
[0045] (2) A classifier consisting of two fully connected layers is used to classify the extracted deep features. The input feature dimension is 8192, the hidden layer dimension is 50, and the output dimension is 10.
[0046] In this embodiment, the privacy training image is as follows: Figure 2 As shown. Figure 2 The sample in the sample consists of white handwritten characters on a black background, with large font size and blurred outline.
[0047] S2: Obtain the depth features of the privacy image and create a dataset: The depth features of the privacy image are the depth features output by the intermediate layer of the target network.
[0048] The deep features obtained through white-box access in steps S1 and S2 include, but are not limited to, the deep features output by the feature extractor and the deep features output by the fully connected layer in the classifier.
[0049] S3: Obtain auxiliary image samples and create a dataset: The auxiliary image dataset and the privacy image dataset used to train the target network have the same category, but have domain differences;
[0050] The auxiliary image dataset and the privacy image dataset contain samples and their corresponding labels. The labels indicate the category of each sample. The domain differences can be one or more of the following: differences caused by the device used to acquire the images, differences caused by ambient lighting during image acquisition, and differences in the surface texture of objects in the images. The auxiliary image samples used in this embodiment are as follows: Figure 3 As shown, Figure 3The sample in the image features white handwritten numerals on a black background, with clear and relatively centered font outlines. Figure 2 Compared to the privacy images shown, Figure 3 The auxiliary image samples shown have significant domain differences.
[0051] S4: Establish an adversarial domain alignment model reverse attack network model: The adversarial domain alignment model reverse attack network model includes a feature alignment module, an image reconstruction module, and a domain discrimination module. The feature alignment module is used to re-extract and align deep features from different domains to eliminate domain differences between deep features from different domains. The feature alignment module includes multiple fully connected layers and activation layers. The activation function used by the activation layer includes, but is not limited to, ReLU and tanh. The image reconstruction module is located after the feature alignment module and is used to restore the image. It includes multiple deconvolution layers, batch normalization layers, activation layers, and a sigmoid output layer. The activation function used by the activation layer includes, but is not limited to, ReLU and tanh. The domain discrimination module is also located after the feature alignment module and is used to determine the domain to which the deep features belong. The domain discrimination module includes a gradient inversion layer, multiple fully connected layers, and activation layers. The activation function used by the activation layer includes, but is not limited to, ReLU and tanh. The gradient inversion layer can set the output gradient value to the negative of the input gradient value during model training.
[0052] The specific structure of the adversarial domain alignment model reverse attack network model in this embodiment is as follows: Figure 4 As shown, the structure of the feature alignment module is as follows: Figure 5 As shown, it consists of three fully connected layers, with a ReLU activation layer between each pair of layers. The input feature dimension of the feature alignment module is 8192, the output feature dimension is 50, and the hidden layer dimension in the middle is 1024.
[0053] In this embodiment, the structure of the domain discrimination module of the adversarial domain alignment model reverse attack network model is as follows: Figure 6 As shown, it consists of a gradient inversion layer, three fully connected layers and a sigmoid layer. Each pair of the three fully connected layers contains a ReLU activation layer and a Dropout layer. The input feature dimension of the domain discriminator is 50 and the output feature dimension is 1. The hidden layers in the middle are all 1024 in dimension. The gradient inversion layer in the domain discriminator can take the negative of the gradient during gradient backpropagation, so that adversarial learning can be completed using the normal gradient descent method.
[0054] In this embodiment, the structure of the image reconstruction module of the adversarial domain alignment model reverse attack network model is as follows: Figure 7As shown, it consists of four deconvolution groups and one sigmoid layer. The first three deconvolution groups contain a 4*4 deconvolution layer, a batch normalization layer and a ReLU activation layer, respectively. The fourth deconvolution group contains only a 4*4 deconvolution layer. The number of channels in the deconvolution groups are 512, 256 and 128, respectively.
[0055] S5: Training the Adversarial Domain Alignment Model Inverse Attack Network Model: The adversarial domain alignment model inverse attack network model is trained using the established privacy image deep feature dataset and auxiliary image dataset. The weight parameters in the network are updated until the network's loss function converges, resulting in the trained adversarial domain alignment model inverse attack network model.
[0056] The error function used to train the adversarial domain alignment model for reverse attack network model is:
[0057]
[0058] in, The weight parameters of the domain discrimination module are represented. The weight parameters represent the feature alignment module. The weight parameters represent the image reconstruction module. For image reconstruction error, This is the domain error.
[0059] Image reconstruction error when training adversarial domain alignment model to inversely attack network model Specifically:
[0060]
[0061] in, Represents auxiliary number image samples, To ensure the distribution that the auxiliary dataset satisfies, This represents a feature extractor for the target network to be attacked. The full reference image quality evaluation index includes, but is not limited to, mean square error (MSE), peak signal-to-noise ratio (PSNR), or structural similarity (SSIM).
[0062] Training adversarial domain alignment model to reverse attack network model temporal error Specifically:
[0063]
[0064] in, Represents the depth features of a privacy-preserving image. The distribution satisfied by the depth features of the privacy image.
[0065] Reference Figure 8 The specific steps for training the adversarial domain alignment model reverse attack network model are as follows:
[0066] S51: Expand the established auxiliary image dataset with image enhancement technology, wherein the image enhancement technology is any one or more of the following: geometric transformation of the image, illumination transformation of the image, or using an artificial neural network to change the image style and generate a new image;
[0067] S52: Input the expanded auxiliary image dataset from step S51 into the feature extractor of the network to be attacked to obtain the corresponding depth features;
[0068] S53: Input the depth features of the auxiliary data and the depth features of the privacy image together into the feature alignment module, then input the output features of the module into the domain discrimination module, and input the depth features of the auxiliary dataset output by the feature alignment module into the image reconstruction module.
[0069] S54: The domain discrimination module calculates the domain error based on the depth features of the input auxiliary image and the depth features of the privacy image. :
[0070] S55: The image reconstruction module calculates the image reconstruction error based on the depth features of the input auxiliary image and in combination with the auxiliary image. :
[0071] S56: The network is trained by reducing the following errors:
[0072]
[0073] S6: Output Results: Input the acquired privacy image depth features into the trained adversarial domain alignment model inverse attack network model to obtain the recovered privacy image.
[0074] In this embodiment, the feature extractor of the target network to be attacked is based on... Figure 2 The features obtained from the privacy image shown are input into the adversarial domain alignment model inverse attack network model, and the inverse result is as follows. Figure 9 As shown, Figure 9 As can be seen, the recovered images are all clearly visible, and each sample is different. Figure 2 The semantic information of the privacy-preserving images was well recovered, while retaining [the original meaning / resources]. Figure 3 Texture features of the auxiliary image. (and) Figure 10 Compared to existing models that recover images through reverse attacks, the adversarial domain alignment model reverse attack network model achieves better cross-domain model reverse attacks.
[0075] Based on the above methods and processes, the core idea of the adversarial domain alignment model inverse attack network model involved in this invention is to align the deep features of the privacy image and the auxiliary image through adversarial learning, thereby eliminating the domain differences between them. Furthermore, the model performs the inverse task while aligning the features, achieving the goal of cross-domain model inverse attack. Once training is complete, the adversarial domain alignment model inverse attack network model involved in this invention can recover a privacy image with a different distribution from the auxiliary image data from the deep features of the privacy image. In summary, this invention achieves high-performance cross-domain model inverse attack in scenarios with domain differences, solving the problem that current model inverse attacks only work when the auxiliary and privacy data have the same distribution and cannot achieve cross-domain attacks.
[0076] It should be noted that the above content merely illustrates the technical concept of the present invention and should not be construed as limiting the scope of protection of the present invention. For those skilled in the art, various improvements and modifications can be made without departing from the principle of the present invention, and all such improvements and modifications fall within the scope of protection of the claims of the present invention.
Claims
1. A method for cross-domain model reverse engineering attacks, characterized in that, Includes the following steps: S1, Obtain white-box access permissions to the target network: The target network has been trained using privacy images and has image classification capabilities; the privacy images are kept confidential. The white-box access permissions include querying the network's classification results for the input image, obtaining the network's structure, and the deep features output by the network's intermediate layers. S2, Obtain the depth features of the privacy image and create a dataset: The depth features of the privacy image are the depth features output by the intermediate layer of the target network; S3, Obtain auxiliary image samples and create a dataset: The auxiliary image dataset and the privacy image dataset used to train the target network have the same category, but have domain differences; S4. Establish an adversarial domain alignment model reverse attack network model: The adversarial domain alignment model reverse attack network model includes a feature alignment module, an image reconstruction module, and a domain discrimination module. The feature alignment module is used to re-extract and align deep features from different domains to eliminate domain differences between deep features from different domains; The image reconstruction module is located after the feature alignment module and is used to restore the image; The domain discrimination module is also located after the feature alignment module and is used to determine the domain to which the depth feature belongs; S5, Training the Adversarial Domain Alignment Model Inverse Attack Network Model: Using the privacy image deep feature dataset established in step S2 and the auxiliary image dataset obtained in step S3, train the adversarial domain alignment model inverse attack network model established in step S4, update the weight parameters in the network until the network's loss function converges, and obtain the trained adversarial domain alignment model inverse attack network model. S6, Output: Input the acquired privacy image depth features into the trained adversarial domain alignment model reverse attack network model to obtain the recovered privacy image.
2. The cross-domain model reverse engineering attack method according to claim 1, characterized in that: The target network to be attacked in step S1 includes a feature extractor and a classifier. The feature extractor is used to extract the depth features of the image, and the classifier is used to classify the depth features of the image to obtain the classification result of the image.
3. The cross-domain model reverse attack method according to claim 2, characterized in that: The feature extractor includes multiple convolutional layers, batch normalization layers, pooling layers, and activation layers; the pooling layers can be either max pooling or uniform pooling; the activation functions used in the activation layers include ReLU and tanh; the classifier includes multiple fully connected layers and Dropout layers.
4. A cross-domain model reverse engineering attack method according to claim 1, 2, or 3, characterized in that: The deep features obtained through white-box access in steps S1 and S2 include the deep features output by the feature extractor and the deep features output by the fully connected layer in the classifier.
5. The cross-domain model reverse engineering attack method according to claim 4, characterized in that: The feature alignment module in step S4 includes multiple fully connected layers and activation layers. The activation functions used in the activation layers include ReLU and tanh.
6. The cross-domain model reverse engineering attack method according to claim 5, characterized in that: The image reconstruction module in step S4 includes multiple deconvolution layers, batch normalization layers, activation layers, and a sigmoid output layer. The activation function used by the activation layer includes ReLU and tanh.
7. The cross-domain model reverse engineering attack method according to claim 6, characterized in that: The domain discrimination module in step S4 includes a gradient inversion layer, multiple fully connected layers, and activation layers; the activation function used by the activation layer includes ReLU and tanh; the gradient inversion layer sets the output gradient value to the negative of the input gradient value during model training.
8. The cross-domain model reverse attack method according to claim 7, characterized in that: The error function used in step S5 to train the adversarial domain alignment model reverse attack network model is: ; in, The weight parameters of the domain discrimination module are represented. The weight parameters represent the feature alignment module. The weight parameters represent the image reconstruction module. For image reconstruction error, This is the domain error.
9. A cross-domain model reverse engineering attack method according to claim 8, characterized in that: In step S5, the image reconstruction error occurs during training the adversarial domain alignment model to inversely attack the network model. Specifically: ; in, Represents auxiliary number image samples, To ensure the distribution that the auxiliary dataset satisfies, This represents a feature extractor for the target network to be attacked. The full reference image quality evaluation index includes mean square error (MSE), peak signal-to-noise ratio (PSNR), or structural similarity (SSIM).
10. A cross-domain model reverse engineering attack method according to claim 9, characterized in that: In step S5, the temporal error of the training adversarial domain alignment model and the reverse attack network model is... Specifically: ; in, Represents the depth features of a privacy-preserving image. The distribution satisfied by the depth features of the privacy image.
Citation Information
Patent Citations
Federal learning privacy protection method and system based on adversarial training
CN113609521A
Deep learning data privacy protection method, system and device and medium
CN114780999A
