{'fraction_non_alphanumeric': 0.03283451739137737, 'fraction_numerical': 0.01264674761928755, 'mean_word_length': 4.899336173585653, 'pattern_counts': {'":': 0, '<': 3, '<?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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Anti-Neuron Watermarking: Protecting Personal Data Against Unauthorized Neural Networks

We study protecting a user's data (images in this work) against a learner's unauthorized use in training neural networks. It is especially challenging when the user's data is only a tiny percentage of the learner's complete training set. We revisit the traditional watermarking under modern deep learning settings to tackle the challenge. We show that when a user watermarks images using a specialized linear color transformation, a neural network classifier will be imprinted with the signature so that a third-party arbitrator can verify the potentially unauthorized usage of the user data by inferring the watermark signature from the neural network. We also discuss what watermarking properties and signature spaces make the arbitrator's verification convincing. To our best knowledge, this work is the first to protect an individual user's data ownership from unauthorized use in training neural networks.


Introduction
Recent advances in machine learning techniques have put personal data at significant risk. For example, in the scandal of "Cambridge Analytica" [45], millions of users' data are collected without consent to train machine learning models for political advertising. To protect personal data and privacy, there have been some legislations in place, such as Europe General Data Protection Regulation [12] (effective in May 2018), California Privacy Act [2] (effective in January 2021), and China Data Security Law [40] (effective in July 2021). They often require that personal data should be "processed lawfully, fairly and in a transparent manner" and can only be used "adequately, relevantly and limited to what is necessary in relation to the purposes ('data minimisation')" [12]. However, there is a lack of methods for detecting personal data breaches from machine learning models, which have increasingly become the primary motivation for a violator to break a user's data ownership because the models' efficacy heavily depends on data.
This paper studies personal image protection (PIP) from unauthorized usage in training deep neural networks (DNNs). The need for PIP arises when users expose their images to digital products and cloud services. In the era of big data and deep learning, a critical concern is that DNN learners may violate users' intents by using their data to train DNNs without authorization. It becomes worse when the DNN models consequently leak private user information [1,10,33,37]. However, how can ordinary users know whether their images, which could be a tiny portion of the DNN learner's complete training set, have been used to train a DNN model?
Traditionally, PIP aims to prevent a user's images from duplicating, remixing, or exploiting (e.g., for a financial incentive) without the user's consent and relies on digital watermarking [5,23,29,42,49,54]. The digital watermarking enables a user to imprint images with unique patterns, such as signatures, logos, or stamps, to track and identify unauthorized copies of their pictures.
However, the rise of data-dependent deep learning poses another need for PIP, namely, protecting a user's images from unauthorized use in training DNNs. Could watermarking still fulfill this need?
One inspiring observation is that some DNNs do "memorize" certain training examples [1,9,10] in various ways, offering a user an opportunity to watermark their images to make them memorizable by the DNNs. We say this watermarking scheme is "anti-neuron" because its objective is to facilitate a third-party arbitrator to verify a DNN's use of a user's images in training and then hold the DNN learner accountable. However, we have to resolve two questions to make this anti-neuron watermarking work in practice. What watermarks make a user's images memorizable by DNNs? How can the third-party arbitrator verify that the user's images were indeed part of a DNN model's training set? To answer the above questions, we first use Figure 1 to formalize the antineuron watermarking for PIP against unauthorized DNN learners. First, a user watermarks images using a private signature before sharing them with the public (e.g., social media). An unauthorized learner then collects the user's watermarked images, along with images from other sources, to construct a training set to train a DNN image classifier. Finally, the user turns to a third-party arbitrator to check whether their images were used to train the DNN model. The arbitrator tries to recover the user's private signature for watermarking from the DNN model and the user's original images with no watermark -crucially, the arbitrator does not use the user's private signature to recover it. The arbitrator concludes that the user's images were part of the DNN's training set if the user's private signature can be recovered without knowing it in advance.
This paper proposes an empirically effective approach to the anti-neuron watermarking, and we leave more rigorous analyses to future work. In particular, a linear color transformation (LCT) in the hue space can be effectively used as a watermarking method. The resultant images remain as appealing as the original ones visually, so the unauthorized learner would not detect this type of watermark. Moreover, the LCT method is resilient to standard image augmentation techniques used in training neural models. Finally, we show that a DNN classifier indeed tends to memorize the LCT watermarking using extensive experiments. The arbitrator's verification method is simply iterating over the signature space, watermarking the user's original images using each signature, and returning the signature that reaches the lowest DNN classification loss.
In summary, our main contribution is to formalize the problem of user-focused anti-neuron watermarking for personal image protection from unauthorized usage in training DNNs. Moreover, we propose the LCT watermarking for ordinary users and a straightforward verification method for the third-party arbitrator, demonstrating a successful anti-neuron watermarking scenario for PIP. Additionally, we raise some critical questions for furthering the study of PIP against DNN learners: 1) What types of watermarking can imprint DNNs the best, especially when a user's watermarked images are only a tiny part of the training set? 2) What makes the imprinting of DNNs possible? Is it the DNN's memorization of training examples? 3) How can a trustworthy arbitrator recover a user's private watermark from DNN and the user's unwatermarked images? 4) How can anti-neuron watermarking work for multiple users? To the best of our knowledge, this work is the first to protect an individual user's data ownership from unauthorized use in training neural networks.

