## 2 Sample Expansion Methodology Based on CVAE-Skegan
### Encoding network  
The encoding network consists of an encoder and a decoder. The encoder inputs 3-channel images, which are processed through convolutional layer, batch normalization, and LeakyReLU activation function. The output of the convolutional layer is flattened by a fully connected layer, and the mean and variance mapped to the latent space are output, respectively. Then, the latent variable Z is calculated via reparametrization. The decoder receives the latent variable Z and obtains a flattened output through a fully connected layer. The final 3-channel images are obtained through a convolutional layer, a batch normalization, and a ReLU activation function. CVAE-SkEGAN uses variational autoencoder (VAE), which is mainly used to reduce the dimensionality of raw data and model the underlying structure of the data. VAE compresses the input data into a low-dimensional latent space, converts each data point into a normal distribution, transforms high-dimentional data into concise latent vectors, and then decodes them back into an approximate representation of original data for next steps. The purpose is to improve the quality of the generated samples. The optimization objective of the encoding network is to minimize the K-L divergence between the noise distribution and the true image distribution, and its loss is calculated as shown in Equation (1). \[L_{E}=KL\Big{(}N\Big{(}\mu,\sigma^{2}\Big{)}\|N(0,1)\Big{)}=\frac{1}{2}\Big{(}- \log\sigma^{2}+\mu^{2}\Big{)} \tag{1}\]  
Figure 1: Network structure diagram of CVAE-SkEGAN. where \(\mu\) is the mean mapped to the latent space, and \(\sigma^{2}\) is the variance. Generator  
The input of the generator is images output by the encoding network. The optimization goal of the generator is to produce realistic samples to deceive the discriminator. The basic network of the generator consists of convolutional layers, linear layers, batch normalization, and activation functions. The convolutional layer incorporates SKNets [35] that enable the generator to adaptively select convolutional kernels during training and enhance the learning ability of the model. Due to the similarity of SKNets, one of the SK blocks is described. The specific structure of the SK block is shown in Figure 2. For kernel 3 \(\times\) 3 and 5 \(\times\) 5, element-wise summation operation is performed and inputs into GP layer. Finally, using the softmax layer, the output of the GP layer is computed to obtain a set of weights. These weights measure the features of different convolutional kernels to form the final output of the SK block. To avoid the problem of gradient vanishing when using a single loss function, the genetic evolution structure in evolutionary generative adversarial networks (E-GAN) [36] is introduced to iteratively optimize through multiple loss functions. This enables the CVAE-SKEGAN model to select an adaptive generator for the next stage during the training process, thereby improving the quality and performance of the generator to adapt to the input data under different working conditions. The generator's optimization process is shown in Figure 3. The specific process is as follows:  
1 Output images decoded by variational autoencoder (VAE) are fed into the generator G for mutation training using the minimax loss function, Wasserstein loss function, and LS loss function. The minimax loss functions are shown in Equation (2). \[\min_{G}\max_{D}L(G,D)=E_{x\sim P_{data}}[\log D(x)]+E_{z\sim P_{z}}[\log(1-D( G(z)))] \tag{2}\]  
where \(x\sim P_{data}\) denotes \(x\) sampled from the true sample distribution \(P_{data}\), \(E(*)\) is the expected value, and \(z\sim p_{z}(z)\) indicates the noise data \(z\) sampled from a standard normal distribution \(p_{z}(z)=N(0,1)\). The generator loss function of WGAN-GP is shown in Equation (3), and the discriminator loss function is shown in Equation (4).