# 4-Class MI-EEG Signal Generation and Recognition with CVAE-GAN
## 4 Experimental Results
### Classifier Performance  
We utilized a similar classifier to compare the recognition performance involving before and after the data augmentation. The augmented part (generated samples) accounted for a quarter of the real training sets. Figure 6 shows the performance of testing classification with all subjects of D1 and D2. There was obviously growth of the classification accuracy after data augmentation both in D1 and D2 data. Moreover, we found the overfitting evidence in D2-S4 and reduced deviations of accuracy in D2, indicating improvement of the robustness on different subjects with appropriate data augmentation.  
Figure 7 shows the classification results of different models obtained on D2. It can be observed that the proposed CVAE-GAN is superior to other methods and achieves the best accuracy on D1 and D2, manifesting its superiority of adversarial models with the latent generation code and the generalization ability to automatically extract latent features from the subject's diversity. We can also find that the adversarial model CGAN can achieve better results but not in all subjects. This suggests that the latent representation encoding  
Figure 5: The average of the real and the generated samples from different subjects.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Model** & **IS** & **FID** & **SWD** \\ \hline Real & 1.478 & 0 & 0 \\ CNN & 1.284 & 10.234 & 0.087 \\ CGAN & 1.315 & 15.635 & 0.076 \\ CVAE & 1.296 & 32.743 & 0.082 \\ \hline CVAE-GAN & 1.357 & 11.364 & 0.067 \\ \hline \hline \end{tabular}
\end{table}
Table 3: Evaluation metrics for different generation models.  
can be helpful for subject invariant representations, inspiring us to explore subject-invariant features further.  
Figure 8 shows the confusion matrix and average accuracies of four classes all over the subjects of D2 compared with two methods including CGAN presenting conditional adversarial processing for EEG signal discrimination as well as CNN using the convolution processing for recognition about an 2D time-frequency target MI-EEG transformed by STFT. The lower-right value corresponds to overall accuracy. Bottom row depict sensitivity and rightmost column lists the precision which is defined as the indicator of specific classification characteristics. CVAE-GAN models have an obvious improvement in four MI-task classification, better than CNN being trained without appending generated data. The result also demonstrates the enhancement of MI-EEG-based recognition by appending generated data with the proposed framework.  
Figure 9 illustrates the confusion matrix corresponding to recognition with real and synthetic data. The recognition in real EEG has achieved 4 percent, exceeding the synthetic source. We were also conscious of the appearance that of its relatively high sensitivity and precision in tongue and feet movement imagery task in synthetic EEG data, revealing that the proposed generative architecture obtains advantages in single channel feature learning due to the fact that discriminating information of tongue and feet, is mainly contained in the Cz channel.  
Figure 6: The average of the real and the generated samples from different subjects.  
Figure 7: Experimental results of classification performance in the D1 and D2 dataset.