# Two-View Mammogram Synthesis from Single-View Data Using Generative Adversarial Networks
## 2 Materials and Methods
### Training Networks
#### 2.1.1 CR-Gan  
CR-GAN was developed to generate multi-view face images from single-view photographs using two-pathway networks [32]. The term complete representation suggests that the generation of superior-quality and identity-preserved images is guaranteed, even from unseen inputs not included in the training data set. The authors mentioned that the two-pathway networks enable coverage of the whole latent space and learning of complete representations. Conversely, an issue encountered by most GAN-based novel-view generation methods is that they learn only the training data and map only a subspace in the latent space, due to the single-pathway nature of the networks; namely, the encoder-decoder network used by the discriminator [28; 29; 30; 31]. The two-pathway networks of CR-GAN include the generation and reconstruction paths. The two paths share the same generator (\(G\)). Figure 1 provides an illustration of the two-pathway networks used in our training. In the generation path, \(G\) takes random noise \(\mathbf{z}\) and a view label \(v_{1}\), then tries to produce a realistic image \(\mathbf{\tilde{x}}=G(v_{1},\mathbf{z})\). The label is a one-hot vector for MLO- or CC-view direction. The discriminator (\(D\)) is trained to distinguish \(\mathbf{\tilde{x}}\) from a real image \(\mathbf{x_{1}}\) labeled with \(v_{1}\), by minimizing  
\[\mathop{\mathbb{E}}_{\mathbf{z}\sim\mathbb{P}_{z}}[D_{s}(\mathbf{\tilde{x}})]-\mathop{ \mathbb{E}}_{\mathbf{x}\sim\mathbb{P}_{x}}[D_{s}(\mathbf{x_{1}})]+\lambda_{1}\mathop{ \mathbb{E}}_{\mathbf{\tilde{x}}\sim\mathbb{P}_{\mathbf{\tilde{x}}}}[(||\
abla_{\mathbf{ \tilde{x}}}D(\mathbf{\tilde{x}})||_{2}-1)^{2}]-\lambda_{2}\mathop{\mathbb{E}}_\mathbf{{x}\sim\mathbb{P}_{\mathbf{\tilde{x}}}}[P(D_{v}(\mathbf{x_{1}})=v_{1})], \tag{1}\]  
where \(\mathbb{P}_{x}\) is a real data distribution, \(\mathbb{P}_{z}\) is a noise uniform distribution, and \(\mathbb{P}_{\mathbf{\tilde{x}}}\) denotes arbitrary point of linear interpolation between the real distribution \(\mathbb{P}_{x}\) and the generated distribution. Furthermore, \(D_{s}(\cdot)\) denotes the image quality, indicating how realistic the image is, \(D_{v}(\cdot)\) estimates the image view, and \(P(D_{v}(\cdot))\) represents the probability of it being a specific view. \(G\) strives to fool \(D\) by maximizing  
\[\mathop{\mathbb{E}}_{\mathbf{z}\sim\mathbb{P}_{\mathbf{\tilde{x}}}}[D_{s}(\mathbf{\tilde{x }})]+\lambda_{3}\mathop{\mathbb{E}}_{\mathbf{z}\sim\mathbb{P}_{\mathbf{\tilde{x}}}}[P( D_{v}(\mathbf{\tilde{x}})=v_{1})]. \tag{2}\]  
The first and second terms in Equation (1) maximize the Wasserstein distance \(\mathbf{W}(\mathbb{P}_{r},\mathbb{P}_{\theta})\) between the probability distributions of the real and synthesized samples [22]:  
\[\mathbf{W}(\mathbb{P}_{r},\mathbb{P}_{\theta})=\mathop{\mathbb{E}}_{\mathbf{x}\sim \mathbb{P}_{r}}[D(\mathbf{x})]-\mathop{\mathbb{E}}_{\mathbf{z}\sim\mathbb{P}_{\theta}}[ D(\mathbf{\tilde{x}})], \tag{3}\]  
where \(\mathbb{P}_{r}\) is the real data distribution, \(\mathbb{P}_{\theta}\) is the model distribution implicitly defined by \(\mathbf{\tilde{x}}=G(\mathbf{z})\), and \(\mathbf{z}\) is sampled from a noise distribution. The third term in Equation (1) con strains the gradient norm of \(D(\mathbf{\hat{x}})\) with a penalty, because the optimized discriminator has an L2 norm of the gradient of almost 1, with respect to the input \(\mathbf{\hat{x}}\), at any interpolation point. The reconstruction path samples a real image pair \(\mathbf{x}=(\mathbf{x}_{1},\mathbf{x}_{2})\), and aims to reconstruct \(\mathbf{x}_{2}\) from \(\mathbf{x}_{1}\). If \(\mathbf{x}_{1}\) is MLO-view, then \(\mathbf{x}_{2}\) is the CC-view of the identical subject, and vice versa. Although the purpose of this work is to synthesize CC views from MLO views, we conduct mainly bi-directional training and complementarily investigate unidirectional training. Incidentally, the original CR-GAN employs only bi-directional training.