# DC-MMD-GAN: A New Maximum Mean Discrepancy Generative Adversarial Network Using Divide and Conquer
## 1 Introduction  
Generative adversarial networks (GANs) [1] have developed as an admirable class of implicit generative models (IGMs), whose purpose is forcing distribution of generated data \(\mathbb{Q}_{s}\) to mimic target distribution \(\mathbb{P}_{r}\). GANs alternately train two networks: generator and discriminator, in adversarial form. Generator attempts to produce vivid artificial samples, while discriminator distinguishes artificial samples from real ones. Since the original GAN [1] was proposed, diverse variants of GANs have appeared and shown impressive results on the tasks including image generation [2; 3; 4; 5; 6], video generation [7], transfer learning [8] and so on. From the perspective of loss function, the purpose of training GANs actually minimizes the distance \(\mathcal{M}(\mathbb{P}_{r},\mathbb{Q}_{s})\). Selecting appropriate distance \(\mathcal{M}(\mathbb{P}_{r},\mathbb{Q}_{s})\) applied in the loss function of GANs is important to generation performance. A 'good' distance is required to make it easy for generated distribution to converge to the target distribution. That is, the distance should be continuous evenwhen the target and generated distribution do not have non-negligible intersection [3]. Integral probability metric (IPM) [9], which offers convincing discrepancy between two distributions [10], becomes an important class of distance applied to GANs [10; 11; 12; 13], namely IPM-GANs. Equipped with a class of functions \(\mathcal{F}\) and given samples \(r\sim\mathbb{P}_{r}\) i.i.d. and \(s\sim\mathbb{Q}_{s}\) i.i.d., the IPM-type distance \(\mathcal{M}_{\text{IPM}}(\mathbb{P}_{r},\mathbb{Q}_{s})\) between two distributions \(\mathbb{P}_{r}\) and \(\mathbb{Q}_{s}\) is defined as (1). \(f\in\mathcal{F}\) is abstract function which is used to maximize the IPM-type distance. \[\mathcal{M}_{\text{IPM}}(\mathbb{P}_{r},\mathbb{Q}_{s})=\sup_{f\in\mathcal{F}} \left|\operatorname*{\mathbb{E}}_{r\sim\mathbb{P}_{r}}f(r)-\operatorname*{ \mathbb{E}}_{s\sim\mathbb{Q}_{s}}f(s)\right|. \tag{1}\]  
When \(\mathcal{F}\) is a \"unit ball\" in a reproducing kernel Hilbert space (RKHS), the corresponding IPM instance is the maximum mean discrepancy (MMD). MMD is also extended as a distance applied to GANs: the maximum mean discrepancy GANs (MMD-GANs) [14; 15]. In practice, the loss function used in MMD-GANs is an empirical estimate of Equation (1). The estimate has deviation with the expectation of MMD. The deviation is large when sample size is small [16]. The batch size(sample size) in MMD-GANs is usually less than 128 because of the complex training data, which is insufficient to get a precise estimate of MMD. Therefore, the deviation is large and incurs inaccurate prediction in each iteration of training. In this paper, we propose an efficient divide-and-conquer generative model: DC-MMD-GANs, which constrains loss function to tight bound on the deviation between empirical estimate and expected value of MMD. The loss value of DC-MMD-GANs can provide more precise gradients for updating network and accelerate the training process. Large deviation existing in MMD-GANs leads to slow convergence. However, expanding sample size effectively is challenging. To alleviate the existing problem, we consider decomposing the problem of expanding sample size to sub-problems and solving independently with a divide-and-conquer strategy. Our work is inspired by the divide-and-conquer strategy for kernel methods [17; 18; 19; 20]. DC-MMD-GANs contain division step and conquer step. In the division step, we use a pre-trained auto-encoder to learn the embedding of images from target distribution and conduct k-means on latent code space from the encoder to divide training images into adaptive subsets. The purpose of the division step is minimizing the correlation between different subsets and retaining more information of input data for DC-MMD-GANs to learn. Each sub-model can learn from each subset independently and efficiently. In the conquer step, sub-models are fed with subsets separately and trained synchronously.