Mutual Calibration between Explicit and Implicit Deep Generative Models

1 INTRODUCTION . Deep generative model , as a powerful unsupervised framework for learning the distribution of highdimensional multi-modal data , has been extensively studied in recent literature . Typically , there are two types of generative models : explicit and implicit ( Goodfellow et al. , 2014 ) . Explicit models define a density function of the distribution , while implicit models learn a mapping that generates samples by transforming an easy-to-sample random variable . Both models have their own power and limitations . The density form in explicit models endows them with convenience to characterize data distribution and infer the sample likelihood . However , the unknown normalizing constant often causes computational intractability . On the other hand , implicit models including generative adversarial networks ( GANs ) can directly generate vivid samples in various application domains including images , natural languages , graphs , etc . ( Goodfellow et al. , 2014 ; Radford et al. , 2016 ; Arjovsky et al. , 2017 ; Brock et al. , 2019 ) . Nevertheless , one important challenge is to design a training algorithm that do not suffer from instability and mode collapse . In view of this , it is natural to build a unified framework that takes full advantages of the two models and encourages them to compensate for each other . Intuitively , an explicit density estimator and a flexible implicit sampler could help each other ’ s training given effective information sharing . On the one hand , the density estimation given by explicit models can be a good metric that measures quality of samples ( Dai et al. , 2017 ) , and thus can be used for scoring generated samples given by implicit model or detecting outliers as well as noises in input true samples ( Zhai et al. , 2016 ) . On the other hand , the generated samples from implicit models could augment the dataset and help to alleviate mode collapse especially when true samples are insufficient that would possibly make explicit model fail to capture an accurate distribution . We refer to Appendix A for a more comprehensive literature review . Motivated by the discussions above , in this paper , we propose a joint learning framework that enables mutual calibration between explicit and implicit generative models . In our framework , an explicit model is used to estimate the unnormalized density ; in the meantime , an implicit generator model is exploited to minimize certain statistical distance ( such as the Wasserstein metric or Jensen-Shannon divergence ) between the distributions of the true and the generated samples . On top of these two models , a Stein discrepancy , acting as a bridge between generated samples and estimated densities , is introduced to push the two models to achieve a consensus . Unlike flow-based models ( Nguyen et al. , 2017 ; Kingma & Dhariwal , 2018 ; Papamakarios et al. , 2017 ) , our formulation does not impose invertibility constraints on the generative models and thus is flexible in utilizing general neural network architectures . Our main contribution are as follows . • Theoretically , we prove that our method allows the two generative models to impose novel mutual regularization on each other . Specifically , our formulation penalizes large kernel Sobolev norm of the critic in the implicit ( WGAN ) model , which ensures the critic not to change suddenly on the high-density regions and thus preventing the critic of the implicit model being to strong during training . In the mean time , our formulation also smooths the function given by the Stein discrepancy through Moreau-Yosida regularization , which encourages the explicit model to seek more modes in the data distribution and thus alleviates mode collapse . • In addition , we also show that the joint training helps to stabilize the training dynamics . Compared with other common regularization approaches for GAN models that may shift original optimum , our method can facilitate convergence to unbiased model distribution . • Extensive experiments on synthetic and image datasets justify our theoretical findings and demonstrate that joint training can help two models achieve better performance . On the one hand , the energy model can detect complicated modes in data more accurately and distinguish out-ofdistribution samples . On the other hand , the implicit model can generate higher-quality samples , especially when the training samples are contaminated or limited . 2 BACKGROUND . We briefly provide some technical background related to our model . Energy Model . The energy model assigns each data x ∈ Rd with a scalar energy value Eφ ( x ) , where Eφ ( · ) is called energy function and is parameterized by φ . The model is expected to assign low energy to true samples according to a Gibbs distribution pφ ( x ) = exp { −Eφ ( x ) } /Zφ , where Zφ is a normalizing constant dependent of φ . The normalizing termZφ is often hard to compute , making the training intractable , and various methods are proposed to detour such term ( see Appendix A ) . Stein Discrepancy . Stein discrepancy ( Gorham & Mackey , 2015 ; Liu et al. , 2016 ; Chwialkowski et al. , 2016 ; Oates et al. , 2017 ; Grathwohl et al. , 2020 ) is a measure of closeness between two probability distributions and does not require knowledge for the normalizing constant of one of the compared distributions . Let P and Q be two probability distributions on X ⊂ Rd , and assume Q has a ( unnormalized ) density q . The Stein discrepancy S ( P , Q ) is defined as S ( P , Q ) : = sup f∈F Ex∼P [ AQf ( x ) ] : = sup f∈F { Γ ( Ex∼P [ ∇x log q ( x ) f ( x ) > +∇xf ( x ) ] ) } , ( 1 ) where F is often chosen to be a Stein class ( see , e.g. , Definition 2.1 in ( Liu et al. , 2016 ) ) , f : Rd → Rd′ is a vector-valued function called Stein critic and Γ is an operator that transforms a d× d′ matrix into a scalar value . One common choice of Γ is trace operator when d′ = d. One can also use other forms for Γ , like matrix norm when d′ 6= d ( Liu et al. , 2016 ) . If F is a unit ball in some reproducing kernel Hilbert space ( RKHS ) with a positive definite kernel k , it induces Kernel Stein Discrepancy ( KSD ) . More details are provided in Appendix B. Wasserstein Metric . Wasserstein metric is suitable for measuring distances between two distributions with non-overlapping supports ( Arjovsky et al. , 2017 ) . The Wasserstein-1 metric between distributions P and Q is defined as W ( P , Q ) : = min γ E ( x , y ) ∼γ [ ‖x− y‖ ] , where the minimization with respect to γ is over all joint distributions with marginals P and Q . By Kantorovich-Rubinstein duality , W ( P , Q ) has a dual representation W ( P , Q ) : = max D { Ex∼P [ D ( x ) ] − Ey∼Q [ D ( y ) ] } , ( 2 ) where the maximization is over all 1-Lipschitz continuous functions . Sobolev space and Sobolev dual norm . Let L2 ( P ) be the Hilbert space on Rd equipped with an inner product 〈u , v〉L2 ( P ) : = ∫ Rd uvdP ( x ) . The ( weighted ) Sobolev space H 1 is defined as the closure of C∞0 , a set of smooth functions on Rd with compact support , with respect to norm ‖u‖H1 : = ( ∫ Rd ( u 2 + ‖∇u‖22 ) dP ( x ) ) 1/2 , where P has a density . For v ∈ L2 , its Sobolev dual norm ‖v‖H−1 is defined by ( Evans , 2010 ) ‖v‖H−1 : = sup u∈H1 { 〈v , u〉L2 : ∫ Rd ‖∇u‖22 dP ( x ) ≤ 1 , ∫ Rd u ( x ) dP ( x ) = 0 } . The constraint ∫ Rd u ( x ) dx = 0 is necessary to guarantee the finiteness of the supremum , and the supermum can be equivalently taken over C∞0 . 3 PROPOSED MODEL : STEIN BRIDGING . In this section , we formulate our model Stein Bridging . A scheme of our framework is illustrated in Figure 1 . Denote by Preal the underlying real distribution from which the data { x } are sampled . The formulation simultaneously learns two generative models – one explicit and one implicit – that represent estimates of Preal . The explicit generative model has a distribution PE on X with explicit probability density proportional to exp ( −E ( x ) ) , x ∈ X , where E is referred to as an energy function . We focus on energy-based explicit model in model formulation as it does not enforce any constraints or assume specific density forms . For specifications , one can also consider other explicit models , like autoregressive models or directly using some density forms such as Gaussian distribution with given domain knowledge . The implicit model transforms an easy-tosample random noise z with distribution P0 via a generatorG to a sample x̃ = G ( z ) with distribution PG . Note that for distribution PE , we have its explicit density without normalizing term , while for PG and Preal , we have samples from two distributions . Hence , we can use the Stein discrepancy ( that does not require the normalizing constant ) as a measure of closeness between the explicit distribution PE and the real distribution Preal , and use the Wasserstein metric ( that only requires only samples from two distributions ) as a measure of closeness between the implicit distribution PG and the real data distribution Preal . To jointly learn the two generative models PG and PE , arguably the most straightforward way is to minimize the sum of the Stein discrepancy and the Wasserstein metric : min E , G W ( Preal , PG ) + λS ( Preal , PE ) , where λ ≥ 0 . However , this approach appears no different than learning the two generative models separately . To achieve information sharing between two models , we incorporate another term S ( PG , PE ) – called the Stein bridge – that measures the closeness between the explicit distribution PE and the implicit distribution PG : min E , G W ( Preal , PG ) + λ1S ( Preal , PE ) + λ2S ( PG , PE ) , ( 3 ) where λ1 , λ2 ≥ 0 . The Stein bridge term in ( 3 ) pushes the two models to achieve a consensus . Remark 1 . Our formulation is flexible in choosing both the implicit and explicit models . In ( 3 ) , we can choose statistical distances other than the Wasserstein metricW ( Preal , PG ) to measure closeness between Preal and PG , such as Jensen-Shannon divergence , as long as its computation requires only samples from the involved two distributions . Hence , one can use GAN architectures other than WGAN to parametrize the implicit model . In addition , one can replace the first Stein discrepancy term S ( Preal , PE ) in ( 3 ) by other statistical distances as long as its computation is efficient and hence other explicit models can be used . For instance , if the normalizing constant of PE is known or easy to calculate , one can use Kullback-Leibler ( KL ) divergence . Remark 2 . The choice of the Stein discrepancy for the bridging term S ( PG , PE ) is crucial and can not be replaced by other statistical distances such as KL divergence , since the data-generating distribution does not have an explicit density form ( not even up to a normalizing constant ) . This is exactly one important reason why Stein bridging was proposed , which requires only samples from the data distribution and only the log-density of the explicit model without the knowledge of normalizing constant as estimated in MCMC or other methods . In our implementation , we parametrize the generator in implicit model and the density estimator in explicit model as Gθ ( z ) and pφ ( x ) , respectively . The Wasserstein term in ( 3 ) is implemented using its equivalent dual representation in ( 2 ) with a parametrized critic Dψ ( x ) . The two Stein terms in ( 3 ) can be implemented using ( 1 ) with either a Stein critic ( parametrized as a neural network , i.e. , fw ( x ) ) , or the non-parametric Kernel Stein Discrepancy . Our implementation iteratively updates the explicit and implicit models . Details for model specifications and optimization are in Appendix E.2 . We also compare with some related works that attempt to combine both of the worlds ( such as energy-based GAN , contrastive learning and cooperative learning ) in Appendix A.3 .

Summary: In this paper, the task is to train an implicit and an explicit model simultaneously via GAN setting and a new regularizer called "stein bridge", which is constructed from the kernel Stein discrepancy between the implicit and explicit models. The idea of adding such regularization, with the notion of mutual regularization of two models, is interesting. The proposed regularization term is clearly presented, the illustration of stablizing the training procedure, and the empirical results are clearly shown and discussed. The sample quality from the generative models are compared.