# PadGAN: An End-to-End dMRI Data Augmentation Method for Macaque Brain
## 2 Materials and Methods
### PadGAN
#### 2.3.2 Auxiliary GAN  
In the field of image generation, there is typically no end-to-end training data accessible. The extraction of latent space features is often achieved through several fully connected layers to decouple Gaussian noise and generate more diverse images [39]. The peak information map proposed in this paper provides end-to-end training data for extracting latent space features. We adopted an adversarial learning approach to extract latent space features to enhance the details of the generated images. The role of the auxiliary generative adversarial network is to provide high-quality latent space information to the primary generative adversarial network. To achieve this, the auxiliary GAN continuously maps from the peak information map to the low b-value images through adversarial learning. The main architecture of the auxiliary generator network adopts a U-Net convolutional neural network, which is divided into an encoder and a decoder. The encoder consists of 8 down-sampling convolutional blocks, while the decoder consists of 8 up-sampling convolutional blocks. After encoding through the 8 down-sampling convolutional blocks, the input data obtain a \(512\times 1\times 1\) latent space feature, as shown in Equation (3). \[Latent=8*DC(x) \tag{3}\]  
where \(Latent\) represents latent space features, \(8*DC(\cdot)\) represents the 8 down-sampling convolution operations, and \(x\) represents the input image, where the output of each down-sampling convolution operation serves as the input to the next down-sampling convolution operation. The specific down-sampling convolution operation is shown in Equation (4). \[fea=LReLU(BN(Conv(input))) \tag{4}\]  
where \(fea\) represents the feature map obtained from a down-sampling convolution operation \(DC(\cdot)\), \(LReLU(\cdot)\) represents the LeakyReLU activation function, \(BN(\cdot)\) represents the batch normalization operation, and \(Conv(\cdot)\) represents the convolution operation with a kernel size of 4 \(\times\) 4, stride of 2, and padding of 1. \(input\) denotes the input image or feature map. It should be noted that there is no activation function operation in the first down-sampling convolutional layer, and the ReLU activation function is used instead of LeakyReLU in the last down-sampling convolutional layer. The latent space features have two destinations: The first one is sent to the primary network to enhance its generation capability, and the second one is sent to the auxiliary network to strengthen the inherent properties of the latent space features. Within the auxiliary network, 8 up-sampling convolution modules decode the latent space features and map them to the low b-value space, as shown in Equation (5). \[\hat{y}=8*UC(Latent) \tag{5}\]  
where \(\hat{y}\) represents the output image of the auxiliary generator, and \(8*UC(\cdot)\) denotes 8 up-sampling transpose convolution operations, where the output of each up-sampling transpose convolution operation serves as the input to the next up-sampling transpose convolution operation. The specific details of the up-sampling transpose convolution operation are outlined in Equations (6) and (7). \[fea_{Ci}= \begin{cases}fea_{DC(9-i)},i=1\\ Concat(fea_{DC(9-i)},fea_{UC(i-1)}),i=2,3,...,8\end{cases}  \tag{6}\]  
\[fea_{UCi}= \begin{cases}ReLU(BN(ConvT(fea_{Ci}))),i=1,2,...,7\\ Tanh(ConvT(fea_{Ci})),i=8\end{cases}  \tag{7}\]  
where \(fea_{DC(9-i)}\) represents the features of the (9-\(i\))-th down-sampling convolutional module, and \(fea_{UCi}\) represents the features of the \(i\)-th up-sampling transpose convolutional module. \(Concat(\cdot)\) represents the operation of concatenating feature dimensions. If this is the firstup-sampling transpose convolutional module, the \(Concat(\cdot)\) operation is ignored. \(ReLU(\cdot)\) represents the ReLU activation function, and \(ConvT(\cdot)\) denotes the transpose convolution operation, with a kernel size of 4 \(\times\) 4, a stride of 2, and padding of 1. \(Tanh(\cdot)\) represents the Tanh activation function.