# Dual-Modality Transformer with Time Series Imaging for Robust Epileptic Seizure Prediction
## 1 Introduction  
Epilepsy represents one of the most prevalent chronic neurological disorders globally, affecting over 50 million individuals worldwide [1, 2, 3]. This condition manifests through severe clinical symptoms, including limb convulsions, loss of consciousness, and syncope, profoundly impacting patients' health and quality of life [1, 4, 5]. The unpredictable, recurrent, and sudden nature of these manifestations creates significant challenges for both patients and healthcare providers, underscoring the critical importance of accurate classification and diagnosis in clinical treatment. Electroencephalography (EEG) has emerged as the cornerstone of epilepsy diagnosis, distinguished by its non-invasive nature, accessibility, and cost-effectiveness [6, 7, 8, 9, 10]. While traditional diagnostic approaches rely on expert clinicians analyzing extensive EEG datasets [7], this methodology often yields subjective and variable conclusions, creating a substantial workload for medical professionals. The advent of machine learning and deep learning technologies has revolutionized epilepsy classification, enabling automated EEG analysis systems that facilitate more efficient and precise diagnosis. However, the inherent complexity of EEG signals--characterized by non-stationarity and subtle featurevariations [7; 9; 11; 12]--necessitates sophisticated preprocessing techniques before applying deep learning models. Current preprocessing approaches predominantly employ wavelet transforms and short-time Fourier transforms [12; 13], though these methods present significant limitations. The efficacy of wavelet transformation critically depends on wavelet function selection, with no universal solution suitable for all signal types. This challenge becomes particularly acute when processing complex EEG signals, where wavelet function choice substantially impacts analytical outcomes. Furthermore, these transforms impose considerable computational overhead, generating large coefficient matrices that demand substantial storage capacity, especially for high-resolution data processing. The critical nature of scale selection in wavelet functions adds another layer of complexity, where suboptimal choices can result in the loss of crucial signal features [14; 15; 16]. Short-time Fourier transforms face similar challenges, requiring significant computational resources and careful window size selection while struggling to effectively capture rapidly changing or transient signal characteristics. These parameter-dependent preprocessing methods ultimately compromise algorithmic robustness and clinical practicality through their sensitivity to parameter selection and functional choices. In addition to common preprocessing algorithms, including traditional methods such as wavelet transform and short-time Fourier transform, many newer methods have been proposed for processing non-smooth signals. The Empirical Wavelet Transform-based filtering method has shown superior performance in preserving signal characteristics while effectively removing artifacts [17]. This method adaptively constructs a wavelet filter based on the spectral content of the signal and provides a higher signal-to-noise ratio compared to conventional wavelet methods. Additionally, modern deep learning-based denoising approaches have emerged as powerful alternatives to traditional methods. Autoencoders with skip connections have shown remarkable capability in preserving important EEG features while removing noise [18]. Attention-based denoising networks that can focus on relevant signal components while suppressing artifacts have achieved great performance in EEG signal enhancement [19]. However, these preprocessing methods still face challenges in parameter optimization and computational efficiency, particularly when dealing with real-time applications.