Related Work
Watermarking is a long-standing technique to declare ownership of objects. It can be traced back to paper marking [28] at 1282 in Italy, where a watermark was created via changing the thickness of the paper. Digital watermark is later introduced by [42] to code an undetectable digital watermark on gray scale images. Yu et al.
[49] train a neural network for watermarking to embed hidden information in images. El et al. [8] add digital watermarks to video frames with neural networks. Zhong et al. [54] propose an automated and robust image watermarking based on deep neural networks. Recently, watermarking is used to protect the intellectual property of machine learning models [15,31,34,52]. These techniques follow similar ideas as trojan attacks [25] or backdoor attack [14], where models are trained with constructed samples to learn objective behaviors.
The most relevant works to this paper are dataset tracing and membership inference. Dataset tracing [24, 27, 35] protects the intellectual property of a dataset by appending traceable watermarks on data samples. Sablayrolles et al. [35] use pretrained model on a dataset itself to generate "radioactive data" to carry the class-specific watermarking vectors in high dimensional feature space. If a learner uses the "radioactive dataset" for training, the model's classifier would become more aligned with the watermarking vectors and thus can be used as an evidence of unauthorized usage. This kind of watermarking requires a pretrained model trained with the whole dataset. However, as such prior knowledge about the entire training data is unavailable for a common user, this kind of technique would be less applicable in real PIP scenarios.
Membership inference determines if a certain sample is inside a target dataset. Inference attack was first proposed for the attack and defense on medical datasets where users' medical records are extremely sensitive. By comparing genomic data with the statistical information of the training dataset, the presence of certain users can be inferred by attackers [17]. Shokri et al.
[37] later introduce membership inference attack (MIA) into machine learning models. MIA trains a binary classifier to predict membership, on top of several shadow models being trained with the same data distribution as training. Alternatively, Yeom et al. [47] use the average of training error as the threshold to perform MIAs. Sablayrolles et al. [36] improve this threshold with Bayes optimal classifier to search for the best threshold using samples from both training and testing.
As MIAs determine whether given data samples belong to a training set or not, it is tempting to perform MIAs for personal data protection. However, similar to dataset tracing, as the training data distribution is unknown for common users, neither shadow models [37] nor threshold [36,47] can be obtained and existing MIA methods fail to work in protecting personal data.

Problem Statement
Consider image classification as a case study without loss of generality. Denote by D u the set of personal images owned by a common user u. Assume D u is unique and distinguished among identifiable users, as defined in GDPR [12]. Suppose the user u plans to expose D u online, e.g., by sharing them on social media. For the purpose of avoiding potential breach of personal data proprietary, the user watermarks images with a secret signature k * before sharing them on social media. Denote by D * u the set of watermarked images carrying the signature k * . An unauthorized learner may use the user's data D * u , along with many others', to construct a training set D to train a DNN classifier f without acquiring the user's permission. It is reasonable to assume that the user's data D * u is only a small portion of the whole training set D and the user u does not have any prior knowledge about the other users' data.
Let g ∈ G denote a watermarking method and V be a neutral third-party verification method that infers the user's private signature for watermarking without knowing it before. The arbitrator determines whether the user's personal images have been used in the training of neural classifier f as follows, where the user's watermarked images D * u = g(D u , k * ), g ∈ G. Namely, if the arbitrator can recover the user's private signature, she/he concludes that the user's images were part of the training set for learning the classifier f .

The Anti-Neuron Watermarking Method
Recent studies show that DNNs can "memorize" some training examples in various ways [1,9,10], and one can recover certain meaningful low-resolution images from DNNs [10]. Hence, it is tempting to conduct verification by recovering the user u's images from the neural classifier f . However, there are many challenges with this approach. First of all, the model f may memorize some training images but not this user u's. Moreover, even if the model happens to memorize some of this user's images, the recovery success rate is likely low. Existing methods (e.g., [10]) can recover semantically meaningful images from some DNNs, but they do not resemble any exact training images, to the best of our knowledge. Finally but not the least, the method in [10] incurs high computation cost, often by many iterations of gradient descent, and assumes that the DNN classifier f is a white box, disclosing its architecture and parameters.
An alternative approach to leveraging DNNs' memorization capability is to check a DNN's loss over a set of training images. Arguably, if the DNN model has memorized a majority of this set of images, the loss should be low. Following the above reasoning, we let a user u watermark her/his images D u using a private signature k * so the user has full control and knowledge of her/his watermarked images D * u . This watermarking method eases the third-party arbitrator's job; instead of trying to recover the exact training images, the arbitrator can now search for the watermarking signature that leads to the lowest DNN loss, if the DNN model has memorized many images in D * u watermarked by user u.
Properties for Effective Watermarking. Formally, a user u chooses an antineuron watermarking function g ∈ G and generates the watermarked images as We discuss the necessary properties needed to make a good anti-neuron watermarking function. The key is to make the watermarked images, and hence the signature, memorized by DNNs. First, the watermarking function g should preserve an image's original content. For example, for a user portrait or selfie, g should not change its identity. Besides, the watermarking function g should be resilient to common image augmentations used to train DNNs. The private signature should survive after the learner applies common image augmentations.
Furthermore, the space K of watermarking signatures should be large and preferably bounded, such that the probability of an innocent classifier coincidentally matching the user signature is low, while the signature can be inferred efficiently during verification.
Linear Color Transformation. Based on the discussion above, we propose Linear Color Transformation (LCT) as our anti-neuron watermarking. Color provides a large signature space for images. Our watermarking function exploits hue transformation and uses the hue adjustment of images as a signature. Thanks to the sufficiently big hue space, the user's randomly chosen signature is likely different from other users' signatures. Moreover, the randomly chosen signature lifts the user images to a low-density region, making the resultant images be easily memorized by DNNs -according to Feldman's studies on memorization [9] and our experiments in Section 5.6, DNNs tend to memorize images of low-density regions.
Concretely, we first convert the RGB color space into the YIQ color space [44] by the following matrix: In the YIQ color space, hue is represented by two dimensional coordinates, forming a chromaticity diagram. As a result, watermarking images with signature k will be conducted by rotating the hue at an angle θ k with the following matrix, where θ k = kπ 180 . Hence, for every pixel Making LCT more versatile. An immediate extension to LCT is to make the color transformation matrix T YIQ specifiable by users. A user chosen color transformation T u can further enrich the watermarking signature space. We leave this extension to future work.

