Black box model reverse reconstruction method based on decoupling space alignment
By adopting the decoupling spatial alignment method in the model reverse attack, and using the StyleGAN generator and the predictive mapping network to build the reverse model, the problem of poor attack efficiency and performance in the existing technology is solved, and efficient and accurate reverse model reconstruction is achieved. , which improves the security evaluation of the target model.
Patent Information
- Application Number
- CN202410809839.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-21
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2044-06-21
AI Technical Summary
Existing model reverse attack methods are difficult to achieve a balance between attack efficiency and performance, resulting in high computational costs and poor reconstructed image quality, and cannot effectively evaluate and optimize the security of the target model.
Using a black-box model inverse reconstruction method based on decoupled spatial alignment, the inverse model is built through the StyleGAN generator and the predictive mapping network, and the adaptive loss and reconstruction loss are used to train latent encoding and image encoding to achieve efficient mapping from prediction vectors to images. And improve attack performance through weighted integration and confidence adjustment.
It significantly improves the quality and accuracy of the reconstructed image of the reverse model, reduces the computational cost, and improves the security performance evaluation capability of the target black box model. The generated image has high visual quality and naturalness, and the attack process is efficient and effective.
Smart Images

Figure CN118644728A
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of image processing and machine learning, and in particular relates to a black box model inverse reconstruction method based on decoupled space alignment. Background Art
[0002] In recent years, with the continuous development of artificial intelligence technology, deep neural networks (DNNs) have been widely used in various scenarios such as finance, healthcare, and autonomous driving. Although DNNs have achieved great success in downstream tasks, the collection of training data inevitably involves private and sensitive personal information. Malicious people can launch various attacks on DNNs to steal users' private information, which may pose a serious threat to users' privacy, especially sensitive information such as face images. Among them, model inversion attack is a representative privacy attack paradigm for reconstructing the training data of the target model. Once the attacker obtains access to the target model and output, he can attack the facial recognition system and reconstruct sensitive facial images used to train the target model. By studying the inversion attack method, the security, adversarial resistance, fairness, and optimization degree of the target model can be evaluated and studied in turn, so as to optimize the target model. This is an important work in this field.
[0003] In existing methods, model inversion attack is mainly regarded as an optimization process, that is, searching in the input space to find the accurate eigenvalue with maximum likelihood under the target model. In the task of model inversion attack, many early works modeled the above search problem as an optimization problem and adopted optimization-based methods, such as Figure 1 As shown in (a), different optimization strategies are used to optimize the reconstructed image, but the optimization-based method needs to be repeated in each attack process, which ignores the high computational cost of the optimization process and the query-restricted scenario in reality. Another pioneering work LB-MI first adopted a training-based method, such as Figure 1 As shown in (b), a "mirror" model of the target model is trained as the inverse model, and the attack process can be completed with only one forward inference. However, due to the simple model structure of LB-MI, it does not learn decoupled and generalized image features, making the quality of the final reconstructed image far inferior to that of the optimization-based method. In general, the current methods do not achieve a perfect balance between attack efficiency and attack performance, which is not conducive to performance evaluation and optimization of the target model. Summary of the invention
[0004] The purpose of the present invention is to propose a black box model inverse reconstruction method based on decoupled spatial alignment, reduce the computational cost of the inverse model, improve the image reconstructing ability of the inverse model, and further improve the ability to evaluate the security performance of the target black box model.
[0005] The technical solution adopted by the present invention to achieve the above-mentioned purpose is as follows:
[0006] A black box model inverse reconstruction method based on decoupled spatial alignment includes the following steps:
[0007] Construct a training set based on public datasets and synthetic data from the StyleGAN generator, which includes images and prediction vectors generated by the target model;
[0008] A prediction mapping network is added before the pre-trained image encoder to form a p2w encoder, and the p2w encoder and StyleGAN generator form an inverse model;
[0009] The inverse model is trained by the training set. The prediction mapping network of the p2w encoder and the image encoder generate the alignment W according to the prediction vector + The StyleGAN generator reconstructs the image based on the generated latent code and calculates the reconstruction loss. The training goal is to minimize the total loss composed of the adaptive loss and the reconstruction loss.
[0010] The prediction vectors generated by the target model for the target identity are weighted integrated to generate a representative latent code, and the trained inverse model is used to reconstruct the image of the target identity based on the latent code.
[0011] Furthermore, the steps of constructing a training set based on the public dataset and the synthetic data of the StyleGAN generator include:
[0012] The public image is input into the target model to generate a prediction vector. The image and the corresponding prediction vector form a data pair and are annotated with a category label. For each category, the first n images that are judged by the target model to have the highest confidence score are selected. A training set is constructed based on the first n images and the corresponding prediction vectors.
[0013] The prediction vector for the image generated by the target model is input into the StyleGAN generator to reconstruct the image; for each category, the first n reconstructed images that are judged by the target model to have the highest confidence score are selected; the first n reconstructed images and the corresponding prediction vectors are added to the training set as training data.
[0014] Furthermore, the formula for calculating the adaptive loss is:
[0015]
[0016] in represents the adaptive loss, represents the prediction mapping network, represents the i-th image sample of category c in the training set, represents the corresponding prediction vector.
[0017] Furthermore, the reconstruction loss includes pixel-level loss, perceptual loss, multi-layer identity loss and face parsing loss.
[0018] Furthermore, the formula for calculating pixel-level loss is:
[0019]
[0020] in represents pixel-level loss, G θ represents the StyleGAN generator, represents the p2w encoder, represents the i-th image sample of category c in the training set, represents the corresponding prediction vector.
[0021] Furthermore, the formula for calculating the perceptual loss is:
[0022]
[0023] in represents the perceptual loss, F represents the feature extractor, G θ represents the StyleGAN generator, represents the p2w encoder, represents the i-th image sample of category c in the training set, represents the corresponding prediction vector.
[0024] Furthermore, the formula for calculating the multi-layer identity loss is:
[0025]
[0026] in represents the multi-layer identity loss, R represents the pre-trained ArcFace network, and R j represents the j-th layer feature of the ArcFace network, G θ represents the StyleGAN generator, represents the p2w encoder, represents the i-th image sample of category c in the training set, represents the corresponding prediction vector.
[0027] Furthermore, the formula for calculating the face parsing loss is:
[0028]
[0029] in represents the face parsing loss, P represents the pre-trained face parsing model, and P jrepresents the j-th layer feature of the face parsing model, G θ represents the StyleGAN generator, represents the p2w encoder, represents the i-th image sample of category c in the training set, represents the corresponding prediction vector.
[0030] Furthermore, the formula for weighted integration of the prediction vector is:
[0031]
[0032] Where W c ′ represents the integrated latent code, Represents the prediction vector Latent coding in W+ space.
[0033] Furthermore, the prediction vector for the target identity is enhanced by an interpolation operation, including the following steps:
[0034] The prediction vector on the target dimension c Perform an interpolation operation and increase the value of a hyperparameter m so that the confidence score of the target dimension is changed from the original confidence score becomes
[0035] The confidence scores of all prediction vectors of non-target dimension k are adjusted to ensure that the sum of the confidence scores is 1. The adjusted confidence scores are:
[0036] The technical effects achieved by the present invention are:
[0037] 1. Improve reconstruction performance: By adopting a network structure with a decoupled latent space as the inverse model, it is possible to explore low-dimensional manifolds in the decoupled latent space, which enables higher generalization ability in the semantics of the target identity, thereby significantly improving the quality and accuracy of the reconstructed image.
[0038] 2. Efficient attack process: Different from the traditional optimization-based method, the present invention trains an inverse model from prediction vector to image, so that the attack process only requires one forward reasoning to complete, avoiding the high computational cost and query limitation problems in reality.
[0039] 3. Semantically continuous face embedding: By aligning the distribution of the prediction vector with the decoupled latent space W+ in StyleGAN, we are able to provide semantically continuous face embeddings, which makes the generated images not only visually high-quality but also maintains the continuous changes of facial attributes, increasing the naturalness and authenticity of the generated images.
[0040] 4. Enhanced feature alignment: Multiple loss functions (such as pixel-level loss, perceptual loss, identity loss, and face parsing loss) are introduced during the training process to ensure the visual and semantic similarity between the reconstructed image and the real image, further improving the accuracy and identity consistency of the reconstructed image.
[0041] 5. Prediction ensemble attack: In the attack phase, the characteristics of the target identity are enhanced by weighted integration of the top-n prediction vectors of the target identity, making the generated image more representative. This integration method can integrate the target attributes contained in different public data and improve the effectiveness of the attack.
[0042] 6. Confidence Adjustment Strategy: By adjusting the confidence score of the prediction vector, the characteristics of the target identity are explicitly enhanced while keeping the sum of the confidences to 1. This strategy ensures that the generated image gradually visually approaches the appearance of the target image and reveals more private information. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 is a schematic diagram of existing optimization-based and training-based methods.
[0044] Figure 2 It is a schematic diagram of the black box model inverse reconstruction method based on decoupled spatial alignment.
[0045] Figure 3 It is a flow chart of the black box model inverse reconstruction method based on decoupled spatial alignment.
[0046] Figure 4 is a visualization of the connection between the distribution of prediction vectors and the latent space.
[0047] Figure 5 It is a predictive integrated attack analysis and enhanced predictive vector analysis diagram.
[0048] Figure 6 It is a visualization effect diagram. DETAILED DESCRIPTION
[0049] In order to make the various technical features and advantages or technical effects in the above technical solutions of the present invention more obvious and easy to understand, they are described in detail below with reference to the accompanying drawings.
[0050] The embodiment of the present invention specifically proposes a novel black box model reverse reconstruction method. Figure 2 As shown in the figure, by learning the mapping from the prediction vector to the W+ space and then to the image space, the distribution of the prediction vector is aligned with the decoupled W+ space in StyleGAN to construct the face image in a continuous and fine-grained manner. This prediction-latent code-image scheme can explore low-dimensional manifolds on the W+ space, providing semantically continuous face embeddings with high generalization ability on the target identity.
[0051] like Figure 3 As shown, a novel black box model inverse reconstruction method based on decoupled space alignment proposed in an embodiment of the present invention is mainly divided into three stages. The first is the data selection stage, in which the top n images with the highest probability corresponding to each target identity in the public data set are used to form a training set. Secondly, in the training stage, a pwi inverse model is proposed, which can map the prediction vector to the W+ space of StyleGAN, and then map it to the image space. The model consists of a p2w encoder and a StyleGAN generator. In order to better align the prediction vector space and the latent space W+ of StyleGAN, a prediction mapping network of an image encoder is proposed. Finally, in the attack stage, a prediction integration attack scheme is proposed, so that the most representative images on the face manifold can be classified as the target identity through the evaluation model.
[0052] (I) Data selection stage:
[0053] In this stage, a public dataset is prepared for training tasks. The data distribution of the public dataset is different from that of the private dataset and there is no identity overlap with the private dataset. Input into the target model T to obtain the prediction vector The data pairs are formed and labeled with their category labels. Specifically, for each target identity, a subset with a preset number of images is selected, which are considered by the target model to have the highest confidence score, that is, the images most likely to be the target identity. Then the images in the subset are sorted according to the target dimension (that is, the attribute dimension), and the top-n images and corresponding prediction vectors are selected to form a public dataset D pub In addition, since the synthetic data of StyleGAN corresponds to the real potential code in the W+ space, the synthetic data is subjected to the same above operation as the public dataset to form the same number of top-n images for each category, and these images and the corresponding prediction vectors are added to D pub Finally, D pub It can be expressed as D pub The overlapping facial attributes (e.g., hair color, facial features, etc.) between public and private images are preserved, implicitly narrowing the search space.
[0054] (II) Training phase:
[0055] In response to the high cost and low efficiency of optimization-based methods, this method aims to train an inverse model from prediction vectors to images, which can reconstruct images of any given identity through simple forward propagation during the attack phase. Intuitively, an image of a certain identity usually consists of a set of feature attributes (for example, the uniqueness of the target's facial edges, eyes, and nose shapes), which are located in a continuous and disentangled manifold space. Therefore, the present invention refers to the GAN inverse framework, which consists of an image encoder E that encodes the real image into W+ space and a pre-trained StyleGAN generator G. The goal of the StyleGAN generator inversion is to train an image encoder E given a real image x. ψ :X→W + , where x∈X and w∈W + , the image encoder can make the output The pre-trained StyleGAN generator retains the ability to generate high-resolution images with various styles and random details, and reconstructs images by representing visual attributes with different latent dimensions in a more decoupled W+ space. In the model inversion attack task, the present invention hopes to learn the mapping from the prediction vector to the latent space of StyleGAN and then to the image, and further align the distribution of the prediction vector with the deconstructed decoupled W+ space, so as to establish a connection between the prediction vector and the semantic facial attributes. It is also hoped to enhance the representative semantics of the target identity by explicitly manipulating the latent space through the input prediction vector. Therefore, the present invention proposes a p2w encoder from the prediction vector to the W+ space The p2w encoder is composed of a prediction mapping network and pre-trained image encoder That is, in the existing GAN inverse framework, a prediction mapping network is added before the pre-trained image encoder E The inverse model is composed of the p2w encoder and the StyleGAN generator, which has and enhances the ability to reconstruct images based on prediction vectors through training.
[0056] When the inverse model is processed, the prediction vector first passes through the prediction mapping network Convert to image size dimensions and then pass through a pre-trained image encoder Mapping to W + space. This alignment ensures that a suitable latent code w is obtained. In addition, the p2w encoder will learn more decoupled and general image features and will find feature attributes corresponding to the target identity, revealing more private information. Finally, the target image is reconstructed by a fixed pre-trained StyleGAN generator.
[0057] To train the p2w encoder, we first apply a pixel-level loss commonly used in image reconstruction tasks: It can be formulated as:
[0058]
[0059] in, Yes D pub The i-th image sample of class c in, represents the corresponding prediction vector.
[0060] In addition, a perceptual loss is adopted to constrain the perceptual similarity between the reconstructed image and the real image:
[0061]
[0062] Among them, F is the feature extractor.
[0063] For identity consistency, multi-layer identity loss and face parsing loss are introduced:
[0064]
[0065]
[0066] Among them, R is the pre-trained ArcFace network, P is the pre-trained face parsing model, and R j is the j-th layer feature of the ArcFace network, P j It is the j-th layer feature of the face parsing model.
[0067] To further ensure the alignment of the prediction space and W+ space and enable the mapping network to adapt to the pre-trained image encoder, the adaptive loss is formalized as:
[0068]
[0069] In short, the overall loss function can be expressed as:
[0070]
[0071] (III) Attack Phase:
[0072] The attack phase uses the inverse model to reconstruct the image using the prediction vector generated by the target model, thereby attacking the target model, so that the security of the target model can be evaluated and optimized. In the attack phase, the adversary can only use one-hot prediction labels, which is inconsistent with the input prediction vector of this method. So in order to solve this problem, this method proposes a prediction integration attack scheme. Intuitively speaking, if a picture is classified as a target identity, it must contain some characteristic facial attributes of that identity. This prediction integration attack scheme can help integrate the target attributes contained in different public data. Based on this, a weighted integration is performed on the prediction vectors corresponding to the first n images of class c:
[0073]
[0074] Among them, W c ′ represents the integrated latent code, express Latent codes in W+ space. Therefore, the integrated latent codes contain more features of the target identity and thus enable good reconstruction.
[0075] To demonstrate the connection between the distribution of prediction vectors and the latent space, Figure 4 It is visualized in (to avoid involving personal privacy information, the present invention has specially masked the face image when illustrating it), where △ represents interpolation, the second row of numbers represents the L2 distance of the latent code after the reconstructed image and the target image are integrated, Wtarget represents the latent code of the target image in the W+ space, and the third row of numbers represents the classification accuracy of the image. Specifically, a public image (classified as the target identity) is selected, and its prediction vector is interpolated along the target dimension (the dimension where the target identity is located) (while keeping the sum of the vectors to 1), thereby obtaining multiple interpolated prediction vectors, and then obtaining the corresponding reconstructed image. Obviously, as the interpolation dimension increases, the reconstructed image gradually approaches the visual appearance of the target image, which shows that the inverse model of the present invention aligns the distribution of the prediction vector with the latent space well, rather than simply mapping a single vector to a fixed image. This is reasonable because facial attributes should change gradually in a continuous facial manifold.
[0076] By changing the prediction vector along the target dimension, the semantic properties of the corresponding identity (such as the enlarged part of the mouth and eyes) can be gradually changed. Therefore, considering the search continuity of StyleGAN's latent space, this interpolation operation is performed on the top-n prediction vectors of the target identity, adding m to the target dimension to explicitly enhance the top-n prediction vectors of the target identity:
[0077]
[0078] Among them, m is a hyperparameter that represents the increased probability value.
[0079] To ensure that the total confidence score is 1, the value of each non-target dimension is further subtracted from m in proportion to the value of the non-target dimension, and adjusted to:
[0080]
[0081] Among them, S k (·) is the confidence score on dimension k (k≠c).
[0082] After the above processing, n new prediction vectors are finally obtained, which are then input into the trained inverse model to reconstruct the image, thereby realizing the attack on the target model.
[0083] Experimental test:
[0084] 1. Datasets: Experiments were conducted on three face datasets: CelebA, FaceScrub, and PubFig83. CelebA consists of 202,599 face images belonging to 10,177 identities, of which 30,027 images of 1,000 identities are used as a private dataset. FaceScrub consists of 106,863 face images with 530 identities, of which 200 are randomly selected as a private dataset. For PubFig83, 50 of the 83 identities are randomly selected to form a private dataset. Specifically, FFHQ and synthetic data are used as public datasets for training.
[0085] 2. Target model: For fair comparison, target models with different architectures are used, and VGG16, ResNet-152, and Face.evoLVe are selected as target models. It is widely used in related works to evaluate the performance of inverse model reconstruction methods.
[0086] 3. Evaluation indicators: Attack Acc, K-nearest neighbor distance (KNN Dist), feature distance (FeatDist) and learning perceptual image patch similarity (LPIPS) are used as evaluation indicators. Attack Acc evaluates the accuracy of the reconstructed image to the target identity by evaluating the classifier, and is considered to be a substitute for human judgment. Both KNN Dist and Feat Dist use the features of the layers before the fully connected layer in the classifier to calculate the similarity between the reconstructed image and the target identity at the feature level. LPIPS evaluates the perceptual similarity between the reconstructed image and the target identity image, which is more in line with human perception.
[0087] 4. Experimental Results: Our method (ours) is compared with several state-of-the-art baselines in different settings, specifically, the white-box methods GMI, KED-MI, and PLG-MI, which are considered as upper bounds, as well as the black-box methods LB-MI, MIRROR, and RLB-MI, and the label-only method BREP-MI.
[0088] As shown in Table 1, the attack results of the proposed method and other baselines under distribution changes are compared.
[0089] Table 1 Attack effects of different methods on dataset transfer settings
[0090]
[0091] From the test results in Table 1, we can see that (1) the method of the present invention achieves the best performance in distribution transfer among the three datasets. The reason is that the more disentangled W+ space of StyleGAN allows the prediction vector to represent the target identity with common features, showing excellent generalization ability. (2) The training-based method LB-MI shows poor attack accuracy and visual quality, which is also consistent with its inverse model structure and less semantic facial features. (3) The fewer the number of categories in the private dataset, the higher the attack accuracy. The reason is that the fewer the categories, the fewer facial features they contain, so it is easy to select images with high confidence scores for all categories in the public dataset. (4) The method of the present invention also excels in KNN Dist, Feat Dist and LPIPS, which is consistent with the attack accuracy and shows better visual quality.
[0092] As shown in Table 2, the results of attacking different model architectures using the target models and evaluation models provided by other works.
[0093] Table 2 Attack effects of different methods on different target models
[0094]
[0095] From the test results in Table 2, we can see that (1) for all model architectures, the attack accuracy of the proposed method is always higher than other baselines. (2) The attack accuracy of the proposed method on all model architectures is almost comparable to that of the white-box method KED-MI, and even exceeds all other methods in all visual indicators, showing the superiority of the proposed method.
[0096] 5. Ablation Experiments: To evaluate the contribution of the proposed loss term, the model is trained by removing each component individually and the results are shown in Table 3.
[0097] Table 3 Ablation experiment (the impact of different loss terms)
[0098]
[0099] From the test results in Table 3, we can see that (1) Configuration A eliminates the pixel reconstruction loss on real images during training, that is, it is only applied to synthetic images, which leads to poor attack effects, indicating that using pixel reconstruction loss on real images may be too strict. (2) Configuration B represents Guaranteed Mapping Network It can better adapt to the image encoder, as well as better extract features and align with W+ space. (3) Configuration C verifies that LPIPS loss greatly improves the performance, especially the perceptual quality of the reconstructed image, while configuration D shows that the performance decreases when adding multi-scale LPIPS loss. The reason is that multi-scale LPIPS loss is not suitable for the inversion process from prediction to image. (4) Configurations E and F show that identity loss and parsing loss can better preserve the original identity of the reconstructed image, thereby further improving its perceptual quality.
[0100] In addition, this experiment comprehensively studies several mechanisms of the proposed encoder and shows the results in Table 4.
[0101] Table 4 Ablation experiment (the impact of different mechanisms of p2w encoder)
[0102]
[0103] As can be seen from Table 4, (1) Configuration G adds the feature prediction F branch to the baseline and causes a decrease in attack accuracy, indicating that the F branch disrupts the inverse process. (2) Configuration H randomly initializes the image encoder. Although the perceptual quality is slightly better than the baseline of the present invention, it exhibits poor attack performance. (3) In configuration J, this experiment further evaluates the structure of the prediction mapping network and replaces it with a fully connected layer, which leads to a decrease in attack accuracy, partly due to the overfitting of the fully connected layer. (4) In configuration K, this experiment also replaces the full p2w encoder with a fully connected layer. The decrease in attack performance indicates that a well-designed encoder can align the prediction distribution with the latent space.
[0104] 6. Predictive integrated attack analysis: Figure 5 Figures (a)-(c) show the attack performance of four variants on three private datasets: a single private prediction vector, a single public prediction vector, integration on private prediction vectors, and integration on public prediction vectors. The private prediction vector is only assumed for experimental analysis, which is not available in the attack stage. The experimental results show that it is still difficult to achieve high attack accuracy using a single prediction as input, even with a high confidence score. The reason is that reconstructing a high-dimensional image from a low-dimensional probability vector is inherently challenging, and even a high-confidence low-dimensional probability vector loses a lot of information about the target identity. The more disentangled properties of the W+ space in StyleGAN make integrated latent coding an effective way to make up for the above shortcomings. Figure 5Figure (d) further verifies the impact of the proposed encoder by comparing with the image integration strategy. Specifically, the top-n public image set classified as the target identity is directly input into the pre-trained image encoder to reconstruct the image. It can be seen that if the latent code in the W+ space and the feature tensor in F are weighted, the attack performance will degrade and the reconstructed image shows a blurred face. One possible reason is that the weighted integration of the feature tensor will damage the integrity of the features. In addition, by keeping the input unchanged and only integrating the latent code in the W+ space, the results show that the attack accuracy is improved, but there is still a gap with the baseline.
[0105] 7. Enhanced prediction vector analysis: e.g. Figure 5 As shown in Figure (e), the attack performance is compared by adding different values m to the target dimension of the public prediction vector. When m = 0, it means that no operation is performed on the public prediction vector. As m increases, the maximum dimension value of the public prediction vector also increases, and the attack performance also improves. However, if m continues to increase (from 0.035 to 0.1), the value of the vector may change too drastically, and the changed prediction will deviate from the original distribution, resulting in a significant drop in performance.
[0106] 8. Visual Analysis: Figure 6 The test results of different methods are shown (to avoid involving personal privacy information, the present invention has masked the face image in the illustration). Compared with other baselines, the reconstructed image of the present invention is obviously more realistic and has higher resolution quality. This once again confirms that StyleGAN has excellent representation ability and provides some feature representation for reconstruction.
[0107] Although the present invention has been disclosed as above by way of embodiments, it is not intended to limit the present invention. Appropriate modifications or equivalent substitutions of the technical solutions of the present invention made by ordinary technicians in the field should all be included in the protection scope of the present invention. The protection scope of the present invention shall be based on what is defined in the claims.
Claims
1. A black box model inverse reconstruction method based on decoupled spatial alignment, characterized in that: The following steps are involved: Construct a training set based on public datasets and synthetic data from the StyleGAN generator, which includes images and prediction vectors generated by the target model; A prediction mapping network is added before the pre-trained image encoder to form a p2w encoder, and the p2w encoder and StyleGAN generator form an inverse model; The inverse model is trained by the training set. The prediction mapping network of the p2w encoder and the image encoder generate the alignment W according to the prediction vector + Spatial latent encoding and computing adaptive loss; The StyleGAN generator reconstructs the image based on the generated latent code and calculates the reconstruction loss. The training goal is to minimize the total loss consisting of the adaptivity loss and the reconstruction loss. The prediction vectors generated by the target model for the target identity are weighted integrated to generate a representative latent code, and the trained inverse model is used to reconstruct the image of the target identity based on the latent code.
2. The method according to claim 1, characterized in that The steps to construct a training set based on public datasets and synthetic data from the StyleGAN generator include: The public image is input into the target model to generate a prediction vector. The image and the corresponding prediction vector form a data pair and are annotated with a category label. For each category, the first n images that are judged by the target model to have the highest confidence score are selected. A training set is constructed based on the first n images and the corresponding prediction vectors. The prediction vector for the image generated by the target model is input into the StyleGAN generator to reconstruct the image; for each category, the first n reconstructed images that are judged by the target model to have the highest confidence score are selected; the first n reconstructed images and the corresponding prediction vectors are added to the training set as training data.
3. The method according to claim 1, characterized in that The formula for calculating the adaptive loss is: in represents the adaptive loss, represents the prediction mapping network, represents the i-th image sample of category c in the training set, represents the corresponding prediction vector.
4. The method according to claim 1, characterized in that The reconstruction losses include pixel-level loss, perceptual loss, multi-layer identity loss, and face parsing loss.
5. The method according to claim 4, characterized in that The formula for calculating pixel-level loss is: in represents pixel-level loss, G θ represents the StyleGAN generator, represents the p2w encoder, represents the i-th image sample of category c in the training set, represents the corresponding prediction vector.
6. The method according to claim 4, characterized in that The formula for calculating perceptual loss is: in represents the perceptual loss, F represents the feature extractor, G θ represents the StyleGAN generator, represents the p2w encoder, represents the i-th image sample of category c in the training set, represents the corresponding prediction vector.
7. The method according to claim 4, characterized in that The formula for calculating multi-layer identity loss is: in represents the multi-layer identity loss, R represents the pre-trained ArcFace network, and R j represents the j-th layer feature of the ArcFace network, G θ represents the StyleGAN generator, represents the p2w encoder, represents the i-th image sample of category c in the training set, represents the corresponding prediction vector.
8. The method according to claim 4, characterized in that The formula for calculating face parsing loss is: in represents the face parsing loss, P represents the pre-trained face parsing model, and P j represents the j-th layer feature of the face parsing model, G θ represents the StyleGAN generator, represents the p2w encoder, represents the i-th image sample of category c in the training set, represents the corresponding prediction vector.
9. The method according to claim 1, characterized in that The formula for weighted integration of the prediction vector is: Where W′ c represents the integrated latent code, Represents the prediction vector Latent coding in W+ space.
10. The method according to claim 1, characterized in that The prediction vector for the target identity is augmented by an interpolation operation, which includes the following steps: The prediction vector on the target dimension c Perform an interpolation operation and increase the value of a hyperparameter m so that the confidence score of the target dimension is changed from the original confidence score becomes The confidence scores of all prediction vectors of non-target dimension k are adjusted to ensure that the sum of the confidence scores is 1. The adjusted confidence scores are:
Citation Information
Patent Citations
Real image reconstruction method based on potential space embedding expansion
CN113947550A
Method for reconstructing laser depth map in turbid water body based on deep learning
CN115713552A
Cross-domain black box model reverse attack method
CN115759190A
System and method for mimicking a neural network without access to the original training dataset or the target model
US20190370665A1
Cited By
Network anomaly detection method and device based on data augmentation
CN119788306A
