## 3 System Framework and Model Training
### Data Generation Experiment
\begin{table}
\begin{tabular}{l c c c c} \hline \hline  & \multicolumn{2}{c}{**CWRU Dataset**} & \multicolumn{2}{c}{**UoC Dataset**} \\ \cline{2-5}  & **MMD** & **PCC** & **MMD** & **PCC** \\ \hline GAN & 2.5757 & 0.5307 & 0.2706 & 0.8482 \\ WGAN & 0.3052 & 0.7640 & 0.1960 & 0.8642 \\ WGAN-GP & 0.0334 & 0.8270 & **0.0215** & 0.8898 \\ BiGAN & 2.0498 & 0.6101 & 0.2393 & 0.8557 \\ BiWGAN-GP & **0.0226** & **0.8277** & 0.0221 & **0.8917** \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Quantitative assessment results of the generation quality. The visualization supports the results of the quantitative assessment. Figure 7a,d show that mode collapse is evident in GAN and BiGAN, which should be the main reason  
Figure 7: Comparison between original and generated signals of CWRU dataset. (**a**) Original and generated signals of GAN. (**b**) Original and generated signals of WGAN. (**c**) Original and generated signals of WGAN-GP. (**d**) Original and generated signals of BiGAN. (**e**) Original and generated signals of BiWGAN-GP. for their higher MMD. It is noticeable that some significant frequency points in the origin are missing, but lots of unexpected spikes show up. Figure 7b shows that WGAN does not have mode collapse, but it seems to have a filtering effect that tends not to generate spikes, which also causes the error between the generated and real samples. It may be caused by gradient clipping in WGAN. In contrast, Figure 7c,e show that the difference of signals generated by WGAN-GP and BiWGAN-GP is difficult to distinguish, which is consistent with the results in the quantitative assessment. The features of the original spectrum are well-matched in the generated signals. Figure A1 shows that the generative results of the UoC dataset are relatively hard to distinguish by human eyes. However, we can tell that the signals generated by GAN and BiGAN have some meaningless fluctuations in the high-frequency part and some spikes in the gear spalling fault are missing. The results of WGAN-GP and BiWGAN-GP are better than others, and the PCC also confirmed it. The results suggest that Wasserstein distance with gradient penalty seems to be indispensable to improve the generation quality. (3) Analysis of the training loss: The trend of training loss may explain the difference in model generation quality. Losses are recorded during the unsupervised pre-training stage. Figure 8 shows the training loss of generator \(G\) and encoder \(E\) of BiGAN and BiWGAN-GP, and the training loss of generator \(G\) of WGAN-GP. The results show that the loss of BiGAN has an unstable trend. Under the same training conditions, BiWGAN-GP shows a different result, that the loss of \(E\) and \(G\) (also means the Wasserstein distance) decreases steadily. The loss values of WGAN-GP are much lower than those of BiWGAN-GP, but the numerical comparison between them is meaningless because of the missing encoder and the different discriminator structures. It is worth noting that they both have a steady trend. These curves demonstrate that the stability of BiWGAN-GP's training is much improved and also explain why the generative ability of BiWGAN-GP is better than BiGAN.