{'fraction_non_alphanumeric': 0.02312297845984447, 'fraction_numerical': 0.004679650402587571, 'mean_word_length': 4.938700449530037, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Membership Model Inversion Attacks for Deep Networks

With the increasing adoption of AI, inherent security and privacy vulnerabilities formachine learning systems are being discovered. One such vulnerability makes itpossible for an adversary to obtain private information about the types of instancesused to train the targeted machine learning model. This so-called model inversionattack is based on sequential leveraging of classification scores towards obtaininghigh confidence representations for various classes. However, for deep networks,such procedures usually lead to unrecognizable representations that are uselessfor the adversary. In this paper, we introduce a more realistic definition of modelinversion, where the adversary is aware of the general purpose of the attackedmodel (for instance, whether it is an OCR system or a facial recognition system),and the goal is to find realistic class representations within the corresponding lower-dimensional manifold (of, respectively, general symbols or general faces). To thatend, we leverage properties of generative adversarial networks for constructinga connected lower-dimensional manifold, and demonstrate the efficiency of ourmodel inversion attack that is carried out within that manifold.


Introduction
The last decade witnessed a rapid and significant progress in developing and applying deep learning techniques. At the same time, various concerns about security of deployed machine learning models have increased as well. It has been already shown [11] that a small visually imperceptible perturbation of an image can cause a deep neural network classify it incorrectly and with high confidence. Besides these adversarial attacks, another type of security threats in the form of membership attacks was discovered recently: it was shown [10] that an adversary can identify if a given sample was used during the training phase of the targeted machine learning model, thus endangering the privacy of training data. Yet another type of privacy threat is model inversion attack: it has been shown [3] that an adversary can recover typical representations of specific target classes by leveraging confidence scores of machine learning model. So far, model inversion attacks have been mostly successful against shallow machine linear models such as SVM and logistic regression; however, for deep neural networks, model inversion attacks usually return but unrecognizable solutions [10] that are useless for the adversary.
In this paper, we focus on the white-box model inversion attack where the adversary has access to the model and attempts to generate representative data similar to training instances (we call them representative samples) of individual classes. In the most general form of model inversion attack, there is no additional information about the type of the problem that the targeted model is trained to classify. This, however, appears to be an excessively strict assumption since the adversary would have no way to interpret the multi-dimensional solution vector that can be obtained as a result of such attack. Instead, we assume the adversary has some general knowledge of the problem, and we exploit that general information in order to guide the search for representative samples. For instance, the attacker might know that the input is an image with specific dimensions that is used by the targeted machine learning application such as optical character recognition (OCR) or facial recognition. This is a rather realistic assumption since the attacker have to know how to interpret the model inputs. The model inversion goal is thus to learn specific details of the system such as what individual symbols are used for the targeted OCR application or what faces can be correctly identified by the targeted facial recognition security application.
The direct search in the (very) high-dimensional input space (i.e., without any additional knowledge about the problem) is usually an ill-posed problem [7]. However, with additional information about the problem, we can constrain the search to a smaller-dimensional manifold that likely contains the training data. According to the manifold assumption theory [13], many data sets belong to a group of disconnected low-dimensional manifolds. However, if these manifolds can be linked with each other, we can search in the resulting connected manifold. Given that the adversary knows the general type of problem, an appropriate generative adversarial network (GAN) can also be generated, which would model a connected manifold structure [6]. For example, the manifold can be generated to attack an OCR system by creating a GAN using characters from various languages and sets of symbols; for attacking a facial recognition system, a diverse set of faces can be downloaded from Internet. By connecting the output of the GAN to the input of the model, various optimization techniques can be used to search for manifold instances that maximize label confidence values.

Method
A Generative Adversarial Network, introduced by [4], is a min-max game between two neural networks: generator (G θ ) and discriminator (D φ ). The generator G θ takes random noise z as input and generates G θ (z). The discriminator D φ distinguishes between real samples (x) and fake samples coming from G θ . The objective function for the min-max game between G θ and D φ is In (1), P x is the real data distribution, and P z is a noise distribution which is typically a uniform distribution or a normal distribution.
Previous research has shown that real images have probability distributions (P x ) on low-dimensional manifolds [13] embedded in a high-dimensional space. Intuitively, sufficiently different images should belong to their own disconnected manifolds without any paths of "blended" images between them. However, in case of a GAN, the generator function maps from a connected distribution space, like the uniform distribution, to all possible outputs, which results in a connected output set of instances. This is a typical drawback of GANs and various techniques to partition the input into disjoint support sets have been used [6] to address this issue. However, our approach actually leverages this drawback in order to search in the low-dimensional but connected latent space of the GAN set instead of the high-dimensional space P x of all possible images. Details of our approach are presented in Appendix.
A direct solution of model inversion problem without the use of the GAN can be formulated as follows. Let f δ be the target neural network which is being attacked and y be the one-hot encoding vector representing the class, whose representative sample needs to be recovered. Let where λ is a regularization hyperparameter and R(x) is a regularization term which can be the p norm of the image. We modify this standard formulation in the following way to directly search in the latent GAN space:ẑ = arg min The final solution for the representative sample is given bŷ Equation (3) can be solved using any quasi-Newton method like gradient descent or adaptive learning rate methods like Adam.

Experiments
In our experiments, we assume general knowledge of the underlying machine learning system. For example, if an attacker targets an OCR system for determining what specific symbols the system was trained on, then a dataset comprising various characters can be constructed first and then used to train a GAN for creating a connected manifold structure (the constrained search space) from which representative samples of the target model will be recovered. We performed our preliminary experiments on two datasets: (1) Numeric MNIST with Arabic MNIST, and (2) Fashion MNIST Dataset [12]. In our experiments, we used a 2-layer feed-forward neural network with ReLU activation for the target model; for constructing the connected manifold, we used both standard GAN with feed-forward networks and DCGAN [9].

Dataset 1: Numeric MNIST and Arabic MNIST
In this case, the targeted deep neural network f δ has been trained with a subset of MNIST (namely 6 classes out of 10 classes). We curated a dataset comprising of numeric MNIST (10 classes) and Arabic MNIST (10 classes), which we used to train a GAN in order to create the connected manifold for the search procedure according to (3). The task is to identify representative samples from the 6 classes with which f δ was trained. Figure 1 shows the results obtained using an optimization search in the full image space. As expected, in this case, no representative samples were found. In contrast to Figure 1, Figure 2 shows some of our results obtained using our GAN-based technique: they can be clearly viewed by the adversary as reasonably representative samples of the attacked classes.

Dataset 2: Fashion MNIST
In this set of experiments, we train a deep neural network with a subset of Fashion MNIST [12], namely 5 classes out of 10; more details on this dataset are presented in Appendix. We assume we have knowledge about all different types of clothes and footwear and, using the complete Fashion MNIST dataset, we construct the connected manifold using a GAN. The attack objective is to identify representative samples from the 5 classes on which the model was trained. Figure 3 illustrates the successful recovery of its classes using our approach.

Effect of Regularization and High Order Terms
We further used the p norm regularization to improve the quality of the images. With p regularization, we solved (3) and evaluated our results for p ranging from 1 to 6. However, in our experiments we observed that regularization did not seem to affect the quality of retrieved samples in comparison to no regularization. We also report the results pertaining to the impact of high-order loss approximations in the Appendix.

Conclusion
Without knowledge of the underlying machine learning system, especially for deep neural networks, the model inversion problem is ill-posed and the attack yields unrecognizable and unusable images with high confidence values. However, with some natural knowledge about the underlying target system, an attacker can use our GAN-based approach for retrieving representative and recognizable samples of individual classes.
We have also identified several promising research directions based on our current work. One direction is to consider ways to exploit the connected space of GANs. Current research on GANs shows that it is possible to generate interpretable images that are not clearly related to the training data. For example, GANs can be used to generate realistic faces [5] that were not part of the training data. For applications such as facial recognition, this can be useful to create a constrained GAN space to search. Even if a specific face from the training data is not present in the data the adversary uses to create the GAN, the resulting connected GAN space, with its rich set of faces, might contain a face sufficiently close to the face that was used to train the original machine learning model.
Another research direction is to consider ways to develop a robust defense against model inversion attacks without affecting the model accuracy. This could be challenging since model inversion does not deal with protecting any particular instance, so the defense must protect all the representative images that are part of the manifold used for training. Standard techniques such as differential privacy [2] will be difficult to apply since they focus on protecting specific finite sets of data. Instead, it might be useful to train a more complex classifier that has a larger set of classes that can obscure the original ones. For example, a security-based facial recognition system could classify a much larger set of faces so that the faces that are actually relevant to security verification are effectively hidden like a needle in a haystack. The key problem here is to maintain adequate classifier accuracy as the number of classes increases. where x + δx is a stationary point for (x + δx): Although the computation of the Hessian will be expensive for (8), it can be solved efficiently using a conjugate gradients which uses a Hessian-Vector formulation. HVP can be efficiently solved using the Pearlmutter's formula [8]. However, based on our experiments, the second order term did not help in improving the representations, as shown in Figure 4.

Lipschitzness of the Generator of the GAN
In this section, we describe the connected manifold space of the GAN and show how the connected structure helps in transition from one image to another. Our analysis is similar to [1], where we assume that the the generator is bounded. If the generator (G) is Lipschitz, we can show that there is unused space in the latent space which corresponds to images outside of the true manifold. If the generator is β-Lipschitz, for any two points in the range of the generator and belonging to two different and distinct manifolds, we have Essentially, (9) describes how fast the transition can take place from one manifold to another. We denote the two manifolds as P and Q and the true probability distribution as P x . For any two points p ∈ P and q ∈ Q, The minimum distance between two points in manifolds P and Q will be Replacing (10) in (9), we obtain the following inequality: This inequality shows that there will be a certain amount of unused space when we are transitioning from one manifold to another. This space could be thought of as a tunnel between different manifolds. These transitioning tunnels help to recover images in the training set, by searching in the latent space. Otherwise, if the latent space is disconnected, then optimizing (3) would not result in the representative images, as there would be no possible transition from one manifold to another in the latent space.

Fashion MNIST
Fashion MNIST dataset [12] comprises of 10 classes of different type of clothing, footwear, etc. We trained our target deep network with a subset of the classes(5 out of 10) and then performed a search in the latent space of the GAN which has been trained on all the classes. Figure 5 shows the results for model inversion without any assumption of background knowledge. Without prior knowledge, the retrieved samples are extremely noisy and are unrecognizable to the human eye. However, these noisy images produce a high-confidence score for the target class. Figure 3 and Figure 6 show the retrieval of representative training samples with background knowledge about the system.