# GAN Training Acceleration Using Frechet Descriptor-Based Coreset
## 3 Methods
### Frechet Descriptor Distance  
Frechet Distance (FD) is used to measure the similarity between curves [31] and has been used in drug discovery [32], video applications [33], and others. In deep learning research, FD on Inception, termed Frechet Inception Distance (FID) [34], is commonly used in GAN models. To compute FID, an Inception model \(\mathcal{I}(\cdot)\) needs to be pre-trained, and the features from the penultimate layer of Inception model are extracted. Let \(I_{f}:\ R^{3}\to R\) be a 3D input image, and assuming these features from \(I_{f}\) come from a multivariate Gaussian, the image features can be represented as:  
\[\mathcal{I}\Big{(}I_{f};\Theta\Big{)}\sim\mathcal{N}_{f}(\mu_{f},\sum_{f}), \tag{3}\]  
where \(\Theta\) is the parameter set of Inception model, and \(\mu_{f}\) and \(\sum_{f}\) are mean and covariance matrices of multivariate Gaussian \(\mathcal{N}_{f}\). Let the image features on a 3D real image  
Figure 1: The overview of the BlobGAN model for blob identification.  
\[I_{r}:\ R^{3}\to R\ \text{be}\ \mathcal{I}(I_{r};\Theta)\sim N_{r}(\mu_{r}, \sum_{r})\text{ and the image features on a 3D synthesized image }\] \[I_{s}:\ R^{3}\to R\ \text{be}\ \mathcal{I}(I_{s};\Theta)\sim N_{s}(\mu_{s}, \sum_{s})\text{, then FID is defined as:}\] \[d_{FID}(N_{r}(\mathcal{I}(I_{r};\Theta)),N_{s}(\mathcal{I}(I_{s}; \Theta)))=\left\|\mu_{r}-\mu_{s}\right\|_{2}^{2}+tr(\sum_{r}+\sum_{s}-2\sqrt{ \sum_{r}\sum_{s}})\text{,} \tag{4}\]  
where \(tr\) is the trace of matrix. While FID is mainly used to evaluate the quality or effectiveness of GAN by measuring the similarity between real images and synthesized image, it has not been used as a distance metric in Coreset, mainly due to its computing costs. The computational complexity of FID is \(\mathcal{O}(\mathcal{I}(I_{r};\Theta)+\mathcal{I}(I_{s};\Theta)+d_{FID})\). It is known that computing \(\Theta\) and deep layers in Inception model is costly, with largest portion of computation dedicated for Inception model, that is, \(\mathcal{O}(\mathcal{I}(I_{r};\Theta)+\mathcal{I}(I_{s};\Theta))>>\mathcal{O} (d_{FID})\).  
To accelerate GAN training, we propose Frechet Descriptor Distance (FDD) as an alternative distance metric. This is motivated by the unique characteristics from the application of interest in this research, which is to say that the number of blobs is large and the shape of these blobs roughly follows Gaussian distributions. Instead of using FID on the whole images, FDD is to derive blob-related statistics which are used to measure the distances between the image pairs. In Section 3.1, we synthesize 3D blobs using 3D elliptical Gaussian function, and we know that each blob has 5 descriptors: \(\theta\), \(\varphi\), \(\sigma_{x}\), \(\sigma_{y}\) and \(\sigma_{z}\). These blob descriptors are object-related statistics in 3D blob images. Assume each descriptor follows a Gaussian and a 3D blob image consist of \(M\) blobs, the descriptors set \(\Omega=\left\{\theta,\ \varphi,\ \sigma_{x},\ \varphi_{y},\ \sigma_{z}\right\}_{i\in M}\) follows a multivariate Gaussian. Let the descriptor set on a 3D blob image \(I_{b}:\ R^{3}\to R\) be \(\Omega_{b}\sim N_{b}(\mu_{b},\sum_{b})\), then FDD for 2 pair-wisely compared 3D blob images \(I_{b1}\) and \(I_{b2}\) is defined as:  
\[d_{FDD}(N_{b1}(\Omega_{b1}),N_{b2}(\Omega_{b2}))=\left\|\mu_{b1}-\mu_{b2} \right\|_{2}^{2}+tr(\sum_{b1}+\sum_{b2}-2\sqrt{\sum_{b1}\sum_{b2}}) \tag{5}\]  
The computational complexity of FDD is \(\mathcal{O}(d_{FDD})\). \(\mathcal{O}(d_{FDD})\) is a function of \(M\), the number of blobs and \(\mathcal{O}(d_{FID})\) is a function of the image features from Inception model, for example, 64. We conclude \(\mathcal{O}(d_{FDD}\ )\approx\mathcal{O}(d_{FID})\), \(\mathcal{O}(\mathcal{I}(I_{r};\Theta)+\mathcal{I}(I_{s};\Theta))>>\mathcal{O} (d_{FID})\approx\mathcal{O}(d_{FDD})\), thus \(\mathcal{O}(\mathcal{I}(I_{r};\Theta)+\mathcal{I}(I_{s};\Theta)+d_{FID})>> \mathcal{O}(d_{FDD})\), and FDD is more computationally efficient for Coreset selection.