## 1 Introduction  
Epilepsy is a common neurological disorder characterized by the abnormal discharge of neural cells in the brain [1], leading to functional disturbances. It is characterized by recurrent, sudden, and temporary abnormalities in motor, sensory, emotional, behavioral, or mental symptoms. Epilepsy affects nearly 50 million people worldwide [2], with approximately 30% of patients unable to control their condition with medication. Early prediction of seizures is an important factor in effective treatment and management of epilepsy [3], as it can help prevent patients from engaging in potentially dangerous activities during seizure-free periods. Improving the accuracy of seizure prediction can greatly enhance the quality of life for patients and enable more effective preventive treatments. An electroencephalogram (EEG) is currently an effective diagnostic tool for epilepsy, as it can record abnormal brain activity associated with seizures [2]. However, the manual labeling and retrospective analysis of EEG signals by doctors is time-consuming and prone to errors due to the random and non-stationary nature of EEG signals [4; 5; 6]. Additionally, there are individual differences in EEG data among patients, and the occurrence of seizures in epilepsy patients is highly uncertain, with each patient having different seizure patternsand timing. Furthermore, EEG signals are often contaminated by other normal brain activities [7]. Therefore, seizure prediction based on EEG is still a challenging task [8]. In the past 20 years, computer-assisted epileptology research has gradually been applied to epilepsy classification and seizure prediction. Early seizure prediction methods mainly relied on thresholding techniques, where an increase or decrease in specific features was used to predict an impending seizure [9]. However, there is no unified standard feature for detection, making it difficult to achieve accurate predictions. More researchers have proposed using machine learning for seizure prediction. These algorithms mainly focus on combining feature extraction and classifier performance, showing relatively good results in detecting pre-seizure states [10; 11; 12; 13; 14]. However, these algorithms often require individualized analysis due to significant differences in seizure patterns among patients, making the process complex and impractical for wider applications [15; 16; 17]. Deep learning methods, on the other hand, can automatically extract features and train classifiers end-to-end, greatly improving feature extraction and achieving better classification results [18; 19; 20; 21]. However, these algorithms require a large amount of labeled EEG data for training, which relies on the diagnostic experience of clinical doctors and is a time-consuming and subjective process. Although significant progress has been made in the analysis of epilepsy using the above-mentioned methods, analyzing brain electrical signals still faces complexity and challenges. Firstly, due to the large differences between patients, it remains a very difficult task to differentiate between pre-ictal and interictal states in different patients, even for experienced medical experts. Secondly, the robustness of the models used is poor, sometimes resulting in lower performance for another patient when a model with an AUC score of 1 is used for a different patient, resulting in a lower score of 0.3 [19]. This fluctuation makes the model unreliable for other patients. Finally, due to the limitations of seizure disorders, obtaining labeled data before seizures is not readily available, which limits the availability of training data for machine learning and further restricts the predictive accuracy and generalizability of traditional machine learning models. Unsupervised feature learning has emerged as a promising direction for the application of deep learning in seizure prediction. It overcomes the difficulties of requiring a large amount of labeled data.