INTRODUCTION
Multiple sclerosis (MS) is a chronic inflammatory disease of the central nervous system (CNS), characterized by demyelination, axonal loss, and neuroinflammation (Peng et al., 2021). It affects approximately 2.8 million people globally, with symptoms ranging from mild sensory disturbances to severe motor impairment and cognitive deficits (Seccia et al., 2021). Diagnosis of MS relies heavily on clinical evaluation, supplemented by magnetic resonance imaging (MRI), to visualize lesions in the nervous system (Nabizadeh et al., 2022). However, accurate interpretation of MRI data poses significant challenges due to the heterogeneous nature of MS lesions, which vary in size, location, and appearance. This complexity necessitates the development of advanced computational methods to improve the accuracy and efficiency of MS diagnosis (Karaca et al., 2017).
MS may manifest as physical symptoms, such as muscular weakness, compromised coordination, tiredness, and walking difficulties (Aslam et al., 2022). These symptoms may substantially influence an individual’s capacity to carry out everyday tasks, such as walking, dressing, and taking care of oneself. In addition, MS relapses, which are marked by the abrupt occurrence or worsening of symptoms, might intensify physical restrictions and unpredictability (Shoeibi et al., 2021). Individuals with MS frequently have cognitive impairment, which may manifest as difficulties in memory, attention, processing speed, and problem-solving skills. Cognitive symptoms may disrupt one’s ability to do tasks and engage in social relationships, and they may negatively impact general well-being, leading to emotions of frustration, worry, and sadness (Moazami et al., 2021). Dealing with a chronic and unexpected ailment such as MS may have a negative impact on one’s mental well-being.
A significant number of individuals with MS encounter mood disorders, such as sadness and anxiety, which may worsen symptoms and negatively affect their overall well-being (Shafi et al., 2021). Dealing with the unpredictability of MS prognosis and the possibility of disease advancement may also result in emotions of apprehension, tension, and social seclusion. MS may influence several facets of social functioning, such as interpersonal connections, occupational status, and engagement in social events (Storelli et al., 2022). Individuals with MS may struggle to perform their routines due to physical or cognitive impairments, resulting in financial strain and reduced social involvement. Moreover, the capriciousness of MS symptoms might provide challenges in terms of scheduling and participating in social engagements, thereby affecting interpersonal connections and social support systems.
MRI is vital in detecting diseases, especially neurological conditions such as MS, since it produces comprehensive images of soft tissues. This allows for identification of lesions and abnormalities that are not visible with conventional imaging techniques. It may be used repeatedly without radiation due to its non-invasiveness. The advanced imaging capabilities of MRI enable early identification of diseases, monitoring of illness development, and customization of therapies. In order to tackle the issue of class imbalance in the dataset, several methods were used, including data augmentation, synthetic data production, and implementation of weighted loss functions during model training. These strategies were applied to guarantee equitable performance across all classes.
The key MRI features indicative of MS include the presence of lesions or plaques in the white matter. These lesions are the hallmark of MS and are found in specific areas such as periventricular, juxtacortical, infratentorial, and spinal cord regions. On MRI, MS lesions typically appear as hyperintense areas on T2-weighted and fluid-attenuated inversion recovery (FLAIR) sequences and as hypointense areas, also known as “black holes,” on T1-weighted sequences. Additionally, gadolinium-enhanced MRI can highlight active inflammation by showing areas of active demyelination where the blood–brain barrier is disrupted.
Despite the critical role of MRI in diagnosing MS, the interpretation of MRI images is complex and requires specialized expertise. The manual assessment of MRI scans can be time-consuming and prone to inter-observer variability, potentially leading to diagnostic delays or inaccuracies. This variability is particularly problematic given the importance of early diagnosis in MS, which can facilitate timely intervention and improve long-term outcomes. Automated analysis methods, leveraging advances in deep learning and machine learning, offer the potential to enhance the accuracy and efficiency of MS detection.
Ensemble learning (EL) methods use a combination of multiple base classifiers to enhance the accuracy and dependability of predictions (Gaj et al., 2021). By integrating multiple sources of information derived from MRI data, ensemble models can more effectively capture the intricate patterns and variability associated with MS lesions, resulting in more precise and resilient diagnostic decisions (Mangeat et al., 2020). EL techniques are especially suitable for dealing with varied and unbalanced datasets that are often encountered in medical imaging, such as MRI data used for diagnosing MS. Ensemble models can improve the reliability of MS diagnosis by combining the predictions of many classifiers (Huang et al., 2021). This allows them to adjust to differences in data distribution and generalize well to unseen samples. As a result, ensemble models are able to provide accurate diagnoses across varied patient groups and imaging techniques. Ensemble classifiers provide transparent results, allowing clinicians to comprehend the fundamental elements contributing to the model’s predictions. The openness of the diagnostic process fosters trust and confidence, improving clinical decision-making and patient communication (Taloni et al., 2022). The motivation for employing EL techniques in MRI-based MS diagnosis stems from the need to overcome several challenges inherent in medical image analysis. Firstly, MRI data are high-dimensional and inherently noisy, making extraction of meaningful features that discriminate between MS lesions and normal tissue difficult. EL offers a solution by combining multiple base classifiers, each trained on different subsets of the data or using different features, to improve predictive performance and robustness. Secondly, MS is a heterogeneous disease with diverse clinical manifestations and imaging phenotypes, requiring models that can effectively capture this variability. Ensemble classifiers, such as CatBoost, XGBoost, and random forest (RF), excel at handling diverse datasets and can adapt to complex decision boundaries, making them well suited for MS diagnosis.
This study contributes to MRI-based MS diagnosis by proposing a novel framework that integrates deep learning-based feature extraction with ensemble classifiers. The framework leverages the SWIN transformer and MobileNetV3-small architectures for feature extraction from MRI images, capturing both global and local information relevant to MS lesions. The extracted features are then fed into ensemble classifiers, including CatBoost, XGBoost, and RF, to combine the strengths of deep learning and traditional machine learning techniques. By aggregating the predictions of multiple base classifiers, the ensemble model enhances the discriminative power and generalizability of the system, resulting in a more accurate and reliable MS diagnosis.
LITERATURE REVIEW
MRI continues to be deemed a highly reliable method for diagnosing MS. Standard MRI sequences, such as T1-weighted, T2-weighted, and FLAIR images, are often used to evaluate MS lesions in the CNS (Barquero et al., 2020). T2-weighted images exhibit high sensitivity to MS lesions, which manifest as regions of enhanced brightness, suggesting elevated water content resulting from inflammation and demyelination. FLAIR images attenuate the signal originating from cerebral fluid, hence increasing the differentiation between lesions and healthy tissue (Barquero et al., 2020). Diffusion-weighted imaging (DWI) is an MRI technique that quantifies the stochastic movement of water molecules in biological tissues. DWI may provide valuable information on the microscopic alterations linked to MS lesions, including axonal damage and inflammation (Barquero et al., 2020). Diffusion tensor imaging, a modified form of DWI, measures the orientation of water diffusion, allowing for the evaluation of the structural integrity and connectivity of white matter in individuals with MS (Barquero et al., 2020).
Magnetism transfer imaging (MTI) is an MRI method used to quantify the transfer of magnetism between unbound water protons and bound protons linked to macromolecules, such as myelin (Salem et al., 2020). MRI can identify small variations in the amount and quality of myelin, making it capable of detecting the first phases of demyelination in MS. MTI may provide further information on MS lesions beyond traditional MRI sequences by measuring magnetization transfer ratios or magnetization transfer saturation (Salem et al., 2020).
Proton magnetic resonance spectroscopy (MRS) is a non-invasive method used to quantify the levels of several metabolites in the brain, including N-acetylaspartate, choline, creatine, and myo-inositol. MRS has the capability to identify metabolic alterations linked to MS pathology, such as neuronal degeneration, inflammation, and gliosis (Salem et al., 2020). Modifications in the ratios of metabolites can be detected in MS lesions and normal-appearing white matter. These modifications provide valuable information on the illness development and treatments’ effectiveness (Nair et al., 2020). Positron emission tomography and single-photon emission computed tomography are nuclear imaging methods used to evaluate several aspects of MS pathology, such as inflammation, microglial activation, and neuronal function (Coll et al., 2023). Positron emission tomography tracers that selectively bind to specific molecular markers, such as translocator protein or microglial activation indicators, may provide insights about neuroinflammation and the level of disease activity in MS. Similarly, using radiopharmaceuticals that target cerebral perfusion or neurotransmitter receptors might provide valuable information on neuronal dysfunction and abnormalities in neurotransmitters in individuals with MS (Birenbaum and Greenspan, 2016).
MRI allows for the observation of MS lesions in several areas of the CNS, such as the brain and spinal cord (Birenbaum and Greenspan, 2016). The allocation and weight of MS lesions on MRI images provide crucial insights into the severity, advancement, and prognosis of illness. Evaluating the extent and pattern of lesions over a period of time may aid in tracking the progression of the illness, gauging the effectiveness of therapy, and forecasting the long-term results in individuals with MS. MRI is essential for differentiating MS from other neurological disorders with similar clinical manifestations, such as neuromyelitis optica, acute disseminated encephalomyelitis, and CNS vasculitis. MRI markers associated with MS, such as lesions around the ventricles, near the cortex, and in the lower part of the brain, with a specific distribution pattern, help distinguish MS from other conditions that resemble it (Birenbaum and Greenspan, 2016).
Several research studies have explored different machine learning and deep learning methods for identifying MS using MRI data (Birenbaum and Greenspan, 2016). Conventional machine learning methods, such as support vector machines, decision trees, and RFs, have been extensively used to segment and classify MS lesions. These techniques usually depend on manually designed characteristics retrieved from MRI scans, such as intensity, texture, and form characteristics, to differentiate between MS lesions and normal tissue. Deep learning methods have become more prevalent in medical image analysis since they can automate the diagnosis of MS and provide more precise results (Zou et al., 2024). Convolutional neural networks (CNNs) have shown impressive efficacy in extracting discriminative features directly from unprocessed MRI data, eliminating the need for manually designed features. Research studies (Kaggle Repository, June 7, 2023; Ansari et al., 2021; La Rosa et al., 2022; Pandian and Udhayakumar, 2023; Wiltgen et al., 2024) have investigated several CNN structures, such as two-dimensional (2D) and 3D CNNs, to segment and classify MS lesions. These studies have shown notable advancements regarding accuracy and efficiency.
In the current literature on MS detection using MRI and machine learning techniques, several knowledge gaps persist that hinder the advancement and application of automated diagnostic methods. Firstly, there is a notable absence of large-scale, multi-center studies encompassing diverse patient populations. Existing research often relies on limited datasets from single institutions, which may not represent the full spectrum of MS manifestations across different demographics and geographic regions. This lack of diversity undermines the robustness and generalizability of developed models, which are crucial for reliable clinical implementation and validation.
Secondly, while machine learning algorithms have shown promise in automating MS diagnosis from MRI, many studies do not adequately address the challenge of class imbalance within their datasets. The imbalance between normal MRI scans and those showing MS-related abnormalities can lead to biased models that favor the majority class, compromising the sensitivity and specificity required for accurate diagnosis. Effective strategies for handling class imbalance, such as data augmentation, synthetic minority oversampling technique, or weighted loss functions, are essential yet often underexplored or inconsistently applied in the literature.
Additionally, there remains a need for standardized protocols and benchmarks for evaluating the performance of MS detection models. The lack of uniform criteria for model comparison and evaluation metrics makes it difficult to assess the true efficacy and reproducibility of different approaches across studies. This variability in methodology also complicates efforts to integrate promising research findings into clinical practice, where consistency and reliability are paramount.
Furthermore, interpretability of deep learning models in the context of MS diagnosis remains a challenge. While these models can achieve high accuracy, their complex architecture often makes it difficult to interpret how and why specific decisions are made. Clinicians require transparent and interpretable diagnostic tools to trust and effectively utilize automated systems in patient care. Addressing these knowledge gaps through collaborative, multi-disciplinary research efforts will be critical in advancing the field of automated MS diagnosis. Future studies should prioritize large-scale, diverse datasets, robust handling of class imbalance, standardized evaluation protocols, and enhanced model interpretability to facilitate the translation of research innovations into clinically impactful tools.
METHODOLOGY
This study aims to examine the efficacy of EL-based methods for MS identification utilizing MRI data using a systematic and rigorous research process. The technique comprises several fundamental components, such as model construction, assessment, and interpretation, and is individually tailored to fulfill unique research objectives. Figure 1 presents the recommended framework to detect MS using MRI images. In addition, the proposed algorithm is presented in Figure 2.

The recommended MS detection model. Abbreviations: MRI, magnetic resonance imaging; MS, multiple sclerosis; SHAP; SHapley Additive exPlanations.
The use of an EL technique has enhanced the efficacy of identifying MS using MRI data by combining the advantageous attributes of numerous models, resulting in more resilient and precise predictions. Employing a range of models such as the SWIN transformer and MobileNetV3-small guarantees a thorough extraction of characteristics, including several facets of the data. Ensemble classifiers like CatBoost, XGBoost, and RF mitigate overfitting by combining predictions, thus addressing biases and variances present in individual models. This combination improves the capacity to apply knowledge to a wide range of situations, leading to improved performance on various datasets and eventually reaching greater accuracy and dependability in diagnosing MS.
Addressing the computational demands of EL in the context of MS detection from MRI data involves strategic measures adopted by researchers to optimize efficiency without compromising accuracy. Researchers often begin by selecting computationally efficient base models that strike a balance between complexity and performance. For example, they might choose lightweight architectures like MobileNetV3-small alongside more sophisticated models such as SWIN transformer, leveraging the latter’s ability to capture intricate features while minimizing computational overhead. To further mitigate costs, parallel processing techniques are employed, harnessing the capabilities of modern graphical processing units to accelerate model training and inference. Additionally, dimensionality reduction methods and feature engineering techniques are applied to streamline input data, reducing the computational burden by focusing on the most informative features. Ensemble pruning strategies help identify and retain the most impactful models within the ensemble, while stacking methods combine predictions from a subset of models to maintain ensemble performance with less computational resources. These approaches collectively optimize the computational efficiency of EL frameworks, making them more feasible for practical application in MS diagnosis and other medical imaging tasks.
Data acquisition
The publicly accessible Kaggle MS dataset (Kaggle Repository, June 7, 2023) contains MRI data for MS detection and analysis studies. The dataset consists of a comprehensive and heterogeneous assortment of MRI scans obtained from individuals with MS, including different disease subtypes, durations, and clinical manifestations. In addition, images of healthy controls or individuals with different neurological diseases may be added for comparison and validation. The dataset includes clinical metadata, such as demographic details (age, sex), illness history (length of disease, history of relapses), and clinical scores, gathered to provide context and aid in data interpretation.
Feature extraction
During the feature extraction phase, the SWIN transformer network processes each patch of the MRI image. During each step of the network, the patches undergo a sequence of changes, including multi-head self-attention and feed-forward neural network layers. These changes allow the network to acquire meaningful representations of the input patches, capturing local and global properties important for MS identification.
The SWIN transformer excels at capturing hierarchical structures of input pictures. As the input patches traverse the levels of the network, they are combined and improved to represent more complex and contextually aware characteristics. The hierarchical encoding of MRI images enables the extraction of distinctive characteristics, enabling the model to distinguish between MS lesions and normal tissue accurately. After extracting the features from all patches and running them through the SWIN transformer network, they are combined and consolidated to create a condensed representation of the complete input picture. This feature representation combines significant data related to MS detection, capturing the image’s specific details and overall context.
MobileNetV3 comprises a sequence of efficient components, such as inverted residual blocks and linear bottlenecks, specifically intended to reduce computing complexity while increasing the ability to convey information. The network design utilizes efficient depthwise separable convolutions, which decompose traditional convolutions into depthwise and pointwise convolutions, reducing the number of parameters and computing costs. During the feature extraction step, the MRI images that have been preprocessed are inputted into the MobileNetV3 network. As the input picture passes through the network layers, it goes through a sequence of convolutions, nonlinear activations (such as rectified linear unit), batch normalization, and pooling processes. These procedures allow the network to obtain hierarchical representations of the input picture, including basic visual properties (such as edges and textures) and more advanced semantic information necessary for MS recognition. MobileNetV3 has a notable benefit in its capability to provide concise and compelling feature representations, which makes it highly suitable for use on devices with limited resources. MobileNetV3 utilizes lightweight building blocks and effective convolutional processes to extract distinctive characteristics from MRI images. This is achieved while limiting the required memory and processing overhead.
Feature fusion
The feature fusion technique combines the strengths of both SWIN transformer and MobileNetV3 architectures, leveraging their complementary capabilities in capturing global context and local details. By integrating features extracted from multiple models, the ensemble model can potentially achieve higher discriminative power and robustness in MS lesion detection from MRI images. The authors forward the concatenated feature vector through a classification layer that contains a fully connected (dense) layer followed by softmax activation for binary or multi-class classification. The classification layer was trained using labeled data to learn discriminative features and optimize model parameters.
EL-based MS detection
Using gradient boosting combination with decision trees, CatBoost optimizes model performance during training while automatically handling category data. XGBoost leverages an ensemble of decision trees and applies boosting methods to successively train weak learners and maximize the model’s overall performance. The hyperparameters, including the learning rate, tree depth, and regularization parameters, were optimized using grid search with cross-validation. This method was used to identify the optimal combination that optimizes performance measures such as accuracy or area under the receiver operating characteristic (AUROC) curve. A new feature matrix was created by combining the predictions of CatBoost and XGBoost classifiers on the validation set. Each row in the matrix represents an MRI image, while each column represents the estimated probability of MS from CatBoost and XGBoost. The integrated feature matrix was used to train an RF meta-classifier, which was then used to produce the final prediction. RF is a technique in EL that mixes many decision trees and combines their predictions to enhance overall accuracy and generalization. Furthermore, the SHAP (SHapley Additive exPlanations) values were calculated for the meta-classifier in order to understand the significance of the characteristics in the ultimate prediction. SHAP values provide valuable insights into the individual impact of each feature on the model’s decision-making process, facilitating a more profound comprehension and interpretation of the model’s behavior. The recommended MS detection using the RF classifier is presented in Figure 3.
RESULTS AND DISCUSSION
In order to perform experimental validation, the authors used Windows 10, Intel i5, 16 GB RAM, and NVIDIA GeForce RTX 3050. They followed fivefold cross-validation to train the proposed model. The source codes of CatBoost, XGBoost, and RF models were extracted from the GitHub repositories. Table 1 presents the findings of fivefold cross-validation.
Findings of the fivefold cross-validation.
Folds | Accuracy | Precision | Recall | F1-score | Specificity | Sensitivity |
---|---|---|---|---|---|---|
1 | 98.8 | 98.7 | 98.6 | 98.6 | 98.7 | 98.6 |
2 | 99.2 | 99.1 | 99.2 | 99.2 | 99.4 | 98.7 |
3 | 98.9 | 98.8 | 98.7 | 98.7 | 98.6 | 98.7 |
4 | 99.3 | 98.9 | 99.1 | 99.0 | 98.5 | 98.6 |
5 | 99.5 | 99.2 | 99.2 | 99.2 | 98.9 | 98.7 |
Average | 99.1 | 98.9 | 98.9 | 98.9 | 98.8 | 98.6 |
Fivefold cross-validation enhances the reliability and applicability of the model by dividing the dataset into five distinct subsets (folds) and conducting repeated training and assessment on each fold. This strategy reduces the likelihood of overfitting and offers a more dependable evaluation of the model’s performance on data that has not been previously examined. The evaluation parameters, including accuracy, sensitivity, and specificity, consistently exhibited high values across all five folds. The outcomes of the fivefold cross-validation results are presented in Table 1. The consistent results demonstrate the stability and dependability of the proposed MS detection framework in effectively differentiating between MS lesions and normal tissue.
The suggested model demonstrated outstanding accuracy and sensitivity in differentiating MS lesions from normal tissue in MRI scans. The proposed ensemble model efficiently utilizes the complementing capabilities of CatBoost, XGBoost, and RF to improve overall performance, unlike previous models that may have poorer accuracy or sensitivity owing to restrictions in feature representation or model complexity. The suggested model exhibits robustness and generalizability, in contrast to some current models. It is evident that overfitting reduces the model’s generalization. Table 2 presents the findings of the comparative analysis. This guarantees that the model continuously achieves high performance across various subsets of the data, reducing the possibility of bias and delivering dependable predictions in real-world scenarios. Figure 4 highlights the findings of the comparative analysis.
Findings of the comparative analysis.
Model | Accuracy | Precision | Recall | F1-score | Specificity | Sensitivity |
---|---|---|---|---|---|---|
Proposed model | 99.1 | 98.9 | 98.9 | 98.9 | 98.8 | 98.6 |
La Rosa et al. (2022) | 96.5 | 95.8 | 95.7 | 95.7 | 94.7 | 93.9 |
Wiltgen et al. (2024) | 97.1 | 95.8 | 95.8 | 95.8 | 96.1 | 95.7 |
Zhang et al. (2022) | 96.8 | 96.4 | 95.4 | 95.7 | 96.3 | 96.7 |
Rezaee et al. (2020) | 96.9 | 96.6 | 96.4 | 96.5 | 95.9 | 95.8 |
The findings of the statistical analysis shown in Table 3 reveal the superior performance of the proposed model compared to existing approaches. The rigorous statistical analysis of performance outcomes, including comparative analysis of performance metrics, standard deviation and confidence interval estimation, effect size analysis, AUROC and area under the precision–recall curve analysis, and cross-validation analysis, collectively demonstrates the superior performance of the proposed model compared to existing approaches. These statistical insights provide robust evidence supporting the efficacy and reliability of the proposed model in MS detection from MRI images, paving the way for its potential translation into clinical practice.
Findings of the statistical analysis.
Model | AUROC | AUPRC | SD | CI | Time (in seconds) |
---|---|---|---|---|---|
Proposed model | 0.99 | 0.98 | 0.0004 | 96.7 | 59.5 |
La Rosa et al. (2022) | 0.96 | 0.95 | 0.0007 | 95.8 | 106.24 |
Wiltgen et al. (2024) | 0.95 | 0.96 | 0.0015 | 96.1 | 99.78 |
Zhang et al. (2022) | 0.96 | 0.96 | 0.0021 | 96.7 | 96.7 |
Rezaee et al. (2020) | 0.97 | 0.97 | 0.0019 | 96.6 | 95.9 |
Abbreviations: AUPRC, area under the precision–recall curve; AUROC, area under the receiver operating characteristic; CI, confidence interval; SD, standard deviation.
Despite the promising results, the proposed framework for detecting MS from MRI data faces several challenges and limitations. Variability in MRI image quality due to different types of scanner, imaging protocols, and patient movement can affect the model’s consistency and accuracy. Although useful, the study’s reliance on the Kaggle MS database may not encompass the total variability seen in clinical practice, necessitating a more extensive and diverse dataset for robust generalization. Significant class imbalance, despite mitigation efforts, can still bias the models. The advanced models and ensemble methods require substantial computational resources, potentially limiting their accessibility in some clinical settings. Integrating this framework into real-world clinical practice involves complex and resource-intensive adjustments to existing hospital systems. Further validation on larger, multi-center datasets is needed to confirm the model’s effectiveness across diverse populations and imaging conditions. Finally, the interpretability of deep learning models, especially ensembles, remains a challenge, as these “black box” models require clearer explanations for clinicians to understand and trust the predictions. Addressing these challenges is crucial for transitioning from research to practical clinical applications, ensuring the framework’s benefits are realized in real-world settings.
CONCLUSION
Using EL approaches to increase accuracy and efficiency, this study recommends an integrated methodology for MRI-based MS diagnosis. We developed an effective framework that can effectively differentiate between MS lesions and normal tissue using ensemble classifiers. The experimental validation conducted on the Kaggle MS database showcases the efficacy of the suggested approach, with an average accuracy of 99.8% with little loss, indicating its potential for use in clinical settings. The study’s main achievements are the development of an innovative framework that effectively tackles significant obstacles in diagnosing MS using MRI scans. By integrating the capabilities of deep learning and EL, we improve the capacity of the model to distinguish and generalize, providing a more dependable approach for automated MS identification. Furthermore, the comprehensibility of ensemble classifiers enhances the clinical decision-making process, allowing physicians to understand the underlying reasoning behind the model’s predictions. Our research results emphasize the significance of modern computational approaches in enhancing the precision and effectiveness of MS diagnosis. Timely identification of MS is essential for prompt intervention and tailored treatment planning, and our suggested framework provides a viable approach to accomplish this objective. Moreover, deep learning and EL methods establish a basis for future investigations in medical picture processing, with potential uses extending beyond the diagnosis of MS. In order to evaluate the applicability and practicality of the proposed framework in real-world scenarios, it is crucial to conduct further validation using bigger and more diversified datasets. Moreover, using our technique in real practice has the capacity to simplify the diagnosis of MS, lower healthcare expenses, and enhance patient outcomes. In a nutshell, our study enhances the area of MRI-based MS diagnosis and emphasizes the transformational capabilities of EL in the processing of medical images.