The Verification Method
We let a third-party arbitrator independent of the user and DNN learner determine whether the user's images were part of the DNN training set. The arbitrator has to infer a signature from a suspicious DNN classifier f and the user's original, unwatermarked images D u without using the private watermark signature k * . If the inferred signature matches the user's private one, we say that the DNN classifier is highly likely trained using the user's images D * u . Assume that the watermarking function g(I, k * ) does not change the image's class label. Let y denote the class label of image I ∈ D u . We design a simple yet effective approach to recovering the watermarking signature: where L is a loss (e.g., cross-entropy) for learning the DNN classifier f , and K is the collection of all possible signatures. If the inferred signature matches the user's private one,k ≈ k * , the arbitrator concludes that the DNN learner has used the user's images D * u = {g(I, k * ), ∀I ∈ D u } as part of the training set for DNN f . Otherwise, the DNN learner is likely innocent.
The Signature Space K. It is important to discuss the success rate of the above verification method. Apparently, the signature space K should be sufficiently large to reduce the probability of an innocent classifier coincidentally matching a user's watermarked images. For the analysis purpose, we discretize the bounded signature space K into N equal-sized, non-overlapped slots, each with an interval 2τ . We say the recovered signaturek matches the private one k * when |k − k * | < τ . Reserving one slot for no watermarking, the number of valid watermarking signatures is N − 1. Clearly, the larger N is, the more convincing the verification.
Some readers might wonder what if there is a large number of users. For example, given 1 million users but a small number N of signatures, would this setting fail the proposed anti-neuron watermarking? The answer is a pleasant no because, importantly, two users could choose the same private watermarking signature as long as their personal images are different, though the chance of using the same signature is low because each user independently chooses a signature. What happens when a user chooses not to watermark her/his images? A welltrained neural classifier should generalize well under the training distribution. Hence, if most training images are not watermarked, given the user's original unwatermarked data, the recovered signature from the well-trained classifier would approach no watermarking.
It is not necessary to have enormous N to avoid users having duplicated private signatures based on the above discussion. However, a sufficiently large N is still preferred for another reason, DNNs' memorization. Only when N is big, the chance becomes high for a user to watermark her/his images into a low-density region and hence can be memorized by DNNs.
A large signature space also benefits the memorization of user signatures. According to the study [9] on memorization, deep neural classifier must memorize atypical examples to perform well on the less frequent examples during inference.
Since watermarking shift data distribution via signature from a large space, watermarking is highly likely to lift user images into lower density region and thus being better memorized by neural models.
Optimization Method and Computational Cost for Signature Inference. To solve eq. (6) efficiently, we propose two optimization methods. (i) Grid search : the arbitrator can enumerate all signatures for watermarking and perform grid search over the bounded signature space with a linear computational cost as O(N ). If the signature is well memorized by a DNN, the DNN loss will reach minimum when the signature being evaluated equals or closely approximates the private signature used by the user. (ii) Gradient search: when the model is accessible, the arbitrator can watermark clean images with a random initial watermark signature and then infer the user's signature by descending along the gradient of training loss with respect to the signature. This technique infers the watermark signature more precisely than grid search and the computational cost might be less for a large N .

Setup
We evaluate the proposed watermarking in image classification on the Cifar-10 / Cifar-100 [3], CUB birds [43] and Tiny ImageNet [20] datasets. A User Watermarks Their Personal Data. A portion of randomly chosen images from a training set (by default, 1% for Cifar and 0.1% for Tiny ImageNet) is defined as a user' personal data. The user data could contain samples from any class. Each user image is watermarked using eq. (5) by a given signature in the space of [30, 60, ..., 330], followed by clipping pixel values to the valid range of [0,1]. By default, we use 60 (i.e., rotating hue by 60 degree) as the signature. A Learner Trains Neural Classifiers Using Unauthorized User Data. An unauthorized learner trains neural classifiers using the above watermarked user data along with other training data. Images are randomly cropped, horizontal flipped, and normalized following the common data augmentation practice [16,22]. We use ResNet50 [16] as the default neural classifier and train every model from scratch for 90 epochs. The initial learning rate is 0.1 and decays by 0.1 for every 30 epochs. A Verifier Infers The Watermark Signature. Given suspicious neural network models, a third-party verifier infers the user's signature following two approaches discussed above. For grid search, we iterate over all candidate signatures generated by dividing the whole signature space into N = 12 intervals whose length is 2τ = 2 × 15. For gradient search, we exploit gradient descent to learn the signature. To avoid local optimum, multiple initial values are used and the best signature that leads to the lowest loss is returned.

Analyzing Effectiveness of Watermarking
We first show empirically how signatures are memorized by the neural classifiers. Here, we consider a single user watermarking their data for simplicity. (See Appendix for other experiments and the gradient search results.) 1. Different Numbers of Watermarked Samples. We study how many images are desired for making anti-neuron watermarking successful. The grid search result is shown in Figure 2 (a, b, c) using eq. (6). It is visually clear that most of the models achieve the minimum loss near the watermark signature, within the range of matching |k − k * | < τ . However, with less watermarked data (e.g., less than 5 samples), the inferred signature with minimum loss does not match the user's private signature. 2. Different Watermark Signatures. We verify whether different watermark signatures work equivalently. We experiment with different signatures on one user's data and show the grid search results in Figure 2 Figure 2g, all inferred signatures match the user's, implying that our watermarking approach works well against a large variety of deep neural networks. 4. Different Learning Capacities of Models. We further investigate whether a model memorizes watermark signatures better when the model has more learning capacity (e.g., more parameters, deeper or wider) by exploring the ResNet family. As shown in Figure 2h, as the networks go larger and deeper, the loss decreases faster and reaches the minimum around the watermark signature more sharply. 5. High Resolution Images. In Figure 2i, we present our result on CUB-200-Birds, a fine-grained dataset with high-resolution images of 448 × 448. We use pretrained ResNet50 from ImageNet and conduct a transfer learning on CUB-200-Birds. The dataset has fewer than 6000 images for training, and we assume the user has 60 images (1%) for watermarking. Strong data augmentations [48] are used to boost performance, including color jitter, random crop, random resize, random scale and random horizontal flip. Even under the strong data augmentations and the transfer learning setting, the result shows that ResNet50 memorizes the user's signature well.

