Motor Imagery Brain-Computer Interfaces (MI-BCIs) employ machine learning to interpret brain activity patterns associated with imagined movements, translating them into commands for external devices. In recent years, Visibility Graph (VG) methods have been widely used for analyzing biological signals such as electroencephalography (EEG), demonstrating promising results. This paper introduces a novel MI-BCI system based on VG analysis. Our proposed method for classifying left- and right-hand motor imagery consists of two approaches: global and local. In the global approach, each EEG channel is transformed into a graph, and fifteen features are extracted. This graph-based transformation preserves the complex relationships within EEG signals, enhancing the feature extraction process. The features are then reduced using the Minimum Redundancy Maximum Relevance (mRMR) method, which improves computational efficiency and reduces overfitting risks. The classification is performed using Linear Discriminant Analysis (LDA), K-Nearest Neighbors (KNN), and Random Forest (RF). In the local approach, each trial is divided into three segments, and each segment is converted into a graph with fifteen extracted features. The mRMR method is again applied for feature selection, and classification is performed on each segment, with majority voting determining the final class. The results indicate that the proposed method outperforms the global approach, achieving mean accuracy, sensitivity, precision, and F1-score of 74.62%, 76.36%, 74.77%, and 74.74%, respectively, for the classification of motor imagery tasks involving left- and right-hand movements. A comparison with previous studies using the same dataset confirms the superior performance of the proposed method.
Multiple Sclerosis (MS) and Myelitis are serious inflammatory spinal cord disorders with overlapping clinical symptoms and radiological characteristics, making accurate differentiation challenging yet clinically essential. Early and precise diagnosis is critical for guiding treatment strategies and improving patient outcomes. In this study, we propose KhayyamNet, a novel hybrid deep learning architecture designed to fuse complementary local and global representations for the accurate diagnosis of MS and Myelitis using spinal MRI. To improve robustness and generalization capability, a comprehensive preprocessing strategy including data augmentation and intensity normalization is also applied to reduce noise and address data variability. The proposed architecture combines three complementary deep learning models for feature extraction composed of Xception for high-level semantic features, Convolutional Neural Networks (CNNs) for fine-grained local patterns, and Vision Transformers (ViTs) for global contextual representations via attention mechanisms. Extracted features are then fused and refined using the Minimum Redundancy Maximum Relevance (MRMR) algorithm to eliminate redundancy and retain the most informative signals. Finally, a Random Forest (RF) classifier utilizes the optimized feature set to achieve accurate and robust differentiation between MS, Myelitis, and control spinal MRIs. Experimental results demonstrate that KhayyamNet outperforms existing methods by achieving an average classification accuracy of . This framework demonstrates promising performance for the automated analysis of spinal MRIs and shows potential to assist in the differentiation of MS and Myelitis. While these findings highlight the potential of KhayyamNet for automated MRI interpretation, its evaluation is limited to a single-center dataset, and further validation on external multi-center data is required.