Decentralized Attribution of Generative Models

1 INTRODUCTION Recent advances in generative models ( Goodfellow et al. , 2014 ) have enabled the creation of synthetic contents that are indistinguishable even by naked eyes ( Pathak et al. , 2016 ; Zhu et al. , 2017 ; Zhang et al. , 2017 ; Karras et al. , 2017 ; Wang et al. , 2018 ; Brock et al. , 2018 ; Miyato et al. , 2018 ; Choi et al. , 2018 ; Karras et al. , 2019a ; b ; Choi et al. , 2019 ) . Such successes raised serious concerns regarding emerging threats due to the applications of generative models ( Kelly , 2019 ; Breland , 2019 ) . This paper is concerned about two particular types of threats , namely , malicious personation ( Satter , 2019 ) , and digital copyright infringement . In the former , the attacker uses generative models to create and disseminate inappropriate or illegal contents ; in the latter , the attacker steals the ownership of a copyrighted content ( e.g. , an art piece created through the assistance of a generative model ) by making modifications to it . We study model attribution , a solution that may address both threats . Model attribution is defined as the identification of user-end models where the contents under question are generated from . Existing ∗Equal contribution . 1https : //github.com/ASU-Active-Perception-Group/decentralized_ attribution_of_generative_models studies demonstrated empirical feasibility of attribution through a centralized classifier trained on all existing user-end models ( Yu et al. , 2018 ) . However , this approach is not scalable in reality where the number of models ever grows . Neither does it provide an attributability guarantee . To this end , we propose in this paper a decentralized attribution scheme : Instead of a centralized classifier , we use a set of binary linear classifiers associated with each user-end model . Each classifier is parameterized by a user-specific key and distinguishes its associated model distribution from the authentic data distribution . For correct attribution , we expect one-hot classification outcomes for generated contents , and a zero vector for authentic data . To achieve correct attribution , we study the sufficient conditions of the user-specific keys that guarantee an attributability lower bound . The resultant conditions are used to develop an algorithm for computing the keys . Lastly , we assume that attackers can post-process generated contents to potentially deny the attribution , and study the tradeoff between generation quality and robustness of attribution against post-processes . Problem formulation We assume that for a given dataset D ⊂ Rdx , the registry generates userspecific keys , Φ : = { φ1 , φ2 , ... } where φi ∈ Rdx and ||φi|| = 1 . || · || is the l2 norm . A user-end generative model is denoted by Gφ ( · ; θ ) : Rdz → Rdx where z and x are the latent and output variables , respectively , and θ are the model parameters . When necessary , we will suppress θ and φ to reduce the notational burden . The dissemination of the user-end models is accompanied by a public service that tells whether a query content belongs to Gφ ( labeled as 1 ) or not ( labeled as −1 ) . We model the underlying binary linear classifier as fφ ( x ) = sign ( φTx ) . Note that linear models are necessary for the development of sufficient conditions of attribution presented in this paper , although sufficient conditions for nonlinear classifiers are worth exploring in the future . The following quantities are central to our investigation : ( 1 ) Distinguishability of Gφ measures the accuracy of fφ ( x ) at classifying Gφ against D : D ( Gφ ) : = 1 2 Ex∼PGφ , x0∼PD [ 1 ( fφ ( x ) = 1 ) + 1 ( fφ ( x0 ) = −1 ) ] . ( 1 ) Here PD is the authentic data distribution , and PGφ the user-end distribution dependent on φ. G is ( 1 − δ ) -distinguishable for some δ ∈ ( 0 , 1 ] when D ( G ) ≥ 1 − δ . ( 2 ) Attributability measures the averaged multi-class classification accuracy of each model distribution over the collection G : = { Gφ1 , ... , GφN } : A ( G ) : = 1 N N∑ i=1 Ex∼Gφi1 ( φ T j x < 0 , ∀ j 6= i , φTi x > 0 ) . ( 2 ) G is ( 1 − δ ) -attributable when A ( G ) ≥ 1 − δ . ( 3 ) Lastly , We denote by G ( · ; θ0 ) ( or shortened as G0 ) the root model trained on D , and assume PG0 = PD . We will measure the ( lack of ) generation quality ofGφ by the FID score ( Heusel et al. , 2017 ) and the l2 norm of the mean output perturbation : ∆x ( φ ) = Ez∼Pz [ Gφ ( z ; θ ) −G ( z ; θ0 ) ] , ( 3 ) where Pz is the latent distribution . This paper investigates the following question : What are the sufficient conditions of keys so that the user-end generative models can achieve distinguishability individually and attributability collectively , while maintaining their generation quality ? Contributions We claim the following contributions : 1 . We develop sufficient conditions of keys for distinguishability and attributability , which connect these metrics with the geometry of the data distribution , the angles between keys , and the generation quality . 2 . The sufficient conditions lead to simple design rules for the keys : keys should be ( 1 ) data compliant , i.e. , φTx < 0 for x ∼ PD , and ( 2 ) orthogonal to each other . We validate these rules using DCGAN ( Radford et al. , 2015 ) and StyleGAN ( Karras et al. , 2019a ) on benchmark datasets including MNIST ( LeCun & Cortes , 2010 ) , CelebA ( Liu et al. , 2015 ) , and FFHQ ( Karras et al. , 2019a ) . See Fig . 1 for a visualization of the attributable distributions perturbed from the authentic FFHQ dataset . 3 . We empirically test the tradeoff between generation quality and robust attributability under random post-processes including image blurring , cropping , noising , JPEG conversion , and a combination of all . 2 SUFFICIENT CONDITIONS FOR ATTRIBUTABILITY . From the definitions ( Eq . ( 1 ) and Eq . ( 2 ) ) , achieving distinguishability is necessary for attributability . In the following , we first develop the sufficient conditions for distinguishability through Proposition 1 and Theorem 1 , and then those for attributability through Theorem 2 . Distinguishability through watermarking First , consider constructing a user-end model Gφ by simply adding a perturbation ∆x to the outputs of the root model G0 . Assuming that φ is datacompliant , this model can achieve distinguishability by solving the following problem with respect to ∆x : min ||∆x||≤ε Ex∼PD [ max { 1− φT ( x+ ∆x ) , 0 } ] , ( 4 ) where ε > 0 represents a generation quality constraint . The following proposition reveals the connection between distinguishability , data geometry , and generation quality ( proof in Appendix A ) : Proposition 1 . Let dmax ( φ ) : = maxx∼PD |φTx| . If ε ≥ 1 + dmax ( φ ) , then ∆x∗ = ( 1 + dmax ( φ ) ) φ solves Eq . ( 4 ) , and fφ ( x+ ∆x∗ ) > 0 , ∀ x ∼ PD . Watermarking through retraining user-end models The perturbation ∆x∗ can potentially be reverse engineered and removed when generative models are white-box to users ( e.g. , when models are downloaded by users ) . Therefore , we propose to instead retrain the user-end models Gφ using the perturbed datasetDγ , φ : = { G0 ( z ) +γφ | z ∼ Pz } with γ > 0 , so that the perturbation is realized through the model architecture and weights . Specifically , the retraining fine-tunes G0 so that Gφ ( z ) matches with G0 ( z ) + γφ for z ∼ Pz . Since this matching will not be perfect , we use the following model to characterize the resultant Gφ : Gφ ( z ) = G0 ( z ) + γφ+ , ( 5 ) where the error ∼ N ( µ , Σ ) . In Sec . 3 we provide statistics of µ and Σ on the benchmark datasets , to show that the retraining captures the perturbations well ( µ close to 0 and small variances in Σ ) . Updating Proposition 1 due to the existence of leads to Theorem 1 , where we show that γ needs to be no smaller than dmax ( φ ) in order for Gφ to achieve distinguishability ( proof in Appendix B ) : Theorem 1 . Let dmax ( φ ) = maxx∈D |φTx| , σ2 ( φ ) = φTΣφ , δ ∈ [ 0 , 1 ] , and φ be a data-compliant key . D ( Gφ ) ≥ 1− δ/2 if γ ≥ dmax ( φ ) + σ ( φ ) √ log ( 1 δ2 ) − φTµ . ( 6 ) Remarks The computation of σ ( φ ) requires Gφ , which in turn requires γ . Therefore , an iterative search is needed to determine γ that is small enough to limit the loss of generation quality , yet large enough for distinguishability ( see Alg . 1 ) . Attributability We can now derive the sufficient conditions for attributability of the generative models from a set of N keys ( proof in Appendix C ) : Theorem 2 . Let dmin = minx∈D |φTx| , dmax = maxx∈D |φTx| , σ2 ( φ ) = φTΣφ , δ ∈ [ 0 , 1 ] . Let a ( φ , φ′ ) : = −1 + dmax ( φ ′ ) + dmin ( φ ′ ) − 2φ′Tµ σ ( φ′ ) √ log ( 1 δ2 ) + dmax ( φ′ ) − φ′Tµ , ( 7 ) for keys φ and φ′ . Then A ( G ) ≥ 1−Nδ , if D ( G ) ≥ 1− δ for all Gφ ∈ G , and φTφ′ ≤ a ( φ , φ′ ) ( 8 ) for any pair of data-compliant keys φ and φ′ . Remarks When σ ( φ′ ) is negligible for all φ′ and µ = 0 , a ( φ , φ′ ) is approximately dmin ( φ ′ ) /dmax ( φ ′ ) > 0 , in which case φTφ′ ≤ 0 is sufficient for attributability . In Sec . 3 we empirically show that this approximation is plausible for the benchmark datasets . 3 EXPERIMENTS AND ANALYSIS . In this section we test Theorem 1 , provide empirical support for the orthogonality of keys , and present experimental results on model attribution using MNIST , CelebA , and FFHQ . Note that tests on the theorems require estimation of Σ , which is costly for models with high-dimensional outputs , and therefore are only performed on MNIST and CelebA . Key generation We generate keys by iteratively solving the following convex problem : φi = arg min φ Ex∼PD , G0 [ max { 1 + φTx , 0 } ] + i−1∑ j=1 max { φTj φ , 0 } . ( 9 ) The orthogonality penalty is omitted for the first key . The solutions are normalized to unit l2 norm before being inserted into the next problem . We note that PD and PG0 do not perfectly match in practice , and therefore we draw with equal chance from both distributions during the computation . G0s are trained using the standard DCGAN architecture for MNIST and CelebA , and StyleGAN for FFHQ . Training details are deferred to Appendix D. User-end generative models The training of Gφ follows Alg . 1 , where γ is iteratively tuned to balance generation quality and distinguishability . For each γ , we collect a perturbed dataset Dγ , φ and solve the following training problem : min θ E ( z , x ) ∼Dγ , φ [ ||Gφ ( z ; θ ) − x||2 ] , ( 10 ) starting from θ = θ0 . If the resultant model does not meet the distinguishability requirement due to the discrepancy between Dγ , φ and Gφ , the perturbation is updated as γ = αγ . In experiments , we use a standard normal distribution for Pz , and set δ = 10−2 and α = 1.1 . Validation of Theorem 1 Here we validate the sufficient condition for distinguishability . Fig . 2a compares the LHS and RHS values of Eq . ( 6 ) for 100 distinguishable user-end models . The empirical distinguishability of these models are reported in Fig . 2e . Calculation of the RHS of Eq . ( 6 ) requires estimations of µ and Σ . To do this , we sample ( z ) = Gφ ( z ; θ ) −G ( z ; θ0 ) − γφ ( 11 ) using 5000 samples of z ∼ Pz , where Gφ and γ are derived from Alg . 1 . Σ and µ are then estimated for each φ . Fig . 2c and d present histograms of the elements in µ and Σ for two user-end models of the benchmark datasets . Results in Fig . 2a show that the sufficient condition for distinguishability ( Eq . ( 6 ) ) is satisfied for most of the sampled models through the training specified in Alg . 1 . Lastly , we notice that the LHS values for MNIST are farther away from the equality line than those for CelebA . This is because the MNIST data distribution resides at corners of the unit box . Therefore perturbations of the distribution are more likely to exceed the bounds for pixel values . Clamping of these invalid pixel values reduces the effective perturbation length . Therefore to achieve distinguishability , Alg . 1 seeks γs larger than needed . This issue is less observed in CelebA , where data points are rarely close to the boundaries . Fig . 2g present the values of γs of all user-end models . Algorithm 1 : Training ofGφ input : φ , G0 output : Gφ , γ 1 set γ = dmax ( φ ) ; 2 collect Dγ , φ ; 3 train Gφ by solving Eq . ( 10 ) using Dγ , φ ; 4 compute empirical D ( Gφ ) ; 5 if D ( Gφ ) < 1− δ then 6 set γ = αγ ; 7 goto step 2 ; 8 end Validation of Theorem 2 Recall that from Theorem 2 , we recognized that orthogonal keys are sufficient . To support this design rule , Fig . 2b presents the minimum RHS values of Eq . ( 8 ) for 100 user-end models . Specifically , for each φi , we compute a ( φi , φj ) ( Eq . ( 7 ) ) using φj for j = 1 , ... , i − 1 and report minj a ( φi , φj ) , which sets an upper bound on the angle between φi and all existing φs . The resultant minj a ( φi , φj ) are all positive for MNIST and close to zero for CelebA . From this result , an angle of ≥ 94 deg , instead of 90 deg , should be enforced between any pairs of keys for CelebA . However , since the conditions are sufficient , orthogonal keys still empirically achieve high attributability ( Fig . 2f ) , although improvements can be made by further increasing the angle between keys . Also notice that the current computation of keys ( Eq . ( 9 ) ) does not enforce a hard constraint on orthogonality , leading to slightly acute angles ( 87.7 deg ) between keys for CelebA ( Fig . 2h ) . On the other hand , the positive values in Fig . 2b for MNIST suggests that further reducing the angles between keys is acceptable if one needs to increase the total capacity of attributable models . However , doing so would require the derivation of new keys to rely on knowledge about all existing user-end models ( in order to compute Eq . ( 7 ) ) . Empirical results on benchmark datasets Tab . 1 reports the metrics of interest measured on the 100 user-end models for each of MNIST and CelebA , and 20 models for FFHQ . All models are trained to be distinguishable . And by utilizing Theorem 2 , they also achieve high attributability . As a comparison , we demonstrate results where keys are 45 deg apart ( φTφ′ = 0.71 ) using a separate set of 20 user-end models for each of MNIST and CelebA , and 5 models for FFHQ , in which case distinguishability no longer guarantees attributability . Regarding generation quality , Gφs receive worse FID scores than G0 due to the perturbations . We visualize samples from user-end models and the corresponding keys in Fig . 3 . Note that for human faces , FFHQ in particular , the perturbations create light shades around eyes and lips , which is an unexpected but reasonable result . Attribution robustness vs. generation quality We now consider the scenario where outputs of the generative models are post-processed ( e.g. , by adversaries ) before being attributed . When the post-processes are known , we can take counter measures through robust training , which intuitively will lead to additional loss of generation quality . To assess this tradeoff between robustness and generation quality , we train Gφ against post-processes T : Rdx → Rdx from a distribution PT . Due to the potential nonlinearity of T and the lack of theoretical guarantee in this scenario , we resort to the following robust training problem for deriving the user-end models : min θi Ez∼Pz , T∈PT [ max { 1− fφi ( T ( Gφi ( z ; θi ) ) ) , 0 } + C||G0 ( z ) −Gφi ( z ; θi ) ||2 ] , ( 12 ) where C is the hyper-parameter for generation quality . Detailed analysis and comparison for selecting C are provided in Appendix E. We consider five types of post-processes : blurring , cropping , noise , JPEG conversion and the combination of these four . Examples of the post-processed images are shown in Fig . 5 . Blurring uses Gaussian kernel widths uniformly drawn from 1 3 { 1 , 3 , 5 , 7 , 9 } . Cropping crops images with uniformly drawn ratios between 80 % and 100 % , and scales the cropped images back to the original size using bilinear interpolation . Noise adds white noise with standard deviation uniformly drawn from [ 0 , 0.3 ] . JPEG applies JPEG compression . Combination performs each attack with a 50 % chance in the order of Blurring , Cropping , Noise and JPEG . For differentiability , we use existing implementations of differentiable blurring ( Riba et al . ( 2020 ) ) and JPEG conversion ( Zhu et al . ( 2018 ) ) . For robust training , we apply the post-process to mini-batches with 50 % probability . We performed comprehensive tests using DCGAN ( on MNIST and CelebA ) , PGAN ( on CelebA ) , and CycleGAN ( on Cityscapes ) . Tab . 2 summarizes the average distinguishability , the attributability , the perturbation length ||∆x|| , and the FID score with and without robust training of Gφ . Results are based on 20 models for each architecture-dataset pair , where keys are kept orthogonal and data compliant . From the results , defense against these post-processes can be achieved , except for Combination . Importantly , there is a clear tradeoff between robustness and generation quality . This can be seen from Fig . 5 , which compares samples with7 and without robust training from the tested models and datasets . Lastly , it is worth noting that the training formulation in Eq . ( 12 ) can also be applied to the training of non-robust user-end models in place of Eq . ( 10 ) . However , the resultant model from Eq . ( 12 ) can not be characterized by Eq . ( 5 ) with small µ and Σ , i.e. , due to the nonlinearity of the training process of Eq . ( 12 , the user-end model distribution is deformed while it is perturbed . This resulted in unsuccessful validation of the theorems , which led to the adoption of Eq . ( 10 ) for theorem-consistent training . Therefore , while the empirical results show feasibility of achieving robust attributability using Eq . ( 12 , counterparts to Theorems 1 and 2 in this nonlinear setting are yet to be developed . Capacity of keys For real-world applications , we hope to maintain attributability for a large set of keys . Our study so far suggests that the capacity of keys is constrained by the data compliance and orthogonality requirements . While the empirical study showed the feasibility of computing keys through Eq . ( 9 ) , finding the maximum number of feasible keys is a problem about optimal sphere packing on a segment of the unit sphere ( Fig . 4 ) . To explain , the unit sphere represents the identifiability requirement ||φ|| = 1 . The feasible segment of the unit sphere is determined by the data compliance and generation quality constraints . And the spheres to be packed have radii following the sufficient condition in Theorem 2 . Such optimal packing problems are known open challenges ( Cohn et al . ( 2017 ) ; Cohn ( 2016 ) ) . For real-world applications where a capacity of attributable models is needed ( which is the case for both malicious personation and copyright infringement set- tings ) , it is necessary to find approximated solutions to this problem . Generation quality control From Proposition 1 and Theorem 1 , the inevitable loss of generation quality is directly related to the length of perturbation ( γ ) , which is related to dmax . Fig . 6 compares outputs from user-end models with different dmaxs . While it is possible to filter φs based on their corresponding dmaxs for generation quality control , here we discuss a potential direction for prescribing a subspace of φs within which quality can be controlled . To start , we denote by J ( x ) the Jacobian of G0 with respect to its generator parameters θ0 . Our discussion is related to the matrix M = Ex∼PG0 [ J ( x ) ] Ex∼PG0 [ J ( x ) T ] . A spectral analysis of M reveals that the eigenvectors of M with large eigenvalues are more structured than those with small ones ( Fig . 7 ( a ) ) . This finding is consistent with the definition of M : The largest eigenvectors of M represent the principal axes of all mean sensitivity vectors , where the mean is taken over the latent space . For MNIST , these eigenvectors overlap with the digits ; for CelebA , they are structured color patterns . On the other hand , the smallest eigenvectors represent directions rarely covered by the sensitivity vectors , thus resembling random noise . Based on this finding , we test the hypothesis that keys more aligned with the eigenspace of the small eigenvalues will have smaller dmax . We test this hypothesis by computing the Pearson correlations between dmax and φTMφ using 100 models for each of MNIST and CelebA . The resultant correlations are 0.33 and 0.53 , respectively . In addition , we compare outputs from models using the largest and the smallest eigenvectors of M as the keys in Fig . 7b . While a concrete human study is needed , the visual results suggest that using eigenvectors of M is a promising approach to segmenting the space of keys according to their induced generation quality .

Summary: This paper proposes a decentralized attribution to the generative model trained on the same dataset. The goal is to distinguish the user-end generative models, and thus facilitates the IP-protection. The idea is to use orthogonal keys to distinguish the generated samples from authentic data. Furthermore, this paper provided theoretic insights into the proposed method. Experimental results on MNIST and CelebA datasets backup the claims.