Analyzing Properties of Watermarking
We then evaluate how the properties discussed in Section 4.1 would help antineuron watermarking.  Resilience to Data Augmentation. We evaluate if our anti-neuron watermarking is resilient against various common data augmentations, especially those involving random hue transformations. We apply random crop and random horizontal flip in all our experiments following [16,22]. Besides, several widely adopted data augmentations including random cutout [6], label smoothing [41], Gaussian noise [4], adversarial training [26] and differential privacy [7] are evaluated. Finally, we test color jittering [22], which includes brightness, saturation, contrast and the same hue transformation we used for watermarking. As shown in Figure 3, the watermark signatures can be inferred correctly for the aforementioned data augmentations. This shows empirically that LCT is an effective anti-neuron watermarking approach because it is resilient to common data augmentations in neural networks' training. We also evaluate privacy preserving techniques such as differential privacy [7]. Since we infer the signature using all user images, noise added to the output would be reduced by taking an average.
Beside, we also consider two common defense techniques against watermarking: pruning and fine-tuning. We follow common settings [53] and find in Figure 3g and Figure 3h that LCT is also resilient to these defense methods. Less Noticeable Watermarking. In Section 4.1, we discuss the watermarking should not change the major content of an image, and one of the desired features is to make watermarking unnoticeable to human. Rather than changing the hue of images globally, we study an alternative technique from traditional watermarking proposed in [49]. It adjusts the blue channel's intensity on preselected pixels. In this work, we adjust the intensity as a watermark signature on 512 randomly selected pixels. As shown in Figure 4, the general appearance of watermarked images are less noticeable than changing the hue globally (adjusting hue for 4096 pixels by 60). For τ = 0.1 and watermark signatures (the blue channel's intensity), 0.1, 0.3, 0.5, 0.12, 0.28, 0.44 are used in inference on selected pixels, matching the user's watermark signature. However, this kind of watermarking has its limitation. It introduces noise to images, and the images could look noisy when the color themes are dominated by red or green. To solve this problem, we may find some transformations that are invisible to humans but easy to learn by neural classifiers. We leave this challenge to future work.

Analyzing Signature Space for Verification
In Section 4.2, we discuss how the signature space could affect watermarking from the perspective of a third-party verifier. Here, we show experimentally how to have a trustful signature space for a convincing verification. When User Data Was Not Used to Train Neural Classifiers. From previous experiments, we show that the inferred signature matches a user's private watermark signature if the user's watermarked data have been used in training. Here we show the inferred signature approaches no watermarking when the user data was not used for training. To this end, we construct held-out users using auxiliary unseen data from validation. Pretrained models from Figure 2f are used to infer signature from the held-out users. Not surprisingly, the inferred signatures approach 0 (no watermarking) for the held-out users, with |k − 0| = 4.3 ± 1.4.
Multiple Users with User-specific Watermarking Signatures. We examine multiple users for several scenarios. The training set of Tiny ImageNet is equally divided into 1,000 users. Then we evaluate the effectiveness of watermarking for different ratio of users exploiting the same LCT (eq. (3)) or different LCTs. For the later, we sample 3 × 3 matrices from a uniform distribution T u ∼ U(−1, 1) per user. Each user chooses a random signature from [30, 60, ..., 330], and τ is set to 15. From the result shown in Figure 5a, we can observe that when 20% of users watermark their images using LCT, their watermark signatures can be inferred correctly for almost all the users. As this ratio increases, the matching accuracy drops significantly if the users use the same LCT. However, if they use different LCTs, the matching accuracy remains above 80% even when all users data are watermarked independently. We also evaluate a special case when an adversary infers signatures using an arbitrary LCT. The arbitrary LCTs (T u ′ ∼ U(−1, 1)) only achieve 10% matching accuracy, which is 70% less when LCTs are given. Such results indicate users can use unique and user-specific watermarking for a better protection rate when other users may also exploit watermarking.

