# Dual-Modality Transformer with Time Series Imaging for Robust Epileptic Seizure Prediction
## 5 Results and Discussion
### Cross-Dataset Validation  
The performance variation between the Bonn and CHB-MIT datasets (99.7% vs. 98.7% accuracy) can be attributed to several fundamental differences in data characteristics and classification complexity. Our detailed analysis reveals three key factors contributing to this disparity: First, the intrinsic separability of classes differs significantly between datasets. The Bonn dataset exhibits strong class separation, particularly for Seizure (S) versus non-seizure states, with an average inter-class distance of 2.68 (Figure 6). The seizure class shows consistently high separation values (ranging from 2.60 to 2.73) from all other classes. In contrast, the CHB-MIT dataset's binary classification task shows a more modest separability measure of 0.41 between ictal and interictal states (Figure 7), indicating inherently more challenging classification boundaries. Figure 5: UMAP visualization of learned features from different modalities. The plot demonstrates clear separation between different epileptic states, indicating effective feature learning by our dual-modality approach. Each point represents a sample, and colors indicate different seizure states. The clustering pattern shows that our model successfully learns discriminative representations that can effectively distinguish between different types of seizure activities. Figure 6: Class separability matrix for the Bonn dataset showing pairwise distances between different EEG states (Z: healthy eyes open, O: healthy eyes closed, N: interictal zone, F: epileptogenic zone, S: Seizure activity). Higher values indicate better class separation. Second, feature space analysis through dimensionality reduction techniques reveals distinct clustering patterns. As illustrated in Figure 8, the Bonn dataset's five-class structure shows well-defined clusters, particularly in the Seizure class (S), which forms a distinct region in both PCA (explaining 58.52% of variance) and t-SNE spaces. Figure 9 shows that the CHB-MIT dataset exhibits more complex feature distributions with significant overlap between classes, as evidenced by the scattered distribution in both dimensional reduction techniques. Figure 8: Dimensionality reduction visualization of the Bonn dataset feature space using PCA ((left), preserving 58.52% variance) and t-SNE ((right)), showing class clustering patterns. Figure 7: Class separability matrix for the CHB-MIT dataset showing the distance between ictal and interictal states in the binary classification task. Third, the examination of individual feature distributions demonstrates more pronounced discriminative characteristics in the Bonn dataset. As shown in Figure 10, key features such as the Signal-to-Noise Ratio (SNR) and spectral entropy show markedly different distributions across classes, particularly for the seizure class. Figure 11 reveals that the CHB-MIT dataset displays more subtle differences in feature distributions between ical and interictal states, with considerable overlap in all measured characteristics. This is particularly evident in the total power and dominant frequency features, where the distributions show significant overlap between states. Figure 10: Distribution of key EEG features across different classes in the Bonn dataset, including Signal-to-Noise Ratio (SNR), spectral entropy, dominant frequency, total power, skewness, and kurtosis. Figure 9: Feature space visualization of the CHB-MIT dataset using PCA (**(left)**, 63.98% variance explained) and t-SNE (**right**), illustrating the distribution of ical and interictal states. The higher accuracy achieved on the Bonn dataset (99.7%) can thus be attributed to its more distinct class separability and clearer feature differentiation. The slightly lower performance on CHB-MIT (98.7%) reflects the greater complexity of distinguishing between ictal and interictal states in continuous, long-term EEG recordings, where state transitions are more gradual and feature boundaries are less distinct.