# Dual-Modality Transformer with Time Series Imaging for Robust Epileptic Seizure Prediction
## 2 Related Work  
The commonly used time-frequency and frequency domain analysis tools are mainly several transforms, which are Short-Time Fourier Transform (STFT) [29], continuous wavelet transform [7], Discrete Wavelet Transform (DWT) [30], Hilbert-Huang transform [31], empirical mode decomposition [32], Q-wavelet transformation [33], and Mean Amplitude Spectrum (MAS) [34]. Recent advancements in time-frequency analysis have introduced more sophisticated approaches that address the limitations of classical methods. Modern variants of wavelet transforms, such as the Synchrosqueezing Wavelet Transform (SST), have demonstrated superior time-frequency resolution and robustness to noise. The SST achieves this by reassigning the wavelet coefficients based on their instantaneous frequencies, resulting in sharper and more interpretable time-frequency representations [35]. Deep learning has also revolutionized time-frequency analysis through learned representations. Time-Frequency-Deep Neural Networks (TF-DNNs) [36; 37] learn optimal time-frequency decompositions directly from data, outperforming fixed basis transformations like STFT and DWT. These networks adaptively adjust the frequency response according to the characteristics of the input signal, providing a significant improvement in feature discrimination compared to conventional methods. Traditional machine learning algorithms need to manually extract the features in the original signal and then input the original signals into the model for signal recognition and classification with the extracted features. In general, traditional machine learning classification methods include K-nearest neighbor method(KNN) [38], Support Vector Machine (SVM) [38], Artificial Neural Network (ANN) [39], and Fuzzy classifier [40]. However, the traditional machine learning algorithm is comparatively perfect. Some problems still exist that can not be avoided in the research. For example, When dealing with a task that needs to process a large amount of data, traditional machine learning algorithms face the difficulty of feature extraction. At the same time, if the original data need to be upgraded, it is a challenge for the machine learning algorithm to accurately identify and classify the upgraded data, such as images. Convolutional Neural Networks (CNNs) have demonstrated remarkable effectiveness in classifying EEG signal states for epilepsy detection and recognition. Unlike traditional machine learning approaches that require manual feature engineering, CNNs leverage localized receptive fields through convolution operations to automatically learn hierarchical representations directly from raw data. This automatic feature extraction capability preserves critical signal characteristics that might otherwise be lost in manual preprocessing. Through successive convolution and pooling operations, CNNs can extract multi-level features spanning low-level signal properties to high-level abstract patterns from EEG data [41]. The ability to capture deep, abstract feature representations enables CNNs to achieve superior classification accuracy compared to conventional machine learning methods, particularly for complex non-stationary signals like EEG, where manual feature extraction proves especially challenging. Recurrent Neural Networks (RNNs), first formalized mathematically by [PERSON] [42], introduced the crucial concept of cyclic connections in neural architectures. This design enables each node's output to depend not only on current inputs but also on previous hidden states, allowing the network to maintain temporal memory in sequential data processing. By propagating information across time steps, RNNs can model temporal dependencies in the data sequence. However, standard RNNs encounter gradient vanishing problems when modeling long-term dependencies. Long Short-Term Memory (LSTM) networks, originally proposed as a variant of RNNs [43], were specifically designed to address these limitations. LSTMs excel at extracting temporal patterns from EEG signals for epilepsy detection.