{'fraction_non_alphanumeric': 0.03198595529673717, 'fraction_numerical': 0.009248950929177015, 'mean_word_length': 4.824064837905237, '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': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
IPGuard: Protecting the Intellectual Property of Deep Neural Networks via Fingerprinting the Classification Boundary

A deep neural network (DNN) classifier represents a model owner's intellectual property as training a DNN classifier often requires lots of resource. Watermarking was recently proposed to protect the intellectual property of DNN classifiers. However, watermarking suffers from a key limitation: it sacrifices the utility/accuracy of the model owner's classifier because it tampers the classifier's training or fine-tuning process. In this work, we propose IPGuard, the first method to protect intellectual property of DNN classifiers that provably incurs no accuracy loss for the classifiers. Our key observation is that a DNN classifier can be uniquely represented by its classification boundary. Based on this observation, IPGuard extracts some data points near the classification boundary of the model owner's classifier and uses them to fingerprint the classifier. A DNN classifier is said to be a pirated version of the model owner's classifier if they predict the same labels for most fingerprinting data points. IPGuard is qualitatively different from watermarking. Specifically, IPGuard extracts fingerprinting data points near the classification boundary of a classifier that is already trained, while watermarking embeds watermarks into a classifier during its training or fine-tuning process. We extensively evaluate IPGuard on CIFAR-10, CIFAR-100, and ImageNet datasets. Our results show that IPGuard can robustly identify post-processed versions of the model owner's classifier as pirated versions of the classifier, and IPGuard can identify classifiers, which are not the model owner's classifier nor its post-processed versions, as non-pirated versions of the classifier.


Introduction
Suppose a model owner trains a DNN classifier and deploys it as a cloud service or a clientside software (e.g., mobile app, Amazon Echo). An attacker could steal or pirate the model parameters of the classifier via malware infection, insider threats, or recent model extraction attacks [33,34,18,26,16,36,15]. The attacker then deploys the pirated classifier as its own cloud service or client-side software. Such attacks violate the intellectual property of the model owner as training a DNN classifier often requires lots of resource, e.g., proprietary training data, confidential algorithm, and computational infrastructure. Therefore, it is an urgent problem to protect the intellectual property of DNN classifiers.
Watermarking is a standard general technique to protect intellectual property and has been widely studied for multimedia data [11]. Therefore, a natural solution seems to apply watermarking to protect intellectual property of DNN classifiers. Indeed, multiple studies [25,4,1,24,7,38,9] have recently extended watermarking techniques to DNN classifiers. Specifically, watermarking embeds a watermark into the model owner's classifier via modifying its training or fine-tuning process. A classifier (e.g., the classifier pirated and deployed by an attacker) is verified to be a pirated version of the model owner's classifier if the same or similar watermark can be extracted from the classifier. For convenience, we call the model owner's classifier and the classifier to be verified target classifier and suspect classifier, respectively. If a suspect classifier is verified to be potentially pirated from the target classifier, then the model owner can take further follow-up actions, e.g., collecting other evidence and filing a lawsuit.
A key limitation of watermarking is that it sacrifices the utility/accuracy of the target classifier because it tampers the training or fine-tuning process of the target classifier. In critical application domains such as healthcare and finance, even 1% accuracy loss is intolerable.
In this work, we propose IPGuard, the first method to protect the intellectual property of DNN classifiers that provably incurs no accuracy loss of the target classifier. Our key observation is that a DNN classifier can be uniquely represented by its classification boundary, which essentially divides the data domain into regions, each of which is predicted to have the same label by the classifier. Based on the observation, IPGuard finds some data points near the target classifier's classification boundary (see Figure 1). Moreover, IPGuard treats these data points (we call them fingerprinting data points) and their labels predicted by the target classifier as a fingerprint for the target classifier. For a suspect classifier, the model owner queries its prediction API to get the labels of the fingerprinting data points. If the suspect classifier and the target classifier predict the same labels for most fingerprinting data points, then the model owner verifies that the suspect classifier is potentially pirated from the target classifier. Unlike watermarking, IPGuard provably incurs no accuracy loss for the target classifier, because IPGuard does not tamper its training or fine-tuning process at all.
We aim to achieve three critical goals, i.e., robustness, uniqueness, and efficiency. An attacker may post-process the target classifier before deploying it, e.g., the attacker may reduce the size of the target classifier via model compression techniques before deploying it on resourceconstrained devices such as mobile phone and IoT device. Therefore, our method should be robust against post-processing, i.e., our method should still verify a suspect classifier if it is a post-processed version of the target classifier. Uniqueness means that if a suspect classifier is not the target classifier nor its post-processed version, then our method should not verify it as a pirated version of the target classifier. Efficiency means that our method should efficiently find the fingerprinting data points for large-scale DNN classifiers.
To achieve robustness and uniqueness, we aim to find fingerprinting data points near the target classifier's classification boundary. We do not use fingerprinting data points on the classification boundary because their predicted labels are not robust against post-processing, and we do not use fingerprinting data points that are far away from the classification boundary because their predicted labels are not unique to the target classifier and its post-processed versions. One way to find such fingerprinting data points seems to use adversarial examples methods, i.e., treating adversarial examples as fingerprinting data points. However, existing adversarial example methods (e.g., [32,8,21,3]) are insufficient because they either find adversarial examples that are far away from the classification boundary or are inefficient. For instance, FGSM [8] can efficiently find adversarial examples but they are far away from the classification boundary. CW [3] can find adversarial examples near the classification boundary but it is inefficient. The key reason is that CW aims to find human imperceptible adversarial examples. In particular, given an initial example/data point, CW aims to search for a minimum noise to turn the example into an adversarial example. Searching for such minimum noise is inefficient.
Therefore, we propose a new method to efficiently find data points near the target classifier's classification boundary. We formulate finding such a data point as an optimization problem. Moreover, we use gradient descent to solve the problem, i.e., we start from an initial data point and iteratively move the data point along the gradient of the objective function. Our method is efficient because, unlike CW, we do not constrain the noise added to the initial data point.
We evaluate IPGuard and compare it with multiple existing adversarial example methods on CIFAR-10, CIFAR-100, and ImageNet datasets. We consider six popular post-processing techniques including 2 variants of fine-tuning, 2 variants of retraining, and 2 variants of model compression, which an attacker may apply to a target classifier to obtain pirated classifiers. On each dataset, we also consider dozens of classifiers, which are not post-processed versions of a target classifier, as suspect classifiers. We propose a new metric to jointly measure robustnessuniqueness tradeoffs. Our results show that IPGuard can verify the post-processed versions of a target classifier as pirated versions of the classifier, and IPGuard does not falsely verify the suspect classifiers, which are not the target classifier nor its post-processed versions, as pirated versions of the target classifier. In other words, IPGuard can achieve robustness and uniqueness simultaneously. Our results essentially indicate that we can find data points near a target classifier's classification boundary such that the predicted labels of these data points are robust against post-processing of the target classifier but are different for other classifiers. Moreover, IPGuard outperforms existing adversarial example methods. For instance, IPGuard and CW [3] can achieve comparable robustness-uniqueness tradeoffs, but IPGuard is orders of magnitude more efficient than CW.
To summarize, our contributions are as follows: • We propose IPGuard, the first method to protect intellectual property of DNN classifiers that provably incurs no loss on the classifiers' accuracies.
• We propose a new method to efficiently find data points near a classifier's classification boundary.
• We propose a new metric to measure the robustness-uniqueness tradeoffs of a fingerprinting method. Moreover, we empirically compare IPGuard with existing adversarial example methods on three datasets.

Watermarking
An attacker could steal or pirate a DNN classifier through various methods. For instance, an insider can steal and sell the DNN classifier to a competitor. An attacker could also compromise the model owner's machine that stores the DNN classifier via social engineering attacks and malware if the machine has system and software vulnerabilities, and then steal the DNN classifier. Moreover, an attacker could also leverage recent attacks [33,34,18,26,16,36,15] (e.g., hardware-based side-channel attacks [16,36,15]) that exploit the unique characteristics of DNN classifiers. Watermarking [25,4,1,24,7,38,9] was recently proposed to protect the intellectual property of DNN classifiers. Specifically, watermarking embeds a watermark into a target classifier during the process of training or fine-tuning the target classifier. A suspect classifier is verified to be a pirated version of the target classifier if the same or similar watermark can be extracted from it.
Depending on how the watermark is embedded into a DNN classifier, we can roughly group watermarking techniques into two categories, i.e., parameter-based watermarking and labelbased watermarking. In parameter-based watermarking [25,4], the watermark is embedded into the model parameters of the target DNN classifier via adding new regularization terms to the loss function during training. Parameter-based watermarking requires white-box access to the model parameters of the suspect classifier in order to verify the watermark. In label-based watermarking [1,24,7,38,9], the watermark is embedded into the predicted labels or neuron activations of certain data points. Specifically, they first pick some data points (e.g., abstract images [1], training data points with extra meaningful content [38]) and assign certain labels to them. Then, they use these data points to augment the training data to learn the target classifier. Given a suspect classifier, they query the suspect classifier to obtain labels of the data points. If the labels predicted by the suspect classifier match those predicted by the target classifier, then the watermark is verified.
Limitation: Watermarking techniques suffer from a key limitation: they inevitably sacrifice utility/accuracy of the target classifier because they require tampering the target classifier's training or fine-tuning process. It is a well known challenge to search for a good DNN architecture that has a high accuracy for a particular task. For instance, on the ImageNet dataset, it took lots of trial-and-error efforts for the computer vision community to search for the DNN architecture called ResNet152V2 [13], which increases the testing accuracy upon the DNN architecture called ResNet152 [12] by 1% [5]. However, watermarking [7] easily decreases the testing accuracy by 0.5% when embedding only 20 watermark data points into an ImageNet model.

Adversarial Examples
Suppose we are given an example/data point and a classifier, where the classifier can correctly predict the label of the example. We can add some carefully crafted noise to the example such that the classifier predicts a label as we desire. The example with carefully crafted noise is called an adversarial example [32]. In particular, we may desire the classifier to predict any incorrect label for the adversarial example (called untargeted adversarial example) or predict a particular incorrect label for the adversarial example (called targeted adversarial example). Many methods (e.g., [8,21,3]) have been developed to construct adversarial examples.
An adversarial example essentially moves an example across the classifier's classification boundary via adding carefully crafted noise to the example. Therefore, it seems a natural choice to use adversarial examples as fingerprinting data points to fingerprint a classifier's classification boundary. Therefore, we review several popular methods [8,21,3]  Fast Gradient Sign Method (FGSM): FGSM [8] is an efficient method to construct adversarial examples. Given an initial example/data point x and a noise bound , FGSM returns the following x as an adversarial example: where C is the classifier, J is the loss function used to train C, y * is the target label we desire for the adversarial example, ∇ x represents gradient, and clip is the function to project the adversarial example back to the feasible data domain, e.g., each pixel is projected back to be in the range [0, 1] if the example is an image. Iterative Gradient Sign Method (IGSM): IGSM [21] is an improved version of FGSM. Instead of taking just one single step, IGSM moves the example iteratively, one small step at a time. In the tth iteration, IGSM updates the example with the following rule: where α is a small step size and clip (z) is the function to project each dimension of z to be at most . The process is repeated until a successful adversarial example is generated or the maximum number of iterations is reached.
Carlini and Wagner's methods (CW): CW methods [3] have three variants depending on which metrics are used to measure the noise added to adversarial examples. Specifically, CW-L 0 , CW-L 2 , and CW-L ∞ use L 0 -norm, L 2 -norm, and L ∞ -norm to measure the magnitude of the noise, respectively. We consider the CW-L 2 method as it is much more efficient than CW-L 0 and CW-L ∞ . In particular, given an initial example, CW-L 2 iteratively searches for a small noise that turns the example into an adversarial example. Limitations: Existing adversarial example methods either achieve suboptimal robustnessuniqueness tradeoffs (we will show experimental results) or are inefficient. Specifically, FGSM and IGSM achieve suboptimal robustness-uniqueness tradeoffs. A key reason is that the predicted labels of their constructed adversarial examples are either not robust against postprocessing of the target classifier or not unique to the target classifier. CW-L 2 achieves comparable robustness-uniqueness tradeoffs with our IPGuard. However, CW-L 2 is inefficient because it aims to find adversarial examples with small noise. For instance, CW-L 2 takes around 20 mins to find one adversarial example on an ImageNet classifier, while our method only takes around 76 seconds to find one data point near the classification boundary for the same classifier.

Threat Model
We consider two parties, i.e., model owner and attacker. A model owner trains a DNN classifier (called target classifier ) using a (proprietary) training dataset and algorithm. The model owner could deploy the target classifier as a cloud service (also known as machine learning as a service) or as a client-side software (e.g., Amazon Echo). An attacker pirates the target classifier and deploys it as its own software or service. Moreover, the attacker may post-process the target classifier before deploying it. For example, to deploy the classifier on resource-constrained devices such as smartphone and IoT device, the attacker may use model compression methods (e.g., pruning) [10,23] to reduce the size of the classifier.
The model owner derives a fingerprint for its target classifier. For a suspect classifier, the model owner verifies whether it has the same fingerprint via leveraging its prediction API. If the suspect classifier has the same fingerprint, then the suspect classifier is likely pirated from the model owner's target classifier and the model owner can take further follow-up actions, e.g., collecting other evidence and filing a lawsuit.

Fingerprinting a DNN Classifier
We define fingerprinting a DNN classifier as designing two functions, i.e., Extract and Verify. We describe the two functions as follows: Extract: Given a target classifier C t , the model owner executes the Extract function to derive a fingerprint as f Ct = Extract(C t ), where f Ct is the fingerprint.
Verify: Given a suspect classifier C s , V erif y(f Ct , C s ) produces either 1 or 0, where 1 means that the suspect classifier is predicted to be a pirated version of the target classifier. We consider that the Verify function only leverages the suspect classifier's prediction API, which is generally applicable no matter whether the suspect classifier is deployed as a client-side software or a cloud service. Moreover, we assume the prediction API returns a predicted label for a query. We note that some prediction APIs also return a confidence score vector for a query, where the confidence score vector is a probability distribution of the query's label. However, we only use the predicted label in this work and leave leveraging the confidence score vector to fingerprint a classifier as future work.
Difference with watermarking: Fingerprinting a DNN classifier is qualitatively different from watermarking a DNN classifier. Specifically, watermarking is to embed a watermark into a classifier during the process of training or fine-tuning the classifier, while fingerprinting is to extract a fingerprint from a classifier that is already trained. Therefore, watermarking inevitably sacrifices the classifier's accuracy as it tampers the training or fine-tuning process. For the same reason, watermarking is not applicable to a legacy classifier that is challenging to re-train.

Design Goals
We aim to design a fingerprinting method that has the following properties.
• Fidelity. The fingerprinting method should not sacrifice the target classifier's accuracy at all. Watermarking methods do not have such property.
• Effectiveness. If the suspect classifier is the same as the target classifier, then the Verify function should produce 1. Formally, we should have V erif y(Extract(C t ), C s ) = 1 when C s = C t .
• Robustness. If the suspect classifier is some post-processed version of the target classifier (we consider popular post-processing methods that were also considered in previous work [1,7] and details are shown in Section 5.1.2), then the Verify function should produce 1. Formally, we should have V erif y(Extract(C t ), C s ) = 1 if C s is a post-processed version of C t .
• Uniqueness. The fingerprint should be unique to the target classifier. In other words, if a suspect classifier is not the target classifier nor its post-processed version, then the Verify function should produce 0. Formally, we should have V erif y(Extract(C t ), C s ) = 0 if C s is neither C t nor a post-processed version of C t .
• Efficiency. The fingerprinting method should be efficient to extract a fingerprint for a target classifier and verify the fingerprint for a suspect classifier.

Overview
A DNN classifier is essentially characterized by a classification boundary. Different classifiers have different classification boundaries. Therefore, we aim to fingerprint the classification boundary of the target classifier. In particular, we treat a set of data points (called fingerprinting data points) near the target classifier's classification boundary and their labels predicted by the target classifier as the fingerprint. Given a suspect classifier, the model owner queries its prediction API for the labels of the fingerprinting data points. If the predicted labels match those in the fingerprint, then the suspect classifier is predicted to be the target classifier or a post-processed version of the target classifier. Specifically, we overview our Extract and Verify functions as follows: Extract: Given a target classifier, our Extract function searches n random data points near the classification boundary of the target classifier. We treat the n data points and their labels predicted by the target classifier as the fingerprint. Formally, we have the fingerprint as , · · · , (x n , y n )}, where x i and y i are the ith fingerprinting data point and its label predicted by the target classifier. We formulate finding a data point near a classifier's classification boundary as an optimization problem and leverage gradient descent to solve the optimization problem.
Verify: Given a suspect classifier, the model owner queries the classifier's prediction API for the labels of the n fingerprinting data points. In particular, we denote by y i the label predicted by the suspect classifier for the ith fingerprinting data point x i . Suppose m data points have the same labels predicted by the suspect classifier and the target classifier, i.e., y i = y i for m data points. We define m n as the matching rate. If the matching rate is larger than or equal to a threshold, then the Verify function produces 1, otherwise the Verify function produces 0.
Next, we describe our Extract function to search for data points near the target classifier's classification boundary.

Extract
Classification boundary: Suppose the target classifier is a c-class DNN classifier, where the output layer is a softmax layer. Moreover, we denote by {g 1 , g 2 , · · · , g c } the decision functions of the target classifier, i.e., g i (x) is the probability that the example x has a label i, where i = 1, 2, · · · , c. For convenience, we denote by {Z 1 , Z 2 , · · · , Z c } the logits of the target classifier, i.e., {Z 1 , Z 2 , · · · , Z c } are the outputs of the neurons in the second-to-last layer. Formally, we have: where i = 1, 2, · · · , c. The label y of the example x is predicted as the one that has the largest logit or probability, i.e., y = argmax i g i (x) = argmax i Z i (x). A data point is on the target classifier's classification boundary if the target classifier cannot decide the label of the data point. In other words, if at least two labels have the largest probability (or logit) for a data point, then the data point is on the target classifier's classification boundary. Formally, we can define the target classifier's classification boundary as the following set of data points: Classification boundary: where CB is the set of data points that constitute the target classifier's classification boundary.
Finding data points near the classification boundary: We describe how to find one data point near the target classifier's classification boundary and our method repeatedly finds n data points. One naive method to find a data point on the classification boundary is to repeatedly randomly sample data points and check whether they are in the set CB. Specifically, if a data point x satisfies the condition ∃i, j, i = j and g i ( , then the data point is on the classification boundary. However, such naive sampling method would take a very long time (if possible) to find one data point on the classification boundary. This is because the size of the set CB is a negligible portion of the data domain. Therefore, to address the computational challenge, we formulate finding data points near the classification boundary as an optimization problem. Specifically, we aim to solve the following optimization problem: where i and j are randomly sampled labels, ReLU is defined as ReLU (s) = max{0, s}, and k is related to the distance between the data point x and the classification boundary. Intuitively, the objective function is small if means that x is on the classification boundary) and max t =i,j Z t (x) ≤ Z i (x). The parameter k balances between the robustness and uniqueness (please refer to Section 3.3 for details of robustness and uniqueness) of our fingerprinting method. Specifically, on one hand, when k is larger, a post-processed version of the target classifier is more likely to predict the same label for the data point, which means that our method is more robust against post-processing. On the other hand, when k is larger, a suspect classifier that is not a post-processed version of the target classifier is also more likely to predict the same label for the data point, which means that our fingerprint is less unique. We will study the impact of k on the robustness-uniqueness tradeoff in experiments.
To find a data point x near the classification boundary, we solve the optimization problem in Equation 5 with randomly sampled i and j. Specifically, we use the Adam optimizer [19] to solve the optimization problem and x is initialized to be a data point whose label is predicted as i. We will discuss more details on how to initialize x and sample i and j in Section 5.1.3. We stop the iterative process when the objective function equals 0 or we have reached the maximum number of iterations (e.g., 1,000 in our experiments). Note that, when finding n data points, we randomly sample different initialization, i, and j, in order to have a good coverage of the classification boundary.

Datasets and Target Classifiers
We consider three image classification datasets that are widely used in the literature, i.e., CIFAR-10, CIFAR-100, and ImageNet. Table 1 shows the three datasets and their target classifiers.
CIFAR-10: CIFAR-10 [20] consists of 60000 images with size 32 × 32 × 3. There are 50000 images in the training set and 10000 images in the testing set. CIFAR-10 is a 10-class classification problem. We train a widely used ResNet20 [12] model as our target classifier.

Suspect Classifiers
Given a dataset and a target classifier, we consider multiple categories of suspect classifiers.
Post-processed versions of the target classifier: Like previous studies on watermarking [1,7], we consider six post-processing including 2 variants of fine-tuning, 2 variants of retraining, and 2 variants of model compression. We expect the suspect classifiers from these post-processing to be verified by our fingerprinting method.
• Fine-tune last layer (FTLL). Only the last layer (fully connected layer) of the target classifier is fine-tuned using the training data. All other layers are fixed.
• Fine-tune all layer (FTAL). All layers in the target classifier are fine-tuned with the training data.
• Retrain last layer (RTLL). The weights of the last layer are re-initialized and then trained with the training data. All other layers are fixed.
• Retrain all layers (RTAL). The weights of the last layer are re-initialized but the weights of all layers are retrained with the training data.
• Weight pruning (WP). WP is a popular method to compress a neural network model [10].
In particular, we prune p fraction of weights that have the smallest absolute values and then retrain the pruned classifier to enhance the classification accuracy. We increase p from 0.1 with a step size 0.1 until the accuracy loss is larger than 3% (model compression aims to compress a model without substantially sacrificing the model's accuracy); and each p corresponds to a pruned version of the target classifier. Therefore, we may have multiple pruned target classifiers as suspect classifiers. For instance, if we can prune at most p = 0.5 fraction of weights from a target classifier such that the accuracy loss is no larger than 3%, then we have 5 suspect classifiers, which correspond to p = 0.1, 0.2, 0.3, 0.4, and 0.5, respectively. Note that FTLL, FTAL, RTLL, or RTAL has just one post-processed version of the target classifier.
• Filter pruning (FP). FP is another popular method to compress a neural network model [23]. In particular, we prune c fraction of filters in each layer that have the smallest absolute values and then retrain the pruned classifier to enhance the classification accuracy. As shown in [23], it can be too complicated to prune the last layer of each residual block for ResNet, so we only consider other layers in each residual block. We increase c from 1 16 with a step size 1 16 until the accuracy loss is larger than 3%; and each c corresponds to a suspect classifier. We use the step size 1 16 because the number of filters in our target classifiers can be divided by 16. Like WP, FP may lead to multiple suspect classifiers for a target classifier, where each suspect classifier corresponds to a value of c.
Same-architecture neural network classifiers: It is well known that a neural network's loss function is non-convex. Therefore, different initializations may lead to different model parameters, which are different local minima of the loss function. Therefore, if two owners train their own model parameters using the same (publicly available) training data and neural network architecture, the two models should be treated as different ones. In other words, the fingerprint extracted for one model should not be verified for the other model.
To test our fingerprinting method in such scenarios, we train 50 neural network classifiers that have the same architecture as the target classifier for CIFAR-10 or CIFAR-100 as suspect classifiers. Due to our limited computation resource, we do not train the same-architecture neural network classifiers for ImageNet.
Random forest (RF): Apart from neural networks, we also consider random forest as suspect classifiers. Specifically, for each of the three datasets, we use scikit-learn with the default settings to train 10 random forests, each of which has 20 trees. We note that random forests have relatively low classification accuracies. However, our goal is not to design accurate random forest classifiers. Instead, our goal is to show that our fingerprinting method can distinguish between neural networks and random forests. Note that we did not train random forest classifiers for the ImageNet dataset because our memory is not large enough.
Positive vs. negative suspect classifiers: Our goal is that the post-processed versions of the target classifier are verified, while the other suspect classifiers are not verified. For convenience, we call the post-processed versions of the target classifier positive suspect classifiers and the remaining ones negative suspect classifiers. Table 1 summarizes the number of positive and negative suspect classifiers for each dataset. Table 2 shows the testing accuracies of the target and suspect classifiers.

Compared Methods
A key component of our IPGuard is to find data points near a target classifier's classification boundary. An adversarial example method could be used to find such data points. Therefore, we compare with existing adversarial example methods including FGSM [8], IGSM [21], and CW-L 2 [3].
Random: This method randomly samples a data point from the data domain as a fingerprinting data point.
FGSM [8] and IGSM [21]: Both FGSM and IGSM have a parameter , which bounds the noise in an adversarial example. We will explore different . IGSM further has a step size parameter α. Since we use image datasets, we set α = 1 255 , which is the minimal step size. Moreover, we set the maximum number of iterations of IGSM to be 1,000.
CW-L 2 [3]: CW-L 2 has a parameter k, which controls the confidence of an adversarial example. We will explore the impact of k on the performance of CW-L 2 . CW-L 2 leverages an Adam optimizer and we set the learning rate to be 0.001 on CIFAR-10 and CIFAR-100, and 0.1 on ImageNet. We use the implementation of CW-L 2 published by its authors.
Our IPGuard: Our IPGuard also has a parameter k, which balances between robustness and uniqueness. Like CW-L 2 , IPGuard also leverages Adam optimizer and we use the same learning rates as CW-L 2 . IPGuard runs the Adam optimizer until we find a data point that makes the value of the objective function 0 or we have reached the maximum number of iterations. We set the maximum number of iterations to be 1,000. In our experiments, the iterative process always stops before 1,000 iterations. In fact, IPGuard only needs several iterations in finding most fingerprinting data points.

Initialization and target labels
Our fingerprint consists of n data points near the target classifier's classification boundary with their labels predicted by the target classifier. In our experiments, we set n = 100. We also tried larger n, e.g., n = 10, 000. However, IPGuard and existing efficient adversarial example methods such as FGSM and IGSM have negligible performance improvement (measured by ARUC that we will introduce in the next part). To find one such data point x, we need to Table 2: Testing accuracies of the target and suspect classifiers. "-" means not applicable. If there are multiple classifiers from the same type, we show the range of accuracies. For instance, for the same-architecture neural network classifier, we trained 50 ResNet20 models for the CIFAR-10 dataset, and their accuracies are in the range [0.91,0.92]. For positive suspect classifiers based on WP (or FP), we show the accuracies of the suspect classifiers with p fraction of weights (or c fraction of filters) pruned for all p (or c) that sacrifice the target classifier's accuracy by at most 3%.  initialize a data point and pick a target label, and then we use a compared method to find x. We consider two ways of initialization and two ways of selecting the target label.
Initialization: We consider the following two ways to initialize a data point.
• Training example (T). In this method, we randomly sample a training example as the initialized data point.
• Random (R). In this method, we randomly sample a data point from the entire data domain as the initialized data point. Since we are using image datasets, we uniformly sample from [0, 1] d , where d is the dimension of the images.
Target label selection: We consider the following two ways to select a target label.
• Random (R). In this method, we randomly select a label as the target label for a data point.
• Least-likely label (L). In this method, we select the least-likely label of an initialized data point as the target label. The least-likely label of a data point is the label that has the smallest logit predicted by the target classifier. In other words, the target classifier is least confident at predicting the least-likely label as the label for the initialized data point. We speculate that the target classifier's classification boundary near such target label and initialized data point is more unique.
We will compare the two initialization methods and the two methods of selecting target label. For convenience, we use a suffix "-TR", "-TL", "-RR", or "-RL" to represent a combination of initialization and target label selection. Table 3 summarizes the suffixes. For instance, FGSM-TL means that we initialize a data point as a training example, select the least-likely label as the target label, and use FGSM to find a targeted adversarial example as a fingerprinting data point.

Evaluation Metrics
As we described in Section 3.3, we desire 5 properties for a fingerprinting method. All compared methods have no accuracy loss of the target classifier. Moreover, all compared methods achieve the effectiveness property. Therefore, we compare IPGuard and existing adversarial example methods with respect to robustness, uniqueness, and efficiency properties.
Matching rate: For a suspect classifier, we query the classifier's API for the labels of the fingerprinting data points. Matching rate is the fraction of fingerprinting data points whose labels predicted by the suspect classifier match those predicted by the target classifier. A ARUC: Given a matching rate threshold, the Verify function produces 1 if a suspect classifier has a matching rate that is greater than or equal to the threshold. We use the fraction of positive suspect classifiers that are verified to measure the robustness of a method, and we use the fraction of negative suspect classifiers that are not verified to measure the uniqueness of a method.
The matching rate threshold controls the robustness-uniqueness tradeoffs. In particular, robustness decreases and uniqueness increases as the matching rate threshold increases. One way to avoid the impact of the selection of matching rate threshold and consistently compare different methods is to use AUC [2], a standard machine learning evaluation metric, to jointly measure the robustness and uniqueness of a method. Specifically, we can rank the positive and negative suspect classifiers in a decreasing order according to their matching rates. Then, AUC is essentially the probability that a randomly sampled positive suspect classifier ranks higher than a randomly sampled negative suspect classifier. However, AUC is insufficient to jointly measure robustness and uniqueness in our problem. Specifically, AUC does not characterize the gaps between the matching rates of positive suspect classifiers and those of the negative suspect classifiers. For instance, once all positive suspect classifiers have larger matching rates than all negative suspect classifiers, AUC is 1 no matter how large the gap between the matching rates is. However, such gap is important in our problem. Specifically, the positive and negative suspect classifiers we evaluate may be a subset of suspect classifiers in practice. A larger gap between the matching rates of our evaluated positive suspect classifiers and those of our evaluated negative suspect classifiers means that it is more likely to select a matching rate threshold to achieve both large robustness and uniqueness in practice.
Therefore, we propose the Area under the Robustness-Uniqueness Curves (ARUC) as a metric to jointly evaluate the robustness and uniqueness of a method. Specifically, we draw the robustness and uniqueness curves in the same graph as we increase the matching rate threshold from 0 to 1. The two curves intersect at a certain point. We define ARUC as the area under the intersected Robustness-Uniqueness curves. Figure 2 illustrates ARUC in three scenarios. ARUC ranges from 0 to 1. A larger ARUC indicates that it is more likely to have large robustness and uniqueness at the same time, i.e., for a wider range of matching rate threshold, both robustness and uniqueness are large.  Formally, ARUC is defined as follows: where τ is a matching rate threshold, and R(τ ) and U (τ ) are the robustness and uniqueness when the matching rate threshold is τ , respectively. We evenly divide the range [0,1] to r intervals and use the rightmost point in each interval to represent the interval. Then, we can approximate ARUC as follows: In our experiments, we set r = 100.
Efficiency: In practice, deep neural network classifiers often have large scales. Therefore, the fingerprinting method should be scalable. We use the running time of finding the fingerprinting data points to measure the efficiency of a method.

Results
ARUC: Figure 3 and Figure 4 respectively show the impact of on the ARUC for FGSM and IGSM, where the four combinations of initialization and target label selection are considered (please refer to Table 3 for the definition of the suffixes). For FGSM, ARUC first increases and then decreases or fluctuates as increases. For IGSM, ARUC first increases and then keeps stable as increases. ARUC keeps stable for large because IGSM moves a step α in each iteration no matter how large is and stops as soon as it finds an adversarial example. We observe that no matter how we select , FGSM and IGSM have ARUCs that are less than 0.7.   Figure 5 and Figure 6 respectively show the impact of k on ARUC for CW-L 2 and IPGuard. For both methods, ARUC first increases and then decreases as k increases (except that IPGuard has not started to decrease before k = 200 on ImageNet). This is because, as k increases, the fingerprinting data points are further away from the target classifier's classification boundary. Therefore, the matching rates of both positive and negative suspect classifiers increase, which means that robustness increases and uniqueness decreases. Moreover, matching rates of positive suspect classifiers increase faster than those of negative suspect classifiers when k is small, but slower than those of negative suspect classifiers when k is large. As a result, ARUC first increases and then decreases. For both CW-L 2 and IPGuard, the combination "-TL" can achieve the best ARUCs. Moreover, for IPGuard, least-likely label outperforms random label when k is large no matter how we initialize the fingerprinting data points, i.e., IPGuard-TL outperforms IPGuard-TR and IPGuard-RL outperforms IPGuard-RR, except that IPGuard-TL and IPGuard-TR achieve comparable ARUCs on ImageNet when k is large. We speculate the reason is that the classification boundary near the initialized data points and their leastlikely labels is more unique. Table 4 shows the best ARUC that each compared method can achieve via proper parameter setting for each dataset. As we can see, CW-L 2 and IPGuard achieve comparable ARUCs; and they substantially outperform other methods.
Matching rate: Table 5, Table 6, and Table 7 respectively show the matching rates of the compared methods for the three datasets, where the parameter of each method is set such that it achieves the best ARUC on a dataset. For each category of negative suspect classifiers, we have multiple instances. Therefore, we show the range of matching rates for them. We have several observations. First, positive suspect classifiers have larger matching rates than negative suspect classifiers in most cases. In particular, for IGSM, CW-L 2 , and IPGuard, there exists proper matching rate thresholds that make both robustness and uniqueness equal to 1. These results may indicate that the classification boundary of a target classifier is closer to those of the postprocessed versions of the target classifier than those of other classifiers. However, CW-L 2 and IPGuard achieve the largest gaps between matching rates of positive suspect classifiers and those of negative suspect classifiers. In other words, for a wider range of matching rate threshold, CW-L 2 and IPGuard can achieve both robustness and uniqueness of 1. For instance, on CIFAR10, IGSM, CW-L 2 , and IPGuard respectively achieve gaps of 0.06, 0.03, 0.63, and 0.62 between the smallest matching rate of positive suspect classifiers and the largest matching rate of negative suspect classifiers. Our evaluated suspect classifiers are a subset of suspect classifiers in practice. A larger such gap makes it more likely to select a matching rate threshold that achieves both large robustness and uniqueness in practice. Second, two neural network classifiers, which use the same architecture but different initializations when learning the model parameters, have substantially different classification boundaries, even if their testing accuracies are close. For instance, on CIFAR-100, the target classifier is a WRN-22-4 model; and the other WRN-22-4 models that are trained with different initializations have matching rates that are close to 0 for the compared methods except FGSM. Third, among the post-processing techniques, FP tends to have lower matching rates, which indicates that FP changes the target classifier's classification boundary more substantially.
Efficiency: Table 8 shows the running time of generating the 100 fingerprinting data points for different methods, where the parameter of each method is set to achieve the best ARUC on a dataset. IPGuard is slower than FGSM and IGSM. However, IPGuard is orders of magnitude faster than CW-L 2 . IPGuard and CW-L 2 achieve comparable ARUCs, but IPGuard is more efficient than CW-L 2 . This is because they both can find data points near a target classifier's classification boundary, but IPGuard does not constrain noise added to the data points to be more efficient. For instance, on the CIFAR-100 dataset, the average L 2 -norms of the noise added by CW-L 2 and IPGuard to the initial data points are 0.64 and 1.29, respectively.

Conclusion and Future Work
In this work, we propose to leverage data points near a classifier's classification boundary to fingerprint the classifier and track its use in the wild. Moreover, we propose a new method to efficiently find such data points. Our empirical results on three large-scale benchmark datasets show that 1) the fingerprint extracted by our method can be robust against popular post-processing of the classifier and unique to the classifier (and its post-processed versions) simultaneously; and 2) our method is more efficient than state-of-the-art adversarial example methods at finding data points near the classification boundary because our method does not constrain the noise added to such data points. We envision that there is an arms race between a model owner and an attacker. An attacker could strategically post-process the target classifier to evade the model owner's fingerprinting method, while a model owner aims to fingerprint a target classifier such that any post-processed version of its target classifier can be identified. We note that, once stealing and post-processing a target classifier requires less resource (e.g., computation resource, training data) than training a classifier from scratch, an attacker may be motivated to steal and/or post-process the target classifier instead of training a classifier from scratch. Therefore, the arms race between a model owner and an attacker may last until stealing the target classifier and evading the model owner's fingerprinting method requires more resource than training a classifier from scratch. It is an interesting future work to rigorously explore such arms race between model owners and attackers.