# Dual-Modality Transformer with Time Series Imaging for Robust Epileptic Seizure Prediction
## 1 Introduction
In response to these challenges, many researchers have attempted to improve the ability to identify epilepsy from EEG signals using alternative methods, such as time series imaging, which transforms one-dimensional EEG signals into two-dimensional visual representations, providing a novel approach to analyze brain activity patterns. This transformation allows us to leverage advanced image analysis techniques while preserving critical temporal information from the original EEG recordings [20; 21; 22]. [PERSON] et al. imaged EEG signals through the Gram Angle field, then inputted the image data into a hybrid Convolution Neural Network (CNN)-Long-Short Term Memory (LSTM) model (CNN-LSTM) for feature extraction, achieving an accuracy of 100% in F8 single-channel emotion recognition [20]. [PERSON] et al. developed DeepBraiNNet, an innovative approach that transforms EEG recordings into visual representations while preserving their key temporal characteristics. This method specifically addresses the challenge of motion-related artifacts in EEG signals, producing clear visualizations of brain activity patterns during motor imagery tasks [21], which, by incorporating LSTM, greatly reduces artifact effects in original EEG signals. When applied to real motion imagination datasets, this method produced clear, sparse Motor Imagery (MI)-related activation patterns. [PERSON] et al. converted the time series into a recursive graph and then extracted local features from it using a computer vision algorithm [23]. Extracted features are used to predict model averages. In summary, various time-series imaging techniques have been employed to encode one-dimensional time series into two-dimensional images [20; 21; 22]. However, these techniques often fail to retain the temporal dynamic properties of EEG signals, which are crucial for distinguishing between different types of epilepsy. In this context, the Markov Transition Field (MTF) transformation may be suitable, as it preserves the statistical and temporal dynamic properties of one-dimensional data and has been successfully applied to create two-dimensional representations of one-dimensional EEG signals. Moreover, the Markov Transition Field (MTF) transformation's ability to reconstruct the original time series from its representation (inverse nature) allows for effective pattern exploration in the transformed space [24]. Therefore, MTF has been considered for use in generating two-dimensional input images to classify both individual and potential features in EEG signals associated with different seizure types. The Markov Transition Field (MTF) represents a significant advancement in time series analysis, offering a sophisticated two-dimensional representation of one-dimensional temporal data [24; 25; 26]. Beyond simple visualization, MTF captures complex transition probabilities between discrete states while preserving crucial temporal dynamics and statistical properties of the original signal. Recent applications have demonstrated its effectiveness in epilepsy classification. Notably, [PERSON] et al. achieved 91% accuracy in a challenging six-class epilepsy classification task by combining MTF-based signal representation with CNN architecture [27]. Similarly, [PERSON] et al. extended this approach to sEMG signals, developing a Deep Neural Network (DNN) framework that achieved 91.02% accuracy in emotion classification [28]. These successful implementations validate MTF's capability to capture and preserve essential signal characteristics across different biomedical applications. To address these challenges and leverage the complementary strengths of both temporal and spatial information, we propose an Adaptive Dual-Modal Learning (ADML) model incorporating a novel Synergistic Modal Integration (SYNI) mechanism. Our research advances the field of epileptic seizure prediction through three main contributions:  
* We introduce a dual-stream architecture that simultaneously analyzes both raw EEG signals and their visual representations.