Comparisons with Related Methods
Comparing to Membership Inference Attacks. We compare our antineuron watermarking (ANW) with two threshold-based membership inference attacks (MIAs): In MIA-std [47], few samples are known in violator's training set and their average training loss would be used as threshold ϵ to infer membership (if L t < ϵ, target sample t is in training, vice versa.); In MIA-pow [36], few samples in training and held-out together determine a better threshold.
There are 3 scenarios making MIAs not applicable for PIP. (i) as a user has no knowledge about the violator's training distribution, MIAs cannot be applied as neither shadow models nor threshold can be obtained. (ii) Users could train shadow model using their own data and perform MIAs via shadow models [37], but MIAs would not work well because shadow models trained with user data would produce a much larger loss than the learner' models. Consequently, if a threshold is chosen from shadow models trained with user data, held-out sample would be misclassified as "in training" because the learner's model would produce smaller loss for both "training" and "held-out" samples. Here we compare MIAs by creating 10 users with individual data. 10 shadow models are trained respectively and MIA-std is performed with the threshold of average training loss. For ANW, 10 users data are watermarked with different signatures. Under different settings for user data size, we find out that ANW achieves 100% matching accuracy while MIA-std achieves 50% (misclassify all held-out samples). Figure 5b shows how the threshold from shadow models fails to classify sample membership for the learner. Similarly, MIA-pow along with other MIAs [27,37] relied on shadow models would also fail in this settings. (iii) At last, even if a user acquires all necessary information, the MIA results would still be less convincing. As MIAs only provide binary output (True/False), it is difficult to convince the verifier when random guess can still achieve about 50% success rate. To quantifiably and fairly compare with MIAs, we extend the classic membership advantage [46] into protection advantage (adv P ) considering both accuracy and fidelity: The adv P metric quantifies quality of protection through the expectation gap between the empirical successful inference (P e ) and successful random guess (P r ). Note that the membership advantage [46] is a special case of adv P metric when the second term is 0.5. For a Bernoulli experiment, the above formula could be calculated as M −N p N , where M is the total matches in N experiments and p is the probability of a correct random guess. With above metric, we conduct comparison between our watermarking and two threshold-based MIAs [36, 47] (See appendix for experiment settings.). As shown in Figure 5c, our ANW significantly outperforms the MIA approaches under the adv P metric with both accurate and convincing inference, showing that watermarking is a feasible method in the PIP problem.
Comparing to Dataset Tracing [35]. Dataset tracing [35] exploits pretrained classifier to generate traceable data. If neural classifier learns such dataset, the decision boundary of classifier would become more aligned with watermarking vectors (i.e., cosine similarity becomes higher). In Table 1, we compare this approach [35] with ours when only 0.1% data being watermarked. For dataset tracing, it is computed by the classifier's weight vector and the watermarking vector. And for our method, it is computed by inferred and user watermarking signatures. The experimental results show that it is easier to memorize low dimensional signatures as our watermarking method lifts the cosine similarity significantly after training with tiny portion of watermarked data.

Improving Memorization by Watermarking
Finally, we explore empirically why watermarking is effective against neural classifier by revisiting "Memorization Value Estimate" (MAE) [9]. MAE measures the generalization gap (difference of prediction between models trained with/without certain data) to quantify the memorization ability of neural networks toward such data. A higher MAE after watermarking indicates the model tends to memorize watermarked data than original data. For user data, we observe the MAE increases from 26.8% to 34.8% after applying watermarking, indicating that our approach increases memorization of user data and thus the signature would be easier memorized along with user data.

Conclusion
In this paper, we introduce a new personal data protection problem against unauthorized neural model training. To protect user personal data, we propose an anti-neuron watermarking approach based on linear color transformation. By watermarking user's images with private signature using LCT, unauthorized usage of user personal data can be verified by a third-party neutral arbitrator.
Through extensive experiments, we show empirically that LCT-based watermarking is effective in protecting user data from unauthorized usage in a various realistic settings. Acknowledgements: this work was supported in part by NSF-1704309 and NSF-1952792.

A Background
In the following sections, we present the background knowledge of personal data protection problem studied in our paper. We first quote the legislative definition of "personal data protection" from GDPR [12] and then we discuss the scope of our problem comparing to general data protection. Finally, some "data proprietary" problem are addressed in personal data protection. Definitions of Terms from GDPR. To help readers better understand the terms we used in the manuscript, we quote several term definitions from [12] as following: "Personal data means any information relating to an identified or identifiable natural person ('data subject')." "Third party means a natural or legal person, public authority, agency or body other than the data subject, controller, processor and persons who, under the direct authority of the controller or processor, are authorised to process personal data." "Consent of the data subject means any freely given, specific, informed and unambiguous indication of the data subject's wishes by which he or she, by a statement or by a clear affirmative action, signifies agreement to the processing of personal data relating to him or her." "Personal data breach means a breach of security leading to the accidental or unlawful destruction, loss, alteration, unauthorised disclosure of, or access to, personal data transmitted, stored or otherwise processed." From above definitions, we show the basic idea of GDPR: a legislation approach to protect users personal data from being utilized by third-party without users' consent. More details of GDPR and similar laws can be found online [2, 12,40]. In our paper, we focus on the technical perspective of personal data protection by exploiting anti-neuron watermarking to verify unauthorized usage of user's personal images. Personal Data Protection v.s General Data Protection. As our goal is to protect "Personal Data" (i.e. user data shall be related to identifiable natural person [12]), we assume each user's personal images can be distinguished from the others. This assumption differs "personal data protection" from "general data protection" problem, where a user's data are not necessarily to be identified from other users'. In "general data protection", our anti-neuron watermarking would be less applicable. Because neural models learn both watermarked and unwatermarked data, the inferred signature would be a signature value between the watermarked and unwatermarked. We leave this challenge for future studies. "Data proprietary" in Personal Data Protection. One traditional usage of digital watermarking is to protect data proprietary. To verify proprietary, the space of watermarking signature needs to enormous such that each signature (i.e., a hand-writing signature) can be considered as a unique identifier for user data. However, in our problem settings, our protection focuses on verifying unauthorized usage (i.e., without "consent") of user data (images that user already has "data proprietary" on) instead of verifying data proprietary. Since the low-dimensional signature is only used to verify unauthorized usage of images, our signature space does not need to be as large as "data proprietary" problem. Readers might be curious what if adversary exploits user's watermarking function and reverts a signature on arbitrary images that leads to minimal loss of arbitrary neural models. Can adversary accuse data privacy breach for these models? Can adversary claim ownership of these arbitrary data? The answers are no. According to our previous analysis on signature space, the signature inferred on arbitrary images is highly likely to be no watermarking, a signature value excluded from valid watermarking signatures. On the other hand, adversary cannot claim data propriety on arbitrary data as they cannot prove that the data are legally "relating to" adversarial users.

B Preliminary Study
Verification by Recovering Watermarking Pattern. Recent studies show that DNNs can "memorize" some training examples in various ways [1,9,10], and one can recover certain meaningful low-resolution images from CNNs [10]. Motivated by these studies, we perform a preliminary study on traditional watermarking technique by appending a special pattern (e.g., a sticker) on images. We train a ResNet50 on 100 randomly selected user samples with a cat pattern as watermark in Tiny ImageNet. Similar to model inversion [10], we use a learnable Gaussian variable on users' images and minimize the classification loss to reconstruct watermark pattern with this variable.
As shown in Figure 6, although the reconstructed pattern can achieve 100% accuracy and minimal classification loss, neural models cannot memorize such watermark pattern, as no meaningful pattern can be recovered. We believe that this could be caused by convolution operation where all spatial information of pixels are being ignored during training. This experiment indicates that it is difficult for neural learners to memorize such kinds of watermarks, comparing to the watermarks using color-based transformation.

C Implementation Details
Datasets. We evaluate our anti-neuron watermarking on Cifar [3], Tiny Im-ageNet [20] and CUB-200-Birds [43]. Cifar are widely adopted datasets with 50,000 training samples, 10,000 testing samples for 10 and 100 classes, respectively. Tiny ImageNet is a selective subset of ImageNet, containing 100,000 training samples, 10,000 validation samples and 10,000 testing samples for 200 classes. Each sample is 3 × 64 × 64. Since testing labels are not publicly available, we report models' validation accuracy for models' performance. CUB-200-Bird is a high resolution 448 × 448 fine-grained dataset containing 200 bird species, with 5994 training samples and 5794 testing samples. Watermark User Data. Each user image is watermarked by given 3 × 3 LCT function with a signature k followed by a pixel value clipping. A clipping is needed because LCT could cause overflow on some pixels' values. The clipping operation in theory will break the differentiable property of watermarking function and thus hinder gradient based optimization (e.g., stochastic gradient decent). However, we find empirically that this operation does not affect signature inference. Hence, we conduct clipping after the LCT in all our experiments. Data Preparation. For training, each image is first converted from [0, 255] to [0, 1], and watermarked if it belongs to the user whose images need to be protected. Then data augmentation and normalized are applied to improve training. During signature inference, each image is converted from [0, 255] into [0, 1], then watermarked and normalized. The normalization mean and variance of RGB channels are (0.5, 0.5, 0.5) and (0.5, 0.5, 0.5) for Cifar, (0.485, 0.456, 0.406) and (0.229, 0.224, 0.225) for Tiny ImageNet and CUB-Birds, respectively. Grid Search Settings. We iterate all the possible signatures in our grid search experiments. The signatures are generated by dividing the whole signature space into N × 2τ intervals. Gradient Search Settings. During signature inference, we recover signature using unwatermarked user data. These user data are combined into one minibatch and stochastic gradient decent is used for optimization over signatures. The initial learning rate is 0.1 and decays 0.1 each 100 epochs, with 300 epochs in total. To avoid local minima, we select initial values from all possible signatures and report the signature that lead to minimal loss. Comparing to grid search, this optimization approach is much more computational expensive and thus our results will be mainly on grid search for simplicity. Source Code. Our experimental source code will be publicly available (code is available in supplementary folder). All our experiments are implemented by Pytorch. Readers can freely explore our proposed watermarking approach with the code supplied.

D Additional Results for Effectiveness of Watermarking
Gradient Search Results. In the main manuscript, we present the results for grid search in various settings. Here, we show the additional gradient search results on Tiny ImageNet.
1. Different sizes of Watermarked Samples. We first present our result with different sizes of watermarkred samples in Table 2. Being trained by classifier, user's watermarked images achieve lower loss than the clean images.
And watermarking does not affect classification performance for getting similar testing accuracy. These results show that given sufficient data, neural classifier could memorize watermark signature on user's data pretty well.

E Additional Results for Watermarking Properties Analysis
In this section, we provide more details of our experiments on analyzing the properties of watermarking.
Resilience to Data Augmentation. Here, we present our settings to evaluate if our proposed watermarking method could survive under common data augmentations used in neural models' training. The following data augmentations are evaluated: . Random crop is a widely used data augmentation for most neural models' training [16,22,38,48]. It randomly crops images into smaller resolution to reduce models' overfitting on spatial location. For Tiny ImageNet, images are randomly cropped into 64 × 64 with a padding of 8. For Cifar, images are randomly cropped into 32 × 32 with a padding of 4. All our training includes random crop for best performance. 2. Horizontal Flipping [22]. This is also a widely used data augmentation for image classification. We include horizontal flipping for all our experiments.
3. Cut Out [6]. Cutout removes random region of size M × M from images at each training iteration. We set the size M = 8 for our experiments. 4. Label Smoothing [41]. Label smoothing is also a widely used data augmentation in many tasks [30]. It reduces the probability of ground truth label (e.g., 100% cat, 0% dog, 0% duck) by a smoothing parameter α and assigns probability uniformly to other classes (90% cat, 5% dog, 5% duck). The smoothing parameter α is set to be 0.1 in our experiments. 5. Gaussian Noise [4]. This technique simply adds noise to the input from a Gaussian distribution N (0, σ 2 ) to increase models' robustness. The σ 2 is set to be 0.1 in our experiments. 6. Adversarial Training [26]. Neural Networks are well known for their vulnerability to adversarial attacks. [13,26], and adversarial training are believed to reduce overfitting [26] and mitigate privacy leakage [19,32]. We address this by training with adversarial samples generated from FGSM attack [13]. The epsilon is set to be 0.01. 7. Differential Privacy [7]. Differential privacy is a wide adopted privacy preserving technique in many real-world applications. By adding noise to the query results, user's sensitive information cannot be inferred via querying. In our implementation, we add random noise samples from Gaussian distribution N (0, σ 2 ) to the output confidence. The σ 2 is set to be 0.1. 8. Color Jitter [22]. Color jitter randomly adjusts brightness, contrast, saturation and hue of input images. We apply high intensity color augmentation in our experiments. For each color properties, the value of adjustment is randomly sampled from [-288, 288], covering 80% of the range of transformation. The same conclusion can be made by comparing Table 3 with Table  6. We further explore on CUB-200-birds with a stronger data augmentation. Watermark signature would fail to be inferred in this case. This observation implies that if models are trained heavily with similar data augmentations as watermarking, the signature inference could be confused by nearby signatures and thus fail to recover the watermarking signatures. In Table 7, watermark signatures can be inferred correctly from gradient search for the aforementioned data augmentations. This shows empirically that LCT is an effective watermarking approach because it is resilient to common data augmentations in neural networks' training.  Table 7. Inferred signatures for models trained with different data augmentations for ResNet50 on Tiny ImageNet.
Less Noticeable Watermarking. In the previous sections, we show that LCTbased watermarking is effective against unauthorized neural learners, but may change the color property significantly in visualization, as illustrated in Figure 7. One may argue that such a kind of watermarking could be too visually obvious to be recognized by unauthorized neural learners. However, given data samples, by selecting proper watermarking signature, the watermarking could be difficult to be distinguished from stylish transformation or even unnoticeable to human being. For example, nowadays users would often apply image filters to stylize images before publishing on social media, where filters are quite natural such as tuning the color of tree leaves from green to yellow, changing the color of sky from light blue to dark blue. The parameters of these images' filters could be used as signature for watermarking. As stylized filters are widely used, it would be difficult for neural learners to distinguish whether it is watermarking or users' preference.   Color-based transformation can be less noticeable when it is only applied on selective pixels and color channels. In particular, by following [49], we first generate a random binary string w with a fixed length T , and then generate pseudo-random pixels' positions as ρ t = (i t , j t ) for each element w t , (1 ≤ t ≤ T ). Finally we change blue color channel for these pixels as: where α is the hyper-parameter of watermarking intensity and L ρt is luminance of pixel calculated by L ρt = 0.299R ρt + 0.587G ρt + 0.114B ρt .
Different from [49], we use α as the watermark key and pass the pseudorandom pixels' locations and binary string w to the verifier for key inference. Empirically, this kind of watermarking can be memorized by neural learners but less noticeable to human. We present visual comparison of samples in Figure 8 with different value of α. In summary, color-based watermarking can be both effective and unnoticeable with carefully selected watermarking approach and watermark keys w.r.t users' images.
In our paper, we mainly explore LCT as an effective way for anti-neuron watermarking. And we also show recovering watermark pattern fails to work in PIP while other geometrical watermarking can be applicable. There are certainly other watermarking functions that can verify unauthorized neural model training.

F More Discussions on User-specific Watermarking
As we show in previous section, signatures watermarked by user-specific LCTs would be better memorized among multiple users than those watermarked by a single LCT. This observation, on one hand, implies that selecting an arbitrary LCT for watermarking would be a good practice. It also explains why the LCT watermarking could be resilient to Color jitter. As the color transformations are well-defined and constant matrices (the matrices are fixed, the adjustment could be any value), randomly chosen users' watermarking are highly unlikely to be the same as Color jitter and would be easier to survive in data augmentation. On the other hand, it is very unlikely to infer user signatures without knowing the watermarking function as inferring from arbitrary LCTs have similar matching rate as random guessing, which makes it difficult for attackers to find out the users' signatures without knowing their watermarking functions in advance.

G Comparison with Related Methods
Comparing to Membership Inference Attacks. As membership inference attacks (MIAs) determine membership of given data, it is reasonable to consider such methods in personal data protection. However, there are three restrictions preventing MIAs from being applied in real PIP scenarios.
(i) The first restriction is MIAs require prior knowledge of training data, which would be difficult to obtain as a common user. For example, user needs auxiliary data which has the same data distribution and similar data size as training data so that the well-trained shadow models could have similar performance as adversary models [37]. Or users need to know some samples that are in adversary model's training data [47].
(ii) If users exploit their own data and train shadow models to perform MIAs, the success accuracy would still be low. This is because adversary could train a much better models by using much more data than a single user. In this case, the training loss of adversary model would be much less than the users shadow models. As we discussed in the main draft, such performance difference would lead to poor classification accuracy in membership inference.
On the other hand, as neural learner collects data from many others, there are chances that users' data distribution are slightly different (i.e., users watermarking their data in different ways or applying different filters). Under this circumstance, MIAs would possibly perform worse as a single threshold might not work well for heterogeneous users data.
(iii) Last but not the least, even if we assume the verifier obtains such knowledge, the inference results would be unconvincing for an arbitration. As MIAs only produce binary outputs (i.e., True of False), the probability of a correct guess is already 50%. Further, MIAs determine membership by considering data in training must have a small loss. But a small loss of user data can not guarantee user data were used for training. Such a result could possibly be caused by learning similar data rather than the user's.
In summary, MIAs would be less practical than watermarking in personal data protection.
Early studies on MIAs consider watermarking as a special case. In the study [47] on membership inference, they discuss the membership advantage [46] is not necessary if there exists features as a prior knowledge that can be used to distinguish data, (e.g. unique id for each image). This follows same idea of watermarking and verification discussed in the paper. However, [47]'s study does not study what watermarking technique can be used to against neural modeling training. They assume the all users can substitute their original data with an identifier via an arbitrary function G [11] and this substitution would not interfere the embedding identifiers. This might work if neural networks can perfectly memorize every detail of training data, including the identifier. However, as shown in our experiments, this is not true. Different users with the same watermarking function would interfere each other heavily, as neural models can learn the data augmentation during training [51]. One contribution of this paper is to show that LCT is an effective anti-neuron watermarking method against neural model training in various realistic settings.
To justify the above discussions, we first propose a new evaluation metric for protection, which quantifies both inference accuracy and signature space, as discussed in the main manuscript. Then we conduct experiments on two PIP cases where users train their own shadow models and different users exploit different watermarking. To perform MIAs, we assume the verifier obtains the necessary knowledge of training distribution, and compare our watermarking method with two state-of-art MIAs: MIA-std [47] and MIA-pow [36]. The first MIA exploits few samples known from model's training and use the average training loss as a threshold to determine the membership. If the loss of given testing sample is smaller than the threshold, the sample would be used for training. The second method requires extra samples known from the held-out set and find the best threshold for both training and held-out samples.
For the experiment, we follow similar settings in [21] for these two attacks. To compare with watermarking fairly, we conduct MIA on average loss of user data, not data per se, which would increase accuracy of MIAs. In the case when user exploit their own data to perform MIAs, we assume 10 users and each user utilize his/her data to train shadow models and use the knowledge of shadow models to further perform MIAs, respectively; We use MIA-std citeyeom2018privacy as the baseline method and obtain the decision threshold using average training loss from user's shadow models. In the case when users' data distribution are slight different, we randomly split Tiny ImageNet into 1,000 users for training set and 100 users for validation set, with 100 data samples for each user. For MIA-std [47], we randomly select 5 users from training and calculate the average loss as the membership threshold. For MIA-pow [36], we randomly select 5 users from training and 5 user from validation to search for the best threshold. Then we test the inference accuracy on 100 user data samples, with 50 randomly chosen from training and 50 randomly chosen on validation. Note that the testing users would be exclusive from users used for finding threshold.
From Table 8, we show the matching accuracy for MIAs and our method on these testing users. It can be observed that the performance of MIAs will first decrease and then increase as ratio grows. Specifically, when fewer user data are watermarked, the MIAs' threshold would be mainly determined by the unwatermarked users data. Meanwhile, as some user data exploit watermarking, the loss of watermarked data would be lifted, as illustrated in Figure 9, and even if the watermarked samples were used in training, the MIAs would misclassify these samples. The situation would be worst when there are similar amount of watermarking data and unwatermarking data. Such a result show that MIAs would be unstable when user data are heterogeneous.  Table 8. The matching accuracy between membership inference attacks and anti-neuron watermarking. Different ratio of users exploit different LCT for their data. In MIAs, a match would be calculated by binary inference result, but in ANW, a match would imply the correct signature, which would be more difficult because there are 12 signature values in this experiment.
Comparing to Dataset Tracing. Recent studies [24, 35, 52] on dataset protection investigate watermarking against neural training and it is tempting to apply these methods in personal data protection. However, as we discussed in the main manuscript, dataset tracing [24, 35, 52] requires full knowledge of training data, so that they can generate "watermarked data" by exploiting pretrained classifier on the dataset as adversarial training [26]. However, from users' perspective, such prior knowledge would not be sufficient because it is impossible for a common user to know how other data will be collected and what tasks will Fig. 9. Illustration of why MIAs would decrease performance when partial users exploit watermarking. As watermarking function lifts loss of user data, the original MIA threshold calculated by unwatermarked data would misclassify the membership of watermarked data and thus degrades performance. The experiment result for memorization in the main draft verifies the above idea.
be performed. As a result, techniques like dataset tracing [24, 35, 52] can not be directly applied to the PIP scenario. As dataset tracing [35] can be applied on partial data, we compare our method with dataset tracing [35] and verify whether both methods can work well with very limited watermarking data, which is common in the PIP problem. To make dataset tracing work, we pre-train a ResNet50 model on Tiny ImageNet and adopt the same setting as [35] to generate "radioactive data". As shown in the main manuscript, with 0.1% data being watermarked, our LCT method is more effective as we observe that watermarking signature can be memorized well as expected.

H Memorization Analysis of Watermarking
When Signature is being Memorized during Neural Model Training? One interesting problem for watermarking is when a signature is memorized by neural models. From previous studies on MIAs [21,37,39,47], user privacy information is being leak when model's overfitting. As a result, it is likely for models to memorize watermarking signatures when models over-learn the watermarked data [39]. To explore the answer of this question, we infer signatures by grid search for different checkpoints of model during training. In Figure 10, we can observe the inferred signature reaches 0 at early stage of training and gradually reach 60 with more learning epochs. This result illustrates that the watermarking signature could be memorized before the end of training. This empirical results can also explain why data augmentation (watermarking) can be learned by neural models during training, according to the study [51] for neural generalization. Watermarking Increase Memorization of User Data. In the main draft, we mention how to use "memorization value estimate" [9] to study how watermarking improve memorization of user data. As user data is watermarked, the probability density of user data would be lifted into low density region and thus being easier memorized by neural learners. During training process, the watermarking signature would be better memorized along with user data. According to the study [9] on memorization, for training algorithm A on a dataset S = ((x 1 , y 1 ), ..., (x n , y n )), the amount of label memorization by A on example (x i , y i ) ∈ S is defined as, [h(x i ) = y i ].
To estimate above memorization value on sample index at i, [9] firstly selects random subsets for S, with some subsets including sample i and some exclude sample i. Then, K models are being trained using these subsets, grouped into 2, one includes sample i and the other excludes sample i. The memorization value estimate (MAE) is finally calculate by averaging the difference of P r between these two groups of models. In our experiments, we split the training set of Tiny ImageNet into 1,000 users and choose one split as user data (we calculate MAE on a collection user data instead of one sample). Then we randomly use 70% of users data to construct 20 subsets. 20 models are being trained correspondingly to calculate the final MAE. We fix the indices for this experiments and train 20 models with and without watermarking on user data. From the results we show in the main manuscript, the MAE of user data increase after watermarking, indicating that watermarking improves model memorization ability on the given user data.