Machine learning based model for the detection of multiple sclerosis from OCT-derived macular and optic disc retinal biomarkers Authors: Muhmmad Aqib Anwar, Ghassan Mohamedsalih, Fatema Al Mannaei, Anant Pai, Tanvir Alam Published: 2026 ABSTRACT BackgroundMultiple sclerosis (MS) is a chronic neurological disease characterized by inflammatory demyelination and progressive neuroaxonal damage. Retinal layer thickness in the macular and optic disc regions, measurable using optical coherence tomography (OCT), might be considered as a promising non-invasive biomarker for detecting MS-related neurodegeneration.MethodsIn this study, we present a novel AI framework leveraging macular ganglion cell-inner plexiform layer (GCL-IPL) and Retinal Nerve Fiber Layer (RNFL) thickness across sectors (covering \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm{360}^{\circ}$$\end{document}) and peripapillary biomarkers from both macula and optic disc regions of retina. These biomarkers were collected from bilateral scans of 74 MS and 44 controls subjects. The retinal features were then fed into machine learning (ML) model for the detection of MS patients. Feature engineering and hyperparameter tuned patient level model was proposed as the final model for MS detection. SHAP and PCA biplot analysis improved the explainability of the ML models.ResultsThe proposed ML model developed from patient-level GCL sectors achieved highest F1-score of 94.29%. RNFL biomarkers extracted from the peripapillary region yielded slightly lower performance, with F1-score of 87.84%. After integrating both GCL and RNFL sector markers, the proposed ML model achieved the best performance with F1-score of 95.71% and precision of 97.10%, outperforming other existing benchmark results. Statistical analysis (one-way ANOVA) revealed significant enlargement of multiple peripapillary regions (i.e., vertical and average cup-disc-ratio) in MS patients. On the other hand disc area, cup area, and cup volume were thinned in MS patients, though the results were not statistically significant. Notably, all the sectors of GCL and RNFL layers were found thinning for MS patients compared to the controls (p < 0.001).ConclusionThe proposed AI-based framework shows promising results for the detection of MS using OCT-derived retinal biomarkers, particularly GCL-IPL sectors, RNFL quadrants thickness, and peripapillary regions. Moreover, the explainable nature of the proposed framework supports clinical adoption and serve as a proof-of-concept for AI-enabled diagnosis of MS using retinal biomarkers.Supplementary informationThe online version contains supplementary material available at 10.1186/s12911-026-03598-8. Background Multiple sclerosis (MS) is characterized by pathological processes such as inflammation, demyelination, axonal degeneration, and neuronal loss in the central nervous system (CNS) [1]. These pathological changes manifest as thinning of the retina and optic nerve [2, 3]. With an estimated 2.8 million cases worldwide in 2020, MS ranks among the most prevalent neurological disorders globally [4]. The disease may lead to progressive physical disability and cognitive impairment, among other symptoms, significantly compromising patients’ quality of life. [5]. The uniqueness and variability of MS are reflected in its highly heterogeneous clinical presentation, as it is a chronic neurodegenerative disorder of the CNS [6]. Definitive MS diagnosis is currently performed according to the modified McDonald criteria [7], which are principally based on oligoclonal bands and Magnetic Resonance Imaging (MRI) biomarkers, a process that is quite lengthy and invasive [8]. Although MRI has played a key role in monitoring CNS damage in MS, it has inherent limitations. Abnormal findings are not pathognomonic for MS, as other conditions may produce similar brain changes. Conversely, a normal MRI cannot exclude MS, since some patients present without detectable brain lesions [9], possibly due to spinal cord injuries or occult lesions. Therefore, alternative biomarkers are needed to support MS diagnosis and improve clinical outcomes. In recent years, Optical Coherence Tomography (OCT) has become a sensitive and practical alternative to MRI for studying neurodegeneration in MS [10]. OCT is accessible, non-invasive, fast, and repeatable. It uses light to create three-dimensional images of eye structures [11]. These features make OCT a valuable tool for improving MS diagnosis. MS induces widespread structural changes in the retina and optic nerve, particularly within the macula and optic disc regions [12]. These changes can be assessed using OCT to derive clinically useful disease biomarker [13, 14]. OCT-derived imaging markers, including peripapillary RNFL thickness and the combined thickness of the macular ganglion cell layer (GCL) and inner plexiform layer (IPL), have been proposed as promising biomarkers for neurodegenerative diseases such as MS [15]. Beyond the GCL-IPL and RNFL, inflammatory disease activity may also lead to changes in inner nuclear layer (INL) thickness [16]. Such thinning can be quantified by subtracting retinal layer measurements from those of a healthy normative cohort. Collectively, these layer thickness biomarkers support both MS detection and prognosis [17, 18]. A key characteristic of OCT recordings is the large number of features that can be extracted from retinal scans. Depending on the acquisition device, it is possible to segment between 6 and 10 distinct retinal layers, with thickness measurements available at multiple spatial locations for each layer. For instance, Triton swept-source OCT can generate measurements from approximately 40 × 60 sampling points [19], whereas Spectral-domain OCT systems typically provide measurements from an 8 × 8 grid [20], among other configurations. While the literature has identified retinal structures and regions most affected by neurodegenerative diseases such as MS, systematic biomarker selection remains essential for optimizing the performance of automatic classification models [21, 22]. Multiple studies have applied artificial intelligence (AI) to OCT data for MS diagnosis, utilizing measurements of retinal layer thickness variations [12, 23, 24]. Recently, machine learning (ML) have been applied to these retinal biomarkers for the detection of neurological diseases. For instance, Martin et al. [24] utilized feedforward neural networks and SVM on a cohort of 48 MS patients and 48 healthy controls, achieving an AUC of 83% for early-stage MS detection, with the GCL++ layer identified as having the greatest discriminant capacity. The authors additionally employed an ANN on this small cohort, which may lead to overfitting. Dongil et al. [4] employed an SVM with an RBF kernel to a cohort of 79 MS patients and 69 controls, achieving 69% sensitivity and 85.5% specificity based on neuroretinal thickness features. AUROC analysis identified GCL and IPL thickness as the most discriminative features. {In a subsequent study [25], the same authors used Recursive Feature Elimination (RFE) with a linear SVM on the same cohort, achieving improved results of 86% sensitivity and 90% specificity. Khodabandeh et al. [13] assessed the performance of SVM, RF, and ANN across two datasets comprising 151 MS patients and 467 controls, achieving 88% accuracy, 63% recall, and a 68% F1-score. The authors identified composite GCL-IPL and INL as the most relevant layers. However, the performance is skewed toward the control class, indicating that the model may struggle to correctly identify MS patients despite high overall accuracy. Recently, Ortiz et al. [18] applied SVM with RFE and SHAP analysis on a dataset of 79 MS patients and 69 controls. They obtained 97% sensitivity, and 86% specificity, identifying macula-GCL and macula-RNFL as the most influential structures with average thickness values proving more important than inter-eye differences. The reviewed studies employed conventional ML classifiers, primarily focusing on a single retinal region with limited layers. Detection performance still requires improvement. While these studies provide a suitable foundation for MS classification (see Table 1), most utilize a limited number of layers and regions. Other regions, such as the optic disc, may offer additional biomarkers that could enhance diagnostic performance.Table 1Summary of recent studies on OCT-based MS diagnosis using ML and DL modelsRefModelRetinal LayersSamples (MS/HC)PerformanceFindingsDogali et al. [25]SVM-RFEGCL-IPL, RNFL, IRL79/69Sen = 0.86, Spec = 0.90Papillomacular bundle area is most influential; inter-eye asymmetry & thickness loss correlate with disability; outperforms MRI.Ortiz et al. [17]CNNGCL-IPL, IRL79/69Acc = 0.87, Sen = 0.82, Spec = 0.92GCL thickness & IPL inter-eye difference are best OCT biomarkers for early RRMS diagnosis using two-layer CNN.Ortiz et al. [18]SVM-RFE, SHAPmGCL, mIPL, mRNFL, mIRL79/69Acc = 0.92, Sen = 0.97, Spec = 0.85mGCL & mRNFL are most influential; average thickness > inter-eye difference; peripheral papillomacular bundle & supero-temporal quadrant most affected.Montolio et al. [22]FCNNmGCL72/30Acc = 0.90Deep neural networks on mGCL thickness data achieve high diagnostic accuracy and predict 8-year disability progression.Zahra et al. [13]SVM, RF, ANNGCIPL, INL106/422Acc = 0.88, Sen = 0.63, F1 = 0.68GCIPL & INL are most discriminative; SVM best; external validation used; avoids deep learning due to limited data. Table 1Summary of recent studies on OCT-based MS diagnosis using ML and DL modelsRefModelRetinal LayersSamples (MS/HC)PerformanceFindingsDogali et al. [25]SVM-RFEGCL-IPL, RNFL, IRL79/69Sen = 0.86, Spec = 0.90Papillomacular bundle area is most influential; inter-eye asymmetry & thickness loss correlate with disability; outperforms MRI.Ortiz et al. [17]CNNGCL-IPL, IRL79/69Acc = 0.87, Sen = 0.82, Spec = 0.92GCL thickness & IPL inter-eye difference are best OCT biomarkers for early RRMS diagnosis using two-layer CNN.Ortiz et al. [18]SVM-RFE, SHAPmGCL, mIPL, mRNFL, mIRL79/69Acc = 0.92, Sen = 0.97, Spec = 0.85mGCL & mRNFL are most influential; average thickness > inter-eye difference; peripheral papillomacular bundle & supero-temporal quadrant most affected.Montolio et al. [22]FCNNmGCL72/30Acc = 0.90Deep neural networks on mGCL thickness data achieve high diagnostic accuracy and predict 8-year disability progression.Zahra et al. [13]SVM, RF, ANNGCIPL, INL106/422Acc = 0.88, Sen = 0.63, F1 = 0.68GCIPL & INL are most discriminative; SVM best; external validation used; avoids deep learning due to limited data. Summary of recent studies on OCT-based MS diagnosis using ML and DL models Furthermore, deep learning studies have illustrated prominent progress in OCT-based MS detection. Montolío et al. [22] employed Fully Connected Neural Network (FCNN) and LASSO regression to a cohort of 72 MS patients and 30 controls. Additionally, their investigation showed that the macular-GCL had a high prognostic value, with an accuracy of 81.9% in predicting 8-year outcomes. According to Gende et al. [26], segmentation models (MGU-Net, CNN) that were exclusively trained on healthy controls function poorly on neurodegenerative patients, frequently oversegmenting the RNFL and GCL layers. Ortiz et al. [17] identified GCL thickness and IPL inter-eye variations as important biomarkers, achieving 87% accuracy with CNN. While using nnU-Net with multi-view techniques, Rodriguez et al. [5] achieved an F1-score of 80%, emphasizing RNFL and overall retinal thickness as potent MS markers. Varela et al. [12] achieved 89% accuracy using a MobileNet (v2) model trained on synthetic slices, further confirming the RNFL and macular-GCL as critical biomarkers. Collectively, these studies demonstrate the effectiveness of deep learning in retinal layer segmentation and direct MS classification. Moreover, they highlight the importance of diverse training datasets and advanced data augmentation strategies. Despite its promise, AI-based OCT analysis for MS suffers from several unresolved gaps in the literature: (1) subtle retinal thickness changes are not discernible on raw OCT images; (2) black box AI models lack interpretability for trustworthy clinical application; (3) single-center datasets yield poor generalizability; and (4) instance-wise cross-validation overestimates predictive accuracy. Our study examines the detection of MS leveraging ML models to distinguish MS patients from normal controls. The following is a summary of this work’s primary contributions:We examined retinal biomarkers from the macular and optic disc regions, focusing on the GCL-IPL and RNFL layers, for the diagnosis of multiple sclerosis.We used collected retinal biomarkers as input features to ML classifiers to distinguish MS from healthy controls at both eye and patient levels. Proposed ML model achieved the best performance with F1-score of 95.71% and precision of 97.10%, outperforming other existing benchmark results.We identified the key biomarkers from retina layer thickness and peripapillary regions that contributed to classification using statistical significance analysis. We examined retinal biomarkers from the macular and optic disc regions, focusing on the GCL-IPL and RNFL layers, for the diagnosis of multiple sclerosis. We examined retinal biomarkers from the macular and optic disc regions, focusing on the GCL-IPL and RNFL layers, for the diagnosis of multiple sclerosis. We used collected retinal biomarkers as input features to ML classifiers to distinguish MS from healthy controls at both eye and patient levels. Proposed ML model achieved the best performance with F1-score of 95.71% and precision of 97.10%, outperforming other existing benchmark results. We used collected retinal biomarkers as input features to ML classifiers to distinguish MS from healthy controls at both eye and patient levels. Proposed ML model achieved the best performance with F1-score of 95.71% and precision of 97.10%, outperforming other existing benchmark results. We identified the key biomarkers from retina layer thickness and peripapillary regions that contributed to classification using statistical significance analysis. We identified the key biomarkers from retina layer thickness and peripapillary regions that contributed to classification using statistical significance analysis. The rest of the article is organized as follows: Section “Materials and methods” describes the detail of the MS dataset we investigate, data pre-processing, and the development settings of ML classifiers. Section “Results” explains the details of the results obtained from various experimental setups. Section “Discussion” provides the principal findings from this study, compares the outcome with other existing benchmarks and manifestation of MS on the retinal layers biomarkers and explanation. Lastly, in the section “Conclusion” we eventually conclude our proposed framework with future work. Materials and methods This study aims to propose a framework for the detection of MS by analyzing GCL-IPL thickness from macula-centered OCT scans and RNFL thickness and biomarkers from optic disc-centered OCT scans. Figure 1 presents the proposed methodology, which is consistent with standard ophthalmic assessment protocols.Fig. 1Overview of the proposed ML framework for automated MS detection using OCT-derived retinal biomarkers. RNFL parameters from the optic disc (23 features) and GCL-IPL parameters from the macula (8 features) are extracted from both eyes and concatenated into a unified feature vector (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ \mathbb{X}^{1 \times 31} $$\end{document}). The combined features undergo preprocessing, including eye-level to patient-level aggregation, feature normalization and LOOCV. The processed feature set is then used to train multiple classifiers (Random Forest, boosting, KNN, decision tree, and Naive Bayes), resulting in a trained model for MS classification. Exploratory data analysis is also performed to analyze the most prominent biomarkers Overview of the proposed ML framework for automated MS detection using OCT-derived retinal biomarkers. RNFL parameters from the optic disc (23 features) and GCL-IPL parameters from the macula (8 features) are extracted from both eyes and concatenated into a unified feature vector (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ \mathbb{X}^{1 \times 31} $$\end{document}). The combined features undergo preprocessing, including eye-level to patient-level aggregation, feature normalization and LOOCV. The processed feature set is then used to train multiple classifiers (Random Forest, boosting, KNN, decision tree, and Naive Bayes), resulting in a trained model for MS classification. Exploratory data analysis is also performed to analyze the most prominent biomarkers Retinal layer thickness measurements from both the right (OD) and left (OS) eyes, along with comprehensive optic disc structural parameters, were extracted and used for model development. The following retinal features were collected from each of the 118 subjects (74 MS patients and 44 healthy controls): average and quadrant-based RNFL thickness, RNFL symmetry, rim area, disc area, cup-to-disc ratios, and cup volume from the optic disc region, along with GCL-IPL thickness metrics from the macula region. These features are systematically arranged into feature vectors for each eye: a 23-feature vector for RNFL (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ \mathbb{R}^{1 \times 23} $$\end{document}) and an 8-feature vector for GCL-IPL (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ \mathbb{G}^{1 \times 8} $$\end{document}), which are then concatenated to form a comprehensive 31-feature vector (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ \mathbb{X}^{1 \times 31} $$\end{document}) constituting each eye. After feature extraction, we performed explanatory data analysis by using PCA biplot, ANOVA test and SHAP to determine the biomarkers significance. The preprocessing is carried out, where feature values are normalized using StandardScaler to ensure consistent scaling across biomarkers at both the eye and patient levels. All preprocessing steps were performed exclusively within each training fold of the Leave-One-Out Cross-Validation (LOOCV) procedure to prevent data leakage and overly optimistic performance estimates. Specifically, feature scaling, hyperparameter tuning, and patient level aggregation were carried out in this manner. Ethical approval Ethical approval for this retrospective study was obtained from the Institutional Review Board (IRB) of Hamad Medical Corporation (HMC), Qatar. The study was conducted in compliance with Ministry of Public Health regulations. Only de-identified data were collected from Hamad Medical Corporation (HMC), Qatar. The requirement for individual consent was waived by the ethics committee. OCT dataset collection This retrospective study included a cohort of 74 patients clinically diagnosed with MS and 44 demographically matched HC subjects. Bilateral retinal OCT scans (left and right eyes) were obtained for all participants, resulting in a total of 118 OCT scans used for feature extraction and analysis. The MS cohort comprised 44 female patients (mean age: 36 ± 10 years) and 30 male patients (mean age: 44 ± 15 years). The control group comprised of 44 healthy individuals with no history of neurological disorders, ocular disease, or any systemic conditions known to affect retinal structure or visual function. All MS patients received a diagnosis from a neurologist according to the 2010 revision of the McDonald criteria [27]. All control individuals underwent a detailed ophthalmological examination to confirm the absence of retinal pathology, including glaucoma, cataracts affecting imaging quality, optic nerve abnormalities, and other ocular conditions that could confound RNFL or GCL-IPL thickness measurements. Patients history of Optic Neuritis (ON) were not present in the dataset. For ML suite processing, features were initially extracted at the eye level from bilateral scans and subsequently aggregated to generate patient-level representations prior to model training and validation. Table 2 summarizes the demographic data of the subjects from patient and the control group.Table 2Demographic characteristics of the study participantsDatasetN (M/F)Age Mean (SD)ALL118 (50/68)39.09 (11.35)HC44 (20/24)35.77 (13.03)MS74 (30/44)41.97 (8.77) Table 2Demographic characteristics of the study participantsDatasetN (M/F)Age Mean (SD)ALL118 (50/68)39.09 (11.35)HC44 (20/24)35.77 (13.03)MS74 (30/44)41.97 (8.77) Demographic characteristics of the study participants Retinal OCT biomarkers extraction We acquired retinal biomarkers from OCT scans obtained using standard clinical OCT devices. In particular, the methodology examined two types of OCT frames: macula-centered frames for assessing GCL-IPL thickness, and optic disc-centered frames for evaluating RNF parameters. The methodology incorporates comprehensive examination of the GCL combined with the IPL, collectively measured as GCL-IPL thickness. For each eye, we extracted six sector specific thickness measurements to provide a comprehensive regional assessment of the macular ganglion cell complex. In addition to these sectoral readings, the methodology records both the average GCL-IPL thickness and the minimum GCL-IPL thickness, which are critical parameters for detecting subtle neuronal loss. The addition of percentile indicators improves the framework’s diagnostic utility for detecting neurodegenerative changes. These indicators support comparison against normative databases and allow thickness measurements to be categorized as normal or significantly abnormal. Furthermore, retinal biomarkers derived from optic disc-centered OCT frames focused on the RNFL were added as a feature vector representing RNFL biomarkers. For acquiring these biomarkers, key structural metrics were recorded for each eye, including inter-eye RNFL symmetry and average peripapillary RNFL thickness, to evaluate global axonal loss. Rim area, disc area, average and vertical cup-to-disc ratios, and cup volume were used to further capture detailed optic disc morphometry, resulting in a multi-parametric evaluation of neuroretinal integrity. We also incorporated a comprehensive quadrant- and clock-hour–based analysis of peripapillary RNFL thickness to capture regional variations around the optic disc. For each eye, thickness measurements are systematically recorded across the four retinal quadrants: superior, nasal, temporal, and inferior, providing a broad assessment of sectoral RNFL integrity. To further enhance spatial resolution, additional gradient measurements and hour-specific readings across clock-hour positions are incorporated, enabling the detection of focal thinning patterns that may be obscured in global or quadrant-averaged analyses. Figure 2 illustrates the extracted retinal biomarker features from macular GCL-IPL and peripapillary RNFL scans obtained from both eyes.Fig. 2Illustration of retinal biomarkers derived from macular GCL-IPL and peripapillary RNFL OCT scans. Sub-figures (a) and (b) represent macula-centered scans, where the labeled OD (right eye) and OS (left eye) sectors correspond to GCL-IPL thickness biomarkers. Sub-figures (c) and (d) depict OCT scans of the optic disc from which peripapillary RNFL thickness measurements and sector-based biomarkers (quadrant and clock-hour regions) were extracted. Sector numbering is highlighted for right and left eye in clock-wise and anti-clock-wise manner, respectively Illustration of retinal biomarkers derived from macular GCL-IPL and peripapillary RNFL OCT scans. Sub-figures (a) and (b) represent macula-centered scans, where the labeled OD (right eye) and OS (left eye) sectors correspond to GCL-IPL thickness biomarkers. Sub-figures (c) and (d) depict OCT scans of the optic disc from which peripapillary RNFL thickness measurements and sector-based biomarkers (quadrant and clock-hour regions) were extracted. Sector numbering is highlighted for right and left eye in clock-wise and anti-clock-wise manner, respectively Feature-level integration of RNFL and GCL-IPL retinal biomarkers To maintain anatomical consistency in accordance with clinical conventions, retinal biomarker extraction was performed clockwise for the right eye and anti-clockwise for the left eye, enabling accurate inter-eye comparison and symmetry analysis (see Fig. 2). Firstly, GCL-IPL thickness measurements were stored as a feature vector of length (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ \mathbb{G}^{1 \times 8} $$\end{document}) for each eye. Subsequently, RNFL biomarkers were converted into a retinal feature vector of length (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ \mathbb{R}^{1 \times 8} $$\end{document}), also for each eye. In the proposed framework, evaluation is carried out at both the eye level and patient level. For patient-level analysis, thickness measurements and biomarkers from both eyes are concatenated lengthwise. For example, if each eye has a GCL-IPL thickness vector of length (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ \mathbb{G}^{1 \times 8} $$\end{document}), the patient-level representation becomes a (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ \mathbb{G}^{1 \times 16} $$\end{document}) vector combining both eyes. To enable comprehensive analysis using both GCL-IPL and RNFL biomarkers, the retinal features from each eye are concatenated lengthwise. For the right eye, the (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ \mathbb{G}^{1 \times 8} $$\end{document}) GCL-IPL vector and (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ \mathbb{R}^{1 \times 23} $$\end{document}) RNFL vector are combined to produce a (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ \mathbb{X}^{1 \times 31} $$\end{document}) feature vector, with the left eye undergoing the same procedure. These integrated vectors support eye-level analysis. For patient-level analysis, the (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ \mathbb{X}^{1 \times 31} $$\end{document}) vectors from both eyes are further concatenated, yielding a final feature vector of dimension (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ \mathbb{F}^{1 \times 62} $$\end{document}). Once features were concatenated the normalizattion performed. Each feature \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$x_i$$\end{document} in the dataset was standardized to have zero mean and unit variance using Z-score normalization: 1\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ z_{ij} = \frac{x_{ij} - \mu_j}{\sigma_j}$$\end{document} where:\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$z_{ij}$$\end{document} is the standardized value of the i-th sample for the j-th feature\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$x_{ij}$$\end{document} is the original value of the i-th sample for the j-th feature\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mu_j = \frac{1}{n}\sum_{i=1}^{n} x_{ij}$$\end{document} is the mean of the j-th feature across all n samples\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\sigma_j = \sqrt{\frac{1}{n-1}\sum_{i=1}^{n} (x_{ij} - \mu_j)^2}$$\end{document} is the sample standard deviation of the j-th feature \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$z_{ij}$$\end{document} is the standardized value of the i-th sample for the j-th feature \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$z_{ij}$$\end{document} is the standardized value of the i-th sample for the j-th feature \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$x_{ij}$$\end{document} is the original value of the i-th sample for the j-th feature \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$x_{ij}$$\end{document} is the original value of the i-th sample for the j-th feature \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mu_j = \frac{1}{n}\sum_{i=1}^{n} x_{ij}$$\end{document} is the mean of the j-th feature across all n samples \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mu_j = \frac{1}{n}\sum_{i=1}^{n} x_{ij}$$\end{document} is the mean of the j-th feature across all n samples \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\sigma_j = \sqrt{\frac{1}{n-1}\sum_{i=1}^{n} (x_{ij} - \mu_j)^2}$$\end{document} is the sample standard deviation of the j-th feature \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\sigma_j = \sqrt{\frac{1}{n-1}\sum_{i=1}^{n} (x_{ij} - \mu_j)^2}$$\end{document} is the sample standard deviation of the j-th feature This transformation ensures uniform feature contribution across the ML models and prevents features with larger scales from disproportionately influencing the analysis. Machine learning classifier development Several conventional ML classifiers were used in this study; they were selected for their architectural diversity and proven effectiveness in analyzing medical biomarkers. The Random Forest classifier is renowned for its ensemble architecture and resilience to overfitting [28]. An ensemble of T decision trees aggregates predictions via majority voting: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\hat{y} = \mathrm{mode}\{h_t(\mathbf{x})\}_{t=1}^T$$\end{document}, where each tree \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$h_t$$\end{document} is trained on a bootstrap sample of the data and a random subset of features. Multiple boosting classifiers (XGBoost, CatBoost, AdaBoost, and Gradient Boosting) were used to exploit their sequential learning, which progressively emphasizes challenging examples to enhance model accuracy [29]. Boosting iteratively builds an additive model \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$F(\mathbf{x}) = \sum_{t=1}^{T} \eta_t h_t(\mathbf{x})$$\end{document} where each subsequent weak learner \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$h_t$$\end{document} focuses on the errors of the previous ensemble by minimizing \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\sum_{i=1}^{n} \ell(y_i, F_{t-1}(\mathbf{x}_i) + h_t(\mathbf{x}_i))$$\end{document} with instance-specific weights or gradients. The k-Nearest Neighbors (KNN) predicts the label for a test point \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathbf{x}$$\end{document} as the majority class among its k nearest neighbors: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\hat{y} = \mathrm{mode}\left\{y_i : \mathbf{x}_i \in \mathcal{N}_k(\mathbf{x})\right\}$$\end{document}, where distance is measured by Minkowski metric \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$d(\mathbf{x}, \mathbf{x}_i) = \left(\sum_{j=1}^m |x_j - x_{ij}|^p\right)^{1/p}$$\end{document} (with p=2 for Euclidean distance) [30]. A decision tree recursively partitions the feature space using splits at node m that minimize an impurity measure, such as the Gini index: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$G_m = 1 - \sum_{c=1}^C p_{mc}^2$$\end{document}, where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$p_{mc}$$\end{document} is the proportion of samples of class c in node m [31]. Ultimately, Naive Bayes, as a probabilistic generative classifier [32], was employed to simulate the distribution of retinal biomarkers and to estimate class-conditional probabilities for each subject. It applies Bayes’ theorem with the conditional independence assumption: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$P(y|\mathbf{x}) \propto P(y) \prod_{j=1}^m P(x_j|y)$$\end{document}, where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$P(x_j|y)$$\end{document} is typically modeled as a Gaussian distribution for continuous features: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$P(x_j|y=c) = \frac{1}{\sqrt{2\pi\sigma_{jc}^2}} \exp\left(-\frac{(x_j - \mu_{jc})^2}{2\sigma_{jc}^2}\right)$$\end{document}. The selected hyperparameters for these classifiers, optimized via GridSearch cross-validation, are provided in Supplementary Table S1 and summarized below:Random Forest: n_estimators = 100, max_depth = 10, min_samples_split = 5, min_samples_leaf = 2, criterion = ‘gini’, random_state = 42. By limiting tree depth and requiring a minimum number of samples per split, this configuration avoids overfitting, and 100 trees guarantee ensemble stability.XGBoost: n_estimators = 150, learning_rate = 0.1, max_depth = 6, subsample = 0.8, colsample_bytree = 0.8, random_state = 42, eval_metric = ‘logloss’. These configurations incorporate subsampling to reduce overfitting and improve generalization while balancing the learning rate and tree complexity.CatBoost: iterations = 150, learning_rate = 0.1, depth = 6, l2_leaf_reg = 3, random_state = 42, verbose = False. To prevent overfitting and manage model complexity, the design incorporates L2 regularization.AdaBoost: n_estimators = 100, learning_rate = 0.5, random_state = 42. Using the optimal learning rate with more estimators helps the algorithm focus more aggressively on hard-to-classify instances.Gradient Boost: n_estimators = 150, learning_rate = 0.1, max_depth = 5, subsample = 0.8, min_samples_split = 5, min_samples_leaf = 3, random_state = 42. Robustness is improved by stochastic gradient boosting with subsampling, and overfitting is avoided via regulated tree depth.KNN: n_neighbors = 5, weights = ‘distance’, metric = ‘minkowski’, p = 2, algorithm = ‘auto’. Better decision boundaries are produced by using distance-based weighting with five neighbours, along with automatic method selection for improved computational efficiency.Decision Tree: max_depth = None, min_samples_split = 10, min_samples_leaf = 5, max_features = ‘sqrt’, criterion = ‘gini’, random_state = 42. Overfitting is prevented by pruning with minimum sample requirements and depth limitations, while ‘sqrt’ feature selection introduces unpredictability to improve generalization.Naive Bayes: var_smoothing = 1e-8. This variance smoothing setting, which is marginally higher than the default, improves numerical stability with little impact on probability estimations. Random Forest: n_estimators = 100, max_depth = 10, min_samples_split = 5, min_samples_leaf = 2, criterion = ‘gini’, random_state = 42. By limiting tree depth and requiring a minimum number of samples per split, this configuration avoids overfitting, and 100 trees guarantee ensemble stability. Random Forest: n_estimators = 100, max_depth = 10, min_samples_split = 5, min_samples_leaf = 2, criterion = ‘gini’, random_state = 42. By limiting tree depth and requiring a minimum number of samples per split, this configuration avoids overfitting, and 100 trees guarantee ensemble stability. XGBoost: n_estimators = 150, learning_rate = 0.1, max_depth = 6, subsample = 0.8, colsample_bytree = 0.8, random_state = 42, eval_metric = ‘logloss’. These configurations incorporate subsampling to reduce overfitting and improve generalization while balancing the learning rate and tree complexity. XGBoost: n_estimators = 150, learning_rate = 0.1, max_depth = 6, subsample = 0.8, colsample_bytree = 0.8, random_state = 42, eval_metric = ‘logloss’. These configurations incorporate subsampling to reduce overfitting and improve generalization while balancing the learning rate and tree complexity. CatBoost: iterations = 150, learning_rate = 0.1, depth = 6, l2_leaf_reg = 3, random_state = 42, verbose = False. To prevent overfitting and manage model complexity, the design incorporates L2 regularization. CatBoost: iterations = 150, learning_rate = 0.1, depth = 6, l2_leaf_reg = 3, random_state = 42, verbose = False. To prevent overfitting and manage model complexity, the design incorporates L2 regularization. AdaBoost: n_estimators = 100, learning_rate = 0.5, random_state = 42. Using the optimal learning rate with more estimators helps the algorithm focus more aggressively on hard-to-classify instances. AdaBoost: n_estimators = 100, learning_rate = 0.5, random_state = 42. Using the optimal learning rate with more estimators helps the algorithm focus more aggressively on hard-to-classify instances. Gradient Boost: n_estimators = 150, learning_rate = 0.1, max_depth = 5, subsample = 0.8, min_samples_split = 5, min_samples_leaf = 3, random_state = 42. Robustness is improved by stochastic gradient boosting with subsampling, and overfitting is avoided via regulated tree depth. Gradient Boost: n_estimators = 150, learning_rate = 0.1, max_depth = 5, subsample = 0.8, min_samples_split = 5, min_samples_leaf = 3, random_state = 42. Robustness is improved by stochastic gradient boosting with subsampling, and overfitting is avoided via regulated tree depth. KNN: n_neighbors = 5, weights = ‘distance’, metric = ‘minkowski’, p = 2, algorithm = ‘auto’. Better decision boundaries are produced by using distance-based weighting with five neighbours, along with automatic method selection for improved computational efficiency. KNN: n_neighbors = 5, weights = ‘distance’, metric = ‘minkowski’, p = 2, algorithm = ‘auto’. Better decision boundaries are produced by using distance-based weighting with five neighbours, along with automatic method selection for improved computational efficiency. Decision Tree: max_depth = None, min_samples_split = 10, min_samples_leaf = 5, max_features = ‘sqrt’, criterion = ‘gini’, random_state = 42. Overfitting is prevented by pruning with minimum sample requirements and depth limitations, while ‘sqrt’ feature selection introduces unpredictability to improve generalization. Decision Tree: max_depth = None, min_samples_split = 10, min_samples_leaf = 5, max_features = ‘sqrt’, criterion = ‘gini’, random_state = 42. Overfitting is prevented by pruning with minimum sample requirements and depth limitations, while ‘sqrt’ feature selection introduces unpredictability to improve generalization. Naive Bayes: var_smoothing = 1e-8. This variance smoothing setting, which is marginally higher than the default, improves numerical stability with little impact on probability estimations. Naive Bayes: var_smoothing = 1e-8. This variance smoothing setting, which is marginally higher than the default, improves numerical stability with little impact on probability estimations. Model evaluation We employed LOOCV to evaluate model performance and ensure generalization. In this approach, N-1 subjects were used for training, while the remaining subject was used for testing in each iteration. This process was repeated until every subject had been used once as the test sample, enabling a comprehensive subject-level evaluation. Model performance was assessed using the following metrics formulas: 2\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$Accuracy = \frac{(t_p+t_n)}{(t_p+t_n+f_p+f_n)}$$\end{document} 3\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$Sensitivity (recall) = \frac{t_p}{(t_p+f_n)}$$\end{document} 4\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$Specificity = \frac{t_n}{(t_n+f_p)}$$\end{document} 5\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$Precision = \frac{t_p}{(t_p+f_p)}$$\end{document} 6\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$F1 Score = 2* \frac{Precision*Recall}{Precision+Recall} $$\end{document} 7\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$AUC score = Area\:Under\:the\: ROC\:Curve$$\end{document} Here, tp, fp, fn, and tn denote the number of true positives, false positives, false negatives, and true negatives, respectively. Given the dataset’s imbalance, sensitivity (recall), specificity, and the AUC score are significant performance indicators given the dataset’s imbalance. The AUC (Area Under the Curve) reflects the model’s ability to distinguish between MS and control group; higher AUC value indicates better discrimination. Overall, the AUC metric provides a robust summary of the classification performance of all classifiers at both the eye and patient levels. Experiment setup The experimental setup was developed to assess the contribution of individual and combined retinal biomarkers for MS detection at both eye and patient levels. Three distinct experiments were carried out (Fig. 3).Fig. 3Three experiments were designed: the first focused on GCL-IPL biomarkers, the second on RNFL biomarkers, and the third on the integration of GCL-IPL and RNFL biomarkers from the prior experiments. All experiments were conducted at both the eye and subject levels Three experiments were designed: the first focused on GCL-IPL biomarkers, the second on RNFL biomarkers, and the third on the integration of GCL-IPL and RNFL biomarkers from the prior experiments. All experiments were conducted at both the eye and subject levels The first experiment was designed to evaluate the proposed framework using macula ganglion cell-inner plexiform layer (GCL-IPL) biomarkers. Retinal biomarkers extracted from GCL-IPL were converted into feature vectors, followed by preprocessing for both eye-level and patient-level analysis. Model performance was assessed using Leave-One-Out cross-validation (N-1). For this experiment, each eye was represented by a feature vector of length (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ \mathbb{G}^{1 \times 8} $$\end{document}). After concatenation of biomarkers from both eyes, the resulting patient-level feature vector was expanded to (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ \mathbb{G}^{1 \times 16} $$\end{document}) In the second experiment, a more comprehensive set of RNFL-derived retinal biomarkers was extracted for analysis. From each optic disc-centered OCT frame, parameters such as average peripapillary RNFL thickness, inter-eye RNFL symmetry, rim area, disc area, cup-to-disc ratios, and cup volume were extracted and organized into a (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ \mathbb{R}^{1 \times 23} $$\end{document}) feature vector per eye. Bilateral feature concatenation from both eyes resulted a patient-level feature vector of length (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ \mathbb{R}^{1 \times 46} $$\end{document}). Lastly, the third experiment was designed to maximize detection performance by integrating both GCL-IPL and RNFL biomarkers. For each eye, the (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ \mathbb{G}^{1 \times 8} $$\end{document}) GCL-IPL vector and (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ \mathbb{R}^{1 \times 23} $$\end{document}) RNFL vector were concatenated lengthwise to form a comprehensive (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ \mathbb{X}^{1 \times 31} $$\end{document}) feature vector. Features were further combined at the patient level through bilateral concatenation, resulting in a (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ \mathbb{F}^{1 \times 62} $$\end{document}) vector. This integration was performed before any preprocessing step. It enabled independent training and prediction across all ML models, achieving state-of-the-art (SOTA) results as presented in the Results section. Results The experimental results from three distinct validation investigations are explained in this section. Each experiment was designed to evaluate different aspects of the model’s performance. These include predictive accuracy, sensitivity, specificity, cross-validation stability, and the impact of combining multi-layer retinal biomarkers on MS detection. Model performance using GCL-IPL biomarkers (Experiment 01) Experiment 01 establishes the baseline results of our approach. Table 3 (Experiment 1.1) summarizes the eye-level classification performance of the eight conventional ML models in discriminating between MS and control cases. Overall, Random Forest achieved the highest ROC-AUC (97.14%) with a strong F1-score of 0.9091, demonstrating excellent overall discriminative capability for GCL-IPL based MS detection. Among the boosting classifiers, Gradient Boost achieved the highest accuracy (89.22%), followed by XGBoost and AdaBoost (both 88.36%), and CatBoost (86.21%), demonstrating robust and consistent performance across ensemble methods for GCL-IPL based MS detection. Among all classifiers, the decision tree achieved the highest accuracy of 91.38% with a sensitivity of 93.92%, indicating strong detection of MS positive cases. Following this, the Naive Bayes classifier provided a specificity of 95.24%, demonstrating efficient identification of control subjects.Table 3Experiment 1: LOOCV comparative model performance using GCL-IPL biomarkers at eye-level and patient-levelExperiment 1.1: Eye-Level PerformanceModelAccuracyPrecisionF1-ScoreSensitivitySpecificityROC-AUCRandom Forest0.88790.94200.90910.87840.90480.9714XGBoost0.88360.92310.90720.89190.86900.9426CatBoost0.86210.92650.88730.85140.88100.9569AdaBoost0.88360.94160.90530.87160.90480.9608Gradient Boost0.89220.93010.91410.89860.88100.9710KNN0.87070.93380.89440.85810.89290.9543Decision Tree0.91380.92670.93290.93920.86900.9041Naive Bayes0.87500.96850.89450.83110.95240.9474Experiment 1.2: Patient-Level PerformanceRandom Forest0.92240.94520.93880.93240.90480.9720XGBoost0.92240.94520.93880.93240.90480.9627CatBoost0.89660.93060.91780.90540.88100.9698AdaBoost0.89660.94290.91670.89190.90480.9543Gradient Boost0.93970.97180.95170.93240.95240.9643KNN0.91380.98480.92860.87840.97620.9580Decision Tree0.92240.94520.93880.93240.90480.9186Naive Bayes0.93101.00000.94290.89191.00000.9781 Table 3Experiment 1: LOOCV comparative model performance using GCL-IPL biomarkers at eye-level and patient-levelExperiment 1.1: Eye-Level PerformanceModelAccuracyPrecisionF1-ScoreSensitivitySpecificityROC-AUCRandom Forest0.88790.94200.90910.87840.90480.9714XGBoost0.88360.92310.90720.89190.86900.9426CatBoost0.86210.92650.88730.85140.88100.9569AdaBoost0.88360.94160.90530.87160.90480.9608Gradient Boost0.89220.93010.91410.89860.88100.9710KNN0.87070.93380.89440.85810.89290.9543Decision Tree0.91380.92670.93290.93920.86900.9041Naive Bayes0.87500.96850.89450.83110.95240.9474Experiment 1.2: Patient-Level PerformanceRandom Forest0.92240.94520.93880.93240.90480.9720XGBoost0.92240.94520.93880.93240.90480.9627CatBoost0.89660.93060.91780.90540.88100.9698AdaBoost0.89660.94290.91670.89190.90480.9543Gradient Boost0.93970.97180.95170.93240.95240.9643KNN0.91380.98480.92860.87840.97620.9580Decision Tree0.92240.94520.93880.93240.90480.9186Naive Bayes0.93101.00000.94290.89191.00000.9781 Experiment 1: LOOCV comparative model performance using GCL-IPL biomarkers at eye-level and patient-level At the patient level (Experiment 1.2) of analysis using GCL-IPL biomarkers, the ML classifiers demonstrated substantially improved performance compared to eye-level evaluation, highlighting the diagnostic benefit of integrating information from both eyes. Naive Bayes emerged as the top performing classifier, achieving the highest ROC-AUC of 97.81% along with perfect precision (100%) and perfect specificity (100%), indicating flawless identification of healthy control subjects. Gradient Boost also yielding exceptional results, attaining the highest accuracy (93.97%) and F1-score (0.9517), with strong sensitivity (93.24%) and specificity (95.24%). Random Forest and XGBoost exhibited identical performance metrics, both achieving 92.24% accuracy, 94.52% precision, and 93.24% sensitivity, with Random Forest achieving a slightly higher ROC-AUC (97.20%) compared to XGBoost (96.27%). KNN exhibited near-perfect precision (98.48%) and specificity (97.62%), though with relatively lower sensitivity (87.84%). Multiple classifiers achieved ROC-AUC values over 95%, indicating the significance of bilateral feature integration for robust MS identification utilizing GCL-IPL biomarkers. Overall, the patient-level analysis consistently outperformed eye-level classification. Model performance using RNFL biomarkers (Experiment 02) In this experiment, Table 4 (Experiment 2.1) presents the eye-level classification results using RNFL retinal biomarkers. The RNFL-based classification results were generally poorer across all evaluation metrics than the eye-level performance obtained with GCL-IPL biomarkers. With the highest ROC-AUC of 93.32%, accuracy of 85.65%, and precision of 91.97%, CatBoost outperformed the other ML classifiers and showed a balanced classification between MS and control classes. XGBoost and Random Forest achieved comparable performance, with ROC-AUC scores of 92.72% and 92.76%, respectively. Nevertheless, Random Forest exhibited marginally higher sensitivity (88.51%) than XGBoost (86.49%). Notably, KNN provided the highest precision (94.17%) and specificity (91.46%), albeit with lower sensitivity (76.35%), highlighting a trade-off in its predictive capability. Overall, the relatively lower performance of RNFL-based classification suggests that GCL-IPL biomarkers may offer greater diagnostic utility for MS detection at the eye level. While in patient-level analysis (Experiment 2.2), CatBoost maintained performance comparable to its eye-level results, achieving an accuracy of 85.22% and F1-score of 87.84%. Random Forest led in accuracy among other classifiers at 84.35%, though with relatively low specificity (78.05%). XGBoost demonstrated strong precision (92.19%) and specificity (87.80%), while KNN achieved the highest precision (94.74%) and specificity (92.68%) at the cost of reduced sensitivity (72.97%). Overall, patient-level analysis yielded mixed improvements across classifiers compared to eye-level RNFL results.Table 4Experiment 2: LOOCV comparative model performance using RNFL biomarkers at eye-level and patient-levelExperiment 2.1: Eye-Level PerformanceModelAccuracyPrecisionF1-ScoreSensitivitySpecificityROC-AUCRandom Forest0.84780.87920.88220.88510.78050.9276XGBoost0.85650.90780.88580.86490.84150.9272CatBoost0.85650.91970.88420.85140.86590.9332AdaBoost0.81740.87860.85420.83110.79270.8970Gradient Boost0.82610.87500.86300.85140.78050.9115KNN0.81740.94170.84330.76350.91460.8795Decision Tree0.76090.83940.80700.77700.73170.7544Naive Bayes0.80870.82910.85620.88510.67070.8902Experiment 2.2: Patient-Level PerformanceRandom Forest0.84350.87840.87840.87840.78050.9219XGBoost0.82610.92190.85510.79730.87800.9080CatBoost0.85220.91300.88110.85140.85370.9212AdaBoost0.80000.85920.84140.82430.75610.8926Gradient Boost0.83480.91040.86520.82430.85370.9051KNN0.80000.94740.82440.72970.92680.8746Decision Tree0.80870.87140.84720.82430.78050.8024Naive Bayes0.81740.88410.85310.82430.80490.9102 Table 4Experiment 2: LOOCV comparative model performance using RNFL biomarkers at eye-level and patient-levelExperiment 2.1: Eye-Level PerformanceModelAccuracyPrecisionF1-ScoreSensitivitySpecificityROC-AUCRandom Forest0.84780.87920.88220.88510.78050.9276XGBoost0.85650.90780.88580.86490.84150.9272CatBoost0.85650.91970.88420.85140.86590.9332AdaBoost0.81740.87860.85420.83110.79270.8970Gradient Boost0.82610.87500.86300.85140.78050.9115KNN0.81740.94170.84330.76350.91460.8795Decision Tree0.76090.83940.80700.77700.73170.7544Naive Bayes0.80870.82910.85620.88510.67070.8902Experiment 2.2: Patient-Level PerformanceRandom Forest0.84350.87840.87840.87840.78050.9219XGBoost0.82610.92190.85510.79730.87800.9080CatBoost0.85220.91300.88110.85140.85370.9212AdaBoost0.80000.85920.84140.82430.75610.8926Gradient Boost0.83480.91040.86520.82430.85370.9051KNN0.80000.94740.82440.72970.92680.8746Decision Tree0.80870.87140.84720.82430.78050.8024Naive Bayes0.81740.88410.85310.82430.80490.9102 Experiment 2: LOOCV comparative model performance using RNFL biomarkers at eye-level and patient-level Model performance using combined (GCL-IPL and RNFL) biomarkers (Experiment 03) Table 5 (Experiment 3.1) demonstrates the benchmark results of our proposed methodology using combined (GCL-IPL and RNFL) biomarkers for eye-level analysis. The decision tree outperformed all models with a well-balanced trade-off between sensitivity and specificity at 95.45% and 96.0%, respectively. Compared to Experiments 1 and 2, all classifiers demonstrated improved performance with combined features, achieving precision and ROC-AUC exceeding 90.0%. AdaBoost and KNN achieved perfect precision and specificity of 100%, demonstrating flawless identification of control subjects and no false positives in their predictions. Conversely, CatBoost and Naive Bayes yielded relatively lower results overall but still provided promising performance with combined biomarkers. Overall, the combined GCL-IPL and RNFL biomarkers demonstrated improved performance at both eye and patient levels compared to the individual biomarker experiments, as depicted in Table 5 (Experiment 3.2). At the patient level, the decision tree exhibited superior balanced performance, attaining a sensitivity of 94.37% and specificity of 95.12%. Nevertheless, Random Forest achieved the highest ROC-AUC overall at 98.51%, indicating exceptional discriminative capability. Finally, combined biomarkers with conventional ML classifiers performed well at both eye and patient levels, confirming the clinical adaptability of the framework.Table 5Experiment 3: LOOCV comparative model performance using combined GCL-IPL and RNFL biomarkers at eye-level and patient-levelExperiment 3.1: Eye-Level PerformanceModelAccuracyPrecisionF1-ScoreSensitivitySpecificityROC-AUCPR-AUCRandom Forest0.85510.94740.87800.81820.920.93270.9655XGBoost0.86960.94870.89160.84090.920.95270.9766CatBoost0.82610.94440.85000.77270.920.93180.9652AdaBoost0.91301.00000.92680.86361.000.96180.9842Gradient Boost0.86960.94870.89160.84090.920.96360.9808KNN0.88411.00000.90000.81821.000.92730.9558Decision Tree0.95650.97670.96550.95450.960.95730.9613Naive Bayes0.86960.92680.89410.86360.880.91180.9577Experiment 3.2: Patient-Level PerformanceRandom Forest0.91070.94200.92860.91550.90240.98510.9917XGBoost0.91070.94200.92860.91550.90240.96120.9823CatBoost0.90180.94120.92090.90140.90240.98040.9894AdaBoost0.92860.97010.94200.91550.95120.97870.9889Gradient Boost0.90180.96880.91850.87320.95120.92750.9682KNN0.89290.98360.90910.84510.97560.94590.9567Decision Tree0.94640.97100.95710.94370.95120.94740.9520Naive Bayes0.91960.93060.93710.94370.87800.97600.9878 Table 5Experiment 3: LOOCV comparative model performance using combined GCL-IPL and RNFL biomarkers at eye-level and patient-levelExperiment 3.1: Eye-Level PerformanceModelAccuracyPrecisionF1-ScoreSensitivitySpecificityROC-AUCPR-AUCRandom Forest0.85510.94740.87800.81820.920.93270.9655XGBoost0.86960.94870.89160.84090.920.95270.9766CatBoost0.82610.94440.85000.77270.920.93180.9652AdaBoost0.91301.00000.92680.86361.000.96180.9842Gradient Boost0.86960.94870.89160.84090.920.96360.9808KNN0.88411.00000.90000.81821.000.92730.9558Decision Tree0.95650.97670.96550.95450.960.95730.9613Naive Bayes0.86960.92680.89410.86360.880.91180.9577Experiment 3.2: Patient-Level PerformanceRandom Forest0.91070.94200.92860.91550.90240.98510.9917XGBoost0.91070.94200.92860.91550.90240.96120.9823CatBoost0.90180.94120.92090.90140.90240.98040.9894AdaBoost0.92860.97010.94200.91550.95120.97870.9889Gradient Boost0.90180.96880.91850.87320.95120.92750.9682KNN0.89290.98360.90910.84510.97560.94590.9567Decision Tree0.94640.97100.95710.94370.95120.94740.9520Naive Bayes0.91960.93060.93710.94370.87800.97600.9878 Experiment 3: LOOCV comparative model performance using combined GCL-IPL and RNFL biomarkers at eye-level and patient-level Discussion Principal findings According to our investigation, the combination of GCL-IPL and RNFL retinal biomarkers is highly significant for MS diagnosis and detection. These biomarkers capture richer biological information near the fovea, the central point of vision, where MS-related neuroaxonal damage most prominently disrupts retinal layer thickness. We obtained promising results for MS detection after an extensive experimentation. Eight ML classifiers were evaluated using retinal biomarker features, with the proposed framework established for both eye and patient-level analysis to provide baseline benchmark results for MS detection. The macular biomarkers, consisting of GCL-IPL thickness measurements from both eyes, achieved strong performance with the Random Forest classifier. At the patient level, Naive Bayes attained the highest accuracy of 93.10% using combined bilateral features. Conversely, RNFL biomarkers performed less than GCL-IPL at the eye and patient analytical levels. Notably, CatBoost at the eye level and Random Forest at the patient level delivered the best results, with ROC-AUC scores of 93.32% and 92.19%, respectively. To achieve SOTA results, our primary focus was on combining features from both GCL-IPL and RNFL. In this configuration, the decision tree outperformed all other classifiers in both levels of analysis. At the eye level, it achieved the highest trade-off between sensitivity and specificity at 95.45% and 96.0%, respectively. At the patient level, we achieved sensitivity of 94.37% and specificity of 95.12%, further demonstrating that combined features serve as the most effective biomarkers for distinguishing between MS and control subjects. Moreover, the Precision-Recall curves for all classifiers using combined GCL-IPL and RNFL biomarkers are presented in Fig. 4.Fig. 4Precision recall curves for MS versus control binary classification using combined GCL-IPL and RNFL biomarkers. The results are shown at eye level on the left graph and at patient level on the right. With PR-AUC values ranging from 95.0% to 99.0%, both plots show benchmark performance Precision recall curves for MS versus control binary classification using combined GCL-IPL and RNFL biomarkers. The results are shown at eye level on the left graph and at patient level on the right. With PR-AUC values ranging from 95.0% to 99.0%, both plots show benchmark performance Manifestation of MS on retinal layer thickness biomarkers The one-way ANOVA analysis revealed statistically significant differences in several retinal biomarkers between MS patients and healthy controls, indicating substantial structural alterations associated with neurodegeneration. In particular, macular GCL-IPL related parameters demonstrated the strongest discriminative power as shown in Table 6. The average GCL-IPL thickness showed a marked reduction in MS patients (71.55 ± 7.52 μ m) compared with controls (85.00 ± 5.63 μ m), with a very high F-statistic (F = 199.128) and a large effect size (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\eta^2 = 0.4695$$\end{document}), indicating that a considerable proportion of the variance in this biomarker is explained by disease status. Similarly, several macular sectors (Sector1–Sector6 regions) exhibited consistent thinning in the MS group, all showing highly significant p-values (p < 0.001) and large effect sizes, confirming widespread ganglion cell layer degeneration in MS. Peripapillary RNFL measurements also demonstrated significant reductions in MS patients. In the MS cohort, the average thickness of the RNFL decreased from \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$98.80 \pm 9.98 \mu$$\end{document} m in controls to \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$83.09 \pm 11.91 \mu$$\end{document} m, again with strong statistical significance (F = 102.144, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\eta^2 = 0.3122$$\end{document}). Furthermore, sectoral RNFL analysis indicated significant thinning in several areas surrounding the optic disc, notably in the inferior, superior, and temporal sectors, along with various clock-hour sectors. These localized reductions suggest focal axonal loss in the optic nerve, a known pathological hallmark of multiple sclerosis. Most RNFL sectors demonstrated large to medium effect sizes, reinforcing their importance as structural biomarkers for MS detection. Moreover, False Discovery Rate (FDR) correction (Benjamini-Hochberg, q = 0.05) confirmed the significance of all GCL-IPL biomarkers, all RNFL biomarkers, and cup volume (FDR-corrected p ≤ 0.018), whereas rim area and disc area were not significant after correction. The Supplementary Tables S2 and S3 are provided that show the FDR correction summary.Table 6One-way ANOVA comparison of retinal biomarkers between MS patients and healthy controls. The mentioned retinal biomarkers are abbreviated as follows: GCL-IPL (ganglion cell-inner plexiform layer), I (Inferior), S (Superior), T (Temporal), N (Nasal), R (Retinal Nerve Fiber Layer) and CD (Cup Disc)TypeBiomarkerControl (Mean ± SD)MS (Mean ± SD)Fp-value\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\boldsymbol{\eta^2}$$\end{document}EffectGCL-IPLAVG_GCL_IPL85.00 ± 5.6371.55 ± 7.52199.128 < 0.0010.4695LargeGCL-IPLMIN_GCL_IPL81.66 ± 5.8765.50 ± 10.79157.347 < 0.0010.4115LargeGCL-IPLSector1_G86.37 ± 7.2371.81 ± 9.25150.733 < 0.0010.4012LargeGCL-IPLSector2_G87.67 ± 7.9872.22 ± 8.85171.017 < 0.0010.4318LargeGCL-IPLSector3_G85.79 ± 6.2271.30 ± 8.67177.460 < 0.0010.4409LargeGCL-IPLSector4_G83.98 ± 5.6869.95 ± 8.29185.461 < 0.0010.4518LargeGCL-IPLSector5_G83.30 ± 4.5072.16 ± 8.15130.759 < 0.0010.3676LargeGCL-IPLSector6_G83.66 ± 6.0171.59 ± 8.34132.574 < 0.0010.3708LargeRNFLSector_I128.90 ± 15.72104.85 ± 18.9794.920 < 0.0010.2967LargeRNFLSector_S123.33 ± 17.06105.77 ± 18.3050.589 < 0.0010.1836LargeRNFLSector_T65.06 ± 8.4254.51 ± 14.2637.417 < 0.0010.1426LargeRNFLSector_N77.79 ± 15.4767.02 ± 13.9528.850 < 0.0010.1137MediumRNFLSector1_R127.88 ± 28.15109.33 ± 25.7925.347 < 0.0010.1012MediumRNFLSector2_R116.40 ± 24.70101.68 ± 23.1220.221 < 0.0010.0825MediumRNFLSector3_R96.54 ± 22.2381.67 ± 18.6128.961 < 0.0010.1140MediumRNFLSector4_R64.24 ± 12.9155.02 ± 11.9729.393 < 0.0010.1155MediumRNFLSector5_R72.17 ± 16.9865.04 ± 19.907.4500.0070.0321SmallRNFLSector6_R108.79 ± 22.1087.92 ± 22.3546.060 < 0.0010.1699LargeRNFLSector7_R142.89 ± 25.62112.83 ± 25.5472.390 < 0.0010.2434LargeRNFLSector8_R135.18 ± 21.56113.45 ± 28.8835.296 < 0.0010.1356MediumRNFLSector9_R65.37 ± 10.2256.52 ± 18.4516.027 < 0.0010.0665MediumRNFLSector10_R51.80 ± 8.2343.04 ± 12.5732.047 < 0.0010.1247MediumRNFLSector11_R77.98 ± 13.3663.93 ± 18.6835.917 < 0.0010.1377MediumRNFLSector12_R126.40 ± 23.00106.49 ± 27.0231.582 < 0.0010.1231MediumRNFLAVG_RNFL_Thickness98.80 ± 9.9883.09 ± 11.91102.144 < 0.0010.3122LargeRNFLRNFL_Symm86.32 ± 7.1777.24 ± 15.8524.084 < 0.0010.0967MediumPeripapillaryVERTICAL_CD_Ratio0.36 ± 0.200.48 ± 0.1724.743 < 0.0010.0991MediumPeripapillaryAVG_CD_Ratio0.39 ± 0.210.50 ± 0.1817.155 < 0.0010.0708MediumPeripapillaryCup_Volume0.11 ± 0.150.17 ± 0.165.8550.0160.0254SmallPeripapillaryRim_Area3.00 ± 13.421.31 ± 0.272.3170.1290.0102SmallPeripapillaryDisc_Area3.43 ± 13.371.88 ± 0.411.9480.1640.0086Negligible Table 6One-way ANOVA comparison of retinal biomarkers between MS patients and healthy controls. The mentioned retinal biomarkers are abbreviated as follows: GCL-IPL (ganglion cell-inner plexiform layer), I (Inferior), S (Superior), T (Temporal), N (Nasal), R (Retinal Nerve Fiber Layer) and CD (Cup Disc)TypeBiomarkerControl (Mean ± SD)MS (Mean ± SD)Fp-value\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\boldsymbol{\eta^2}$$\end{document}EffectGCL-IPLAVG_GCL_IPL85.00 ± 5.6371.55 ± 7.52199.128 < 0.0010.4695LargeGCL-IPLMIN_GCL_IPL81.66 ± 5.8765.50 ± 10.79157.347 < 0.0010.4115LargeGCL-IPLSector1_G86.37 ± 7.2371.81 ± 9.25150.733 < 0.0010.4012LargeGCL-IPLSector2_G87.67 ± 7.9872.22 ± 8.85171.017 < 0.0010.4318LargeGCL-IPLSector3_G85.79 ± 6.2271.30 ± 8.67177.460 < 0.0010.4409LargeGCL-IPLSector4_G83.98 ± 5.6869.95 ± 8.29185.461 < 0.0010.4518LargeGCL-IPLSector5_G83.30 ± 4.5072.16 ± 8.15130.759 < 0.0010.3676LargeGCL-IPLSector6_G83.66 ± 6.0171.59 ± 8.34132.574 < 0.0010.3708LargeRNFLSector_I128.90 ± 15.72104.85 ± 18.9794.920 < 0.0010.2967LargeRNFLSector_S123.33 ± 17.06105.77 ± 18.3050.589 < 0.0010.1836LargeRNFLSector_T65.06 ± 8.4254.51 ± 14.2637.417 < 0.0010.1426LargeRNFLSector_N77.79 ± 15.4767.02 ± 13.9528.850 < 0.0010.1137MediumRNFLSector1_R127.88 ± 28.15109.33 ± 25.7925.347 < 0.0010.1012MediumRNFLSector2_R116.40 ± 24.70101.68 ± 23.1220.221 < 0.0010.0825MediumRNFLSector3_R96.54 ± 22.2381.67 ± 18.6128.961 < 0.0010.1140MediumRNFLSector4_R64.24 ± 12.9155.02 ± 11.9729.393 < 0.0010.1155MediumRNFLSector5_R72.17 ± 16.9865.04 ± 19.907.4500.0070.0321SmallRNFLSector6_R108.79 ± 22.1087.92 ± 22.3546.060 < 0.0010.1699LargeRNFLSector7_R142.89 ± 25.62112.83 ± 25.5472.390 < 0.0010.2434LargeRNFLSector8_R135.18 ± 21.56113.45 ± 28.8835.296 < 0.0010.1356MediumRNFLSector9_R65.37 ± 10.2256.52 ± 18.4516.027 < 0.0010.0665MediumRNFLSector10_R51.80 ± 8.2343.04 ± 12.5732.047 < 0.0010.1247MediumRNFLSector11_R77.98 ± 13.3663.93 ± 18.6835.917 < 0.0010.1377MediumRNFLSector12_R126.40 ± 23.00106.49 ± 27.0231.582 < 0.0010.1231MediumRNFLAVG_RNFL_Thickness98.80 ± 9.9883.09 ± 11.91102.144 < 0.0010.3122LargeRNFLRNFL_Symm86.32 ± 7.1777.24 ± 15.8524.084 < 0.0010.0967MediumPeripapillaryVERTICAL_CD_Ratio0.36 ± 0.200.48 ± 0.1724.743 < 0.0010.0991MediumPeripapillaryAVG_CD_Ratio0.39 ± 0.210.50 ± 0.1817.155 < 0.0010.0708MediumPeripapillaryCup_Volume0.11 ± 0.150.17 ± 0.165.8550.0160.0254SmallPeripapillaryRim_Area3.00 ± 13.421.31 ± 0.272.3170.1290.0102SmallPeripapillaryDisc_Area3.43 ± 13.371.88 ± 0.411.9480.1640.0086Negligible One-way ANOVA comparison of retinal biomarkers between MS patients and healthy controls. The mentioned retinal biomarkers are abbreviated as follows: GCL-IPL (ganglion cell-inner plexiform layer), I (Inferior), S (Superior), T (Temporal), N (Nasal), R (Retinal Nerve Fiber Layer) and CD (Cup Disc) To determine the most contributing retinal biomarker, the PCA bioplot represents the top ten biomarkers (see Fig. 5). The first two PC covers over 41 and 11%, respectively. From the PCA biplot we can observe two overlapping clusters of participants covering both MS and control group. We also observed high correlation among thickness of three RNFL sectors Sector_N, Sector3_RNFL and Sector6_RNFL. Also the thickness of these three sectors are orthogonal to the AVG_GCL_IPL layer thickness. The features with the highest loadings include Sector_N (magnitude = 0.371), Sector3_R (0.345), and Sector6_R (0.339). The loading structure reveals two distinct clusters of biomarkers: nasal and inferior sectors (Sector_N, Sector3_R, Sector5_R, Sector6_R, Sector7_R, Sector_I, and AVG_RNFL_Thickness) projecting toward the upper-right quadrant, and temporal sectors (Sector_T, Sector9_R) together with AVG_GCL_IPL projecting toward the lower-right quadrant. Literature has consistently shown that GCL-IPL layer thinning is a common biomarker across different types of MS patients [33, 34], and that the retinal nerve fiber layer progressively thins over the course of the disease [35, 36].Fig. 5PCA biplot of retinal biomarkers. Individual subjects are represented as points, with 95% confidence ellipses illustrating the distribution of each group. Vectors denote feature loadings, where the direction indicates the contribution to each principal component and the vector length represents the strength of that contribution. PC1 (x-axis) explains 41.6% of the total variance, while PC2 (y-axis) explains 11.3% of the variance PCA biplot of retinal biomarkers. Individual subjects are represented as points, with 95% confidence ellipses illustrating the distribution of each group. Vectors denote feature loadings, where the direction indicates the contribution to each principal component and the vector length represents the strength of that contribution. PC1 (x-axis) explains 41.6% of the total variance, while PC2 (y-axis) explains 11.3% of the variance Our findings fully align with these established precedents of retinal layer thinning in MS which is also shown in SHAP summary Fig. 6. According to SHAP feature ranking, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$AVG\_GCL\_IPL$$\end{document} was the most prominent feature to distinguish MS for control group followed by the contribution form the thickness of Sector1_G of GCL-IPL. Other key distinguishing features were mainly from RNFL sectors 1 and 10. Also the vertical cup-disc-ratio played strong role to distinguish MS patients from healthy controls, reflecting the importance of macular GCL–IPL thinning and peripapillary RNFL changes in MS detection.Fig. 6SHAP summary and waterfall plots represents feature importance. Each point represents an individual sample, with the x-axis indicating the SHAP value (impact on model output) and color representing the feature value (low to high). The plots indicate the most influential retinal biomarkers contributing to model predictions SHAP summary and waterfall plots represents feature importance. Each point represents an individual sample, with the x-axis indicating the SHAP value (impact on model output) and color representing the feature value (low to high). The plots indicate the most influential retinal biomarkers contributing to model predictions Biomarker explanation across macula and optic disc regions Figure 7 illustrates the retinal regions from which biomarkers are extracted for MS detection. The 6-sector breakdown is designed to match the retinal anatomy and the distribution of ganglion cells around the fovea [37]. The standard six sectors include: Temporal Superior (TS), Superior (S), Nasal Superior (NS), Nasal Inferior (NI), Inferior (I), and Temporal Inferior (TI). Measurements of GCL-IPL thickness within these sectors provide important biomarkers for detecting neuroretinal damage related to diseases such as age-related macular degeneration (AMD) [38], ischemic optic neuropathy (ION) [39], and MS [40]. In addition to macular biomarkers, peripapillary RNFL measurements are extracted from the optic disc region. RNFL thickness is analyzed across four primary quadrants: superior, inferior, nasal, and temporal to assess regional axonal integrity around the optic nerve head. Additional biomarkers including average RNFL thickness, RNFL symmetry, Rim area, Disc area and Cup volume are also collected from this region (see Fig. 2). Furthermore, RNFL clock-hour analysis divides the peripapillary region into twelve sectors, each representing a \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm{30}^{\circ}$$\end{document} segment around the optic disc [41]. These sectors are numbered analogously to a clock face, with 12 o’clock corresponding to the superior region and 6 o’clock corresponding to the inferior region. This comprehensive sectoral analysis facilitates the identification of localized axonal thinning that may remain undetected in quadrant-level assessments. All retrieved biomarkers from the GCL-IPL and peripapillary RNFL are documented as retinal features and combined to provide the input feature set for the proposed multiple sclerosis detection method.Fig. 7Biomarkers of GCL-IPL layer thickness across the macula region captured in 6 sectors, and biomarkers across the optic disc region for RNFL thickness in 4 quadrants. The macular area of the right eye fundus is divided into nine regions by three rings (central fovea, middle macular ring, outer macular ring) and four quadrants: superior (S), nasal (N), inferior (I), and temporal (T). The macula locations are abbreviated as follows: CF (central fovea), II (inner inferior), IN (inner nasal), IS (inner superior), IT (inner temporal), OI (outer inferior), ON (outer nasal), OS (outer superior), and OT (outer temporal).) Biomarkers of GCL-IPL layer thickness across the macula region captured in 6 sectors, and biomarkers across the optic disc region for RNFL thickness in 4 quadrants. The macular area of the right eye fundus is divided into nine regions by three rings (central fovea, middle macular ring, outer macular ring) and four quadrants: superior (S), nasal (N), inferior (I), and temporal (T). The macula locations are abbreviated as follows: CF (central fovea), II (inner inferior), IN (inner nasal), IS (inner superior), IT (inner temporal), OI (outer inferior), ON (outer nasal), OS (outer superior), and OT (outer temporal).) Comparison with other models The effectiveness of our proposed framework was validated by comparing its performance against reported results from SOTA methods. For this reference comparison, we used similar experimental settings (e.g., retinal layer biomarkers, subject-level validation) as in previous studies, acknowledging that direct performance transfer is not guaranteed across different datasets. Existing studies primarily utilize retinal structural parameters such as GCL-IPL thickness, RNFL thickness, and inter-eye differences in the IPL as input features for classification (Table 1). According to a review of recent literature, the majority of benchmark research in this domain relies on private datasets, which restricts the ability to directly compare various models. Furthermore, there is a methodological gap in reproducibility and uniform evaluation, as many studies do not specify the precise techniques used to derive retinal thickness measurements from OCT scans. Despite these limitations, we conducted an analysis using three benchmarks that reported comparable biomarkers (GCL-IPL and RNFL thickness) and experimental setups (LOOCV at subject level). The proposed framework achieves competitive results compared to existing methods at subject level (see Fig. 8), with sensitivity = 94.4% (95% CI: 88.3–98.7%, SD: 0.02), specificity = 95.1% (95% CI: 87.5–100%, SD: 0.03), and AUC = 94.7% (95% CI: 90.0–98.6%, SD: 0.02). In particular, our approach achieved an accuracy of 94% on our private dataset, which is higher than the range of 87–92% reported by Ortiz et al. [17, 18] on their respective datasets. Their study also reported sensitivity values between 82 and 97% and specificity values between 87 and 92%. Although the study by Ortiz et al. [18] reported a slightly higher sensitivity of 97%, our model achieved improved specificity, indicating better discrimination between MS patients and healthy controls. Furthermore, on our private dataset, our methodology achieved an accuracy approximately 8% higher, and sensitivity and specificity each approximately 17% higher, than the respective values reported by Dongil et al. [25] on their dataset. The improved performance confirms the value of integrating multiple retinal biomarkers within the proposed framework.Fig. 8Comparison of achieved performance metrics for the proposed methodology with existing literature Comparison of achieved performance metrics for the proposed methodology with existing literature Limitations It is important to take into account the limitations of this study when evaluating the findings. First, the analysis is based on a retrospective private dataset comprising 118 participants, including 74 patients with multiple sclerosis (MS) and 44 healthy controls. This is relatively a small cohort. Although, the cohort size is exceeding some of the previous studies (see Table 1), the use of a private dataset limits direct comparison with benchmark studies that rely on different data sources. Consequently, ensuring the reproducibility and external validation of the results remains challenging. Moreover, class imbalance between the MS and control may introduce bias into ML model, but as we obtained similar level of sensitivity (94%) and specificity (95%) at patient-level model performance (see Table 5), we believe our proposed model successfully avoided that bias. Secondly, the collected dataset lacks information on consequential clinical comorbidities and ophthalmic conditions, such as optic neuritis (ON), which is a familiar manifestation of MS and can significantly influence retinal biomarkers [42]. The absence of additional clinical markers may limit the ability to fully interpret the relationship between retinal structural changes and disease pathology. Third, our study is limited by a significant age difference between MS patients (41 ± 8 years) and controls (35 ± 13 years; p = 0.03). Since age influences retinal thickness [43], age-related changes may have confounded our results, and we did not adjust for age as a covariate in our primary analysis. Furthermore, all OCT scans were acquired using a single imaging system, which may restrict the robustness of the model across different OCT devices or imaging protocols. Variations between acquisition systems could potentially affect retinal thickness measurements and model performance in real-world clinical settings. Finally, detailed clinical information regarding disease duration and severity was not available for all patients. In particular, the duration of MS and baseline Expanded Disability Status Scale (EDSS) scores were unknown. Variability in disease duration and disability status may introduce bias in retinal biomarker measurements and could affect the interpretation of the results. Conclusion This study demonstrates that retinal biomarkers, particularly GCL-IPL and RNFL thickness measurements, serve as reliable indicators for detecting MS. Our proposed approach concatenates biomarkers extracted from both macular and optic disc regions, which are then used as input to conventional ML classifiers to differentiate MS patients from healthy controls. The proposed methodology emphasizes the diagnostic importance of GCL-IPL and RNFL biomarkers, demonstrating their significant contribution to classification performance. Among the several classifiers assessed using the combined GCL-IPL and RNFL features, the decision tree provided benchmark performance at the patient level with sensitivity of 94.3% and specificity of 95.1%, along with a PR-AUC of 95.2%. PCA biplot analysis identified ten key biomarkers with the highest discriminatory power, comprising nasal and temporal sectors along with average RNFL and GCL-IPL thickness, thereby validating the strategic selection of macular and optic disc regions. One-way ANOVA confirmed statistically significant differences (p < 0.001) in layer thickness across all sectors between MS patients and healthy controls, reinforcing the biological plausibility of these biomarkers. All GCL-IPL and RNFL biomarkers remained significant after FDR correction (q = 0.05), while rim area and disc area did not survive correction. The findings indicate that OCT-derived retinal biomarkers could represent an affordable, non-invasive method to aid in the diagnosis of multiple sclerosis in clinical settings. Future work will focus on external validation using public datasets to assess model generalizability of proposed model. Electronic supplementary material Below is the link to the electronic supplementary material. Supplementary Material 1 Supplementary Material 1