Figures
Abstract
Photonic crystal fiber based surface plasmon resonance (PCF-SPR) biosensors are sophisticated optical sensing platforms that enable precise detection of minute refractive index (RI) variations for various applications. This study introduces a highly sensitive, low-loss, and simply designed PCF-SPR biosensor for label-free analyte detection, operating across a broad RI range of 1.31 to 1.42. In addition to conventional methods, machine learning (ML) regression techniques were integrated to predict key optical properties, while explainable AI (XAI) methods, particularly Shapley Additive exPlanations (SHAP), were used to analyze model outputs and identify the most influential design parameters. This hybrid approach significantly accelerates sensor optimization, reduces computational costs, and improves design efficiency compared to conventional methods. The proposed biosensor achieves impressive performance metrics, including a maximum wavelength sensitivity of 125,000 nm/RIU, amplitude sensitivity of −1422.34 RIU ⁻ ¹, resolution of 8 × 10 ⁻ ⁷ RIU, and a figure of merit (FOM) of 2112.15. ML models demonstrated high predictive accuracy for effective index, confinement loss, and amplitude sensitivity. SHAP analysis revealed that wavelength, analyte refractive index, gold thickness, and pitch are the most critical factors influencing sensor performance. The combination of a simple yet efficient design and advanced ML-driven optimization makes this biosensor a promising candidate for high-precision medical diagnostics, particularly cancer cell detection, and chemical sensing applications.
Citation: Khatun MR, Islam MS (2025) Design optimization of high-sensitivity PCF-SPR biosensor using machine learning and explainable AI. PLoS One 20(9): e0330944. https://doi.org/10.1371/journal.pone.0330944
Editor: Yuan-Fong Chou Chau,, Universiti Brunei Darussalam, BRUNEI DARUSSALAM
Received: May 27, 2025; Accepted: August 8, 2025; Published: September 15, 2025
Copyright: © 2025 Khatun, Islam. This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.
Data Availability: All relevant data for this study are publicly available from the GitHub repository (https://github.com/MRKhatun/PCF_SPR_Biosensor_Design_Optimization).
Funding: The author(s) received no specific funding for this work.
Competing interests: The authors have declared that no competing interests exist.
1. Introduction
Photonic crystal fiber-based surface plasmon resonance (PCF-SPR) biosensors combine both photonic crystal fiber (PCF) surface plasmon resonance (SPR) techniques to provide very sensitive and ideal optical characteristics. Knight et al. conceptualized PCF in 1996 [1], marking a significant breakthrough in optical fiber technology. Its unique design is characterized by both the core and the cladding areas, which have a regular pattern of air holes along the length of the core [2]. Comparatively, PCF outshines conventional fibers in terms of their optical properties, such as chromatic dispersion, birefringence, and confinement loss (CL) [3,4]. SPR is an optical phenomenon that occurs when incident light excites collective electron oscillations at the interface of a metal and a dielectric medium, enabling highly sensitive detection of refractive index (RI) changes. The material composition and design variation of PCF-SPR biosensors greatly influence their sensitivity performances. Various studies explored diverse sensing mechanisms using PCF-SPR biosensor technology [5–7]. To get the best performance, the parameters like the air hole radius in core cladding areas, pitch distance (p), gold layer thickness (tg), perfectly matched layer (PML) thickness, and analyte layer thickness are optimized. Gold and silver are the most-used materials for plasmonic applications due to their high electron densities. Silver is better for plasmonic electronics because it is a better conductor, while gold is better for strong plasmonic resonance applications because it is more stable chemically and has a higher absorption coefficient [8,9]. PCF-SPR sensors are renowned for their exceptional sensitivity, compact dimensions, and versatility. To optimize the performance of PCF-SPR biosensors, it is essential to minimize CL and enhance sensitivity. The enhancement of sensor performance remains a focus for exceptional efficacy, and finding them applicable in diverse scientific and industrial domains [10,11]. Specifically, PCF-SPR sensors are widely applied in diverse fields such as medical diagnostics, biochemical sensing, detection of bioorganic compounds, and various clinical testing procedures [12,13].
PCF-SPR biosensor development has advanced significantly in recent years to explore high sensitivity characteristics. Recently, researchers have been using machine learning (ML) approaches to evaluate SPR sensor performance based on different input features, especially design parameters. Researchers have focused on addressing the complexity and minimizing the time-intensive nature of simulations to explore high-performance SPR-PCF biosensor models [14–16]. Traditional ML models are being used to optimize the performance of PCF-SPR performance. Also, artificial neural networks (ANNs) help accurately guess the optical features of PCF, such as its effective index, mode area, dispersion, and CL [17]. ML training and testing are faster than traditional methods like numerical MODE solutions [18]. This makes it possible to accurately predict outcomes for various PCF parameters. Furthermore, the research [19] shows a fast deep learning model for predicting optical properties in photonic sensors, with low mean square error (MSE) outperforming conventional methods. Another study presents a COMSOL Multiphysics simulation along with a novel artificial intelligence (AI)-driven method for optimizing PCF design [20]. Researchers have investigated the application of support vector machines (SVMs) as a substitute for ANNs in forecasting the optical properties of PCF. For this case, they explored optical biosensors with a design error rate of less than 3% shows that ML-based methods have been used to improve their performance. ML applications for structural optimization have been emerging to improve PCF-SPR biosensors in order to make them more sensitive and CL. In order to enhance performance, a study by [21] investigated a PCF-SPR sensor that used ANN. Where the sensor achieved an wavelength sensitivity (Sλ) of 18,000 nm/RIU, an amplitude sensitivity (SA) of 889.89 RIU ⁻ ¹, and a resolution of 5.56 × 10 ⁻ ⁶ RIU for analyte RI (na) 1.31 to 1.4. Similarly, [22] developed a high-sensitivity PCF-SPR biosensor for cancer detection, achieving a figure of merit (FOM) of 36.52 RIU ⁻ ¹ and an Sλ of 13,257.20 nm/RIU. All of this research demonstrates how well ML works to optimize PCF-SPR biosensors, which makes them ideal for chemical, pharmacological, and biological sensing applications.
Although PCF-SPR biosensors exhibit considerable potential in sensing applications, enhancing their performance has a significant barrier [23]. The main challenges involve ensuring an optimal balance among sensitivity, accuracy, and signal loss and providing compatibility with various analyte. Several studies have systematically investigated methods to improve the efficiency and performance of PCF-SPR biosensors [24–26]. Recent studies show that combining ML with PCF-SPR biosensor technology is a useful way to improve sensor performance. Researchers have shown that ML methods can predict the operating parameters and optimal design in an efficient way. This takes a lot less time than traditional simulation techniques. Despite that, the utilization of ML in PCF-SPR biosensor design remains emerging. Only a few researches have been done that use ML-based modelling for high-performance biosensor design optimization. To the best of our knowledge, no previous study has integrated explainable artificial intelligence (XAI) with ML for the optimization of PCF-SPR biosensor designs. This gap in the literature review highlights the need for an extensive study that will focus on the efficient, high-performance PCF-SPR biosensor design. This study aims to fill up this gap by carefully looking at the important design factors and performance of PCF-SPR biosensors. We focused on performance improvement in key areas like sensitivity, resolution, and FOM with a simple designed sensor. This study not only looks at how to improve sensors, but it also shows how input parameters can change the properties of sensors using XAI. The primary objectives of our research work are:
- To explore a highly sensitive, efficient PCF-SPR biosensor design characterized by low CL, high SA, Sλ, Resolution and FOM.
- To employ diverse ML methods to enhance the predictive power of biosensor properties by optimizing accuracy and reducing error.
- To employ XAI techniques, such as SHAP, to uncover the influence of design parameters, enabling a more transparent and interpretable biosensor design process.
Here’s how we present our research: Section 2 outlines the study’s materials, methods, design parameters, simulation process, and the ML techniques. Section 3 presents result and analysis of our study, comparing them with key findings. Section 4 provides a discussion, while Section 5 concludes the study by summarizing our findings and suggesting directions for future research.
2. Materials and methods
This investigation utilizes a structured approach that combines biosensor design, optical simulations, ML, and XAI to explore a PCF-SPR biosensor. The research workflow for PCF-SPR biosensor model optimization, using ML applications, is illustrated in Fig 1. The initial phase involves the design of the PCF-SPR biosensor. Then we performed sensor design and simulations using COMSOL Multiphysics to evaluate essential properties, including effective refractive index (Neff), CL, SA, Sλ, Resolution and FOM. Next, we generated and preserved the data from these simulations for future analysis. Subsequently, we utilize ML algorithms to predict and improve the performance of the sensor. Multiple regression models have been employed, including random forest regression (RF), decision tree (DT), gradient boosting (GB), extreme gradient boosting (XGB), and bagging regressor (BR). These models aid in uncovering patterns and correlations among various design parameters and the attributes that are being optimized. This speeds up the optimization process and improves its effectiveness relative to traditional methods. XAI methodologies like SHAP are utilized to examine how different parameters influence the performance of the sensor. This allows for the modification and enhancement of the design based on insights derived from data. In conclusion, we evaluate the accuracy of the ML models through metrics such as R-squared (R2), mean absolute error (MAE), and MSE.
2.1 Working principle of PCF-SPR biosensor
Fig 2 illustrates the working principle of an optical fiber-based sensing system that relies on evanescent field interaction for detection. A broadband light source injects light into the core of a specially designed optical fiber, where it propagates through total internal reflection. At each reflection point, a portion of the light extends beyond the core into the cladding region as an evanescent wave. A syringe injection pump introduces the target sample (such as a chemical or biomolecule solution) into a flow chamber that surrounds the sensitive region of the fiber. When the evanescent field interacts with the sample, any change in the local RI, absorption, or scattering alters the transmitted light’s properties. This modified optical signal is collected at the output end and sent to an optical spectrum analyzer (OSA), which measures variations in the transmission spectrum (e.g., wavelength shift or intensity change). The data is then processed and analyzed using computer software to detect and quantify the presence of the analyte, making the system highly suitable for label-free and real-time sensing applications.
The proposed PCF-SPR biosensor is engineered for effective real-time sensing in both medical diagnostics and environmental monitoring. In the medical domain, it is capable of detecting a wide range of biomarkers, including cancer indicators, hormones, proteins, and pathogens such as viruses and bacteria in aqueous biofluids like blood and serum. Its high sensitivity and broad na detection range (1.31–1.42) make it particularly suitable for early-stage disease diagnosis and continuous health monitoring. This RI range covers most biological analytes, typically found in environments with na values between 1.33 and 1.40, while the inclusion of the 1.31 to 1.32 range, though less common in practical biosensing, allows for theoretical analysis of sensor behavior near the lower detection threshold. This supports a more comprehensive understanding of sensitivity performance and helps evaluate the design’s robustness under edge-case or simulation-driven conditions. In environmental applications, the sensor can be employed to identify chemical contaminants, solvents, and pollutants in water or air samples. Its fast response time, compatibility with microfluidic systems, and adaptability to portable and point-of-care platforms make it highly suitable for on-site detection, addressing critical challenges in both clinical and environmental settings.
2.2 Sensor cross-sectional design
The proposed biosensor optimization approach involves simulation with defined geometric features, incorporating components like gold layers, a fused silica substrate, air cavities, and an analyte zone. Fig 3 presents the cross-sectional structure of a PCF based SPR biosensor, developed for precise biochemical detection. The design with a smaller number of air holes reduces fabrication complexity. In our design, we have utilized only 11 air holes, a significantly smaller number compared to previous redesigns. The fiber consists of a core surrounded by a structured cladding, where periodically arranged air holes (d1, d2) help guide light through the fiber. The spacing between these air holes is defined by the pitch (p), ensuring proper light propagation. Key structural distances include D1 = 2.6 × p, D2 = 3 × p, and D3 = 3.5 × p, which represent the radial placement of different regions in the fiber structure. D1 extends from the fiber’s center to the gold layer, the region where SPR takes place. D2 reaches the analyte layer, where interactions between biomolecules and the sensing surface occur. D3 extends further to the PML, which absorbs unwanted radiation and minimizes reflection. These structural parameters are essential for optimizing light transmission, improving sensor performance, and enhancing detection sensitivity. The color-coded regions represent different fiber components.
2.3 Methodologies
The performance of a PCF-SPR biosensor depends on several key parameters [27]. Neff ensures proper light propagation and phase matching. While CL measures optical power leakage, lower values indicate better efficiency. SA enhances detection by quantifying intensity changes, and Sλ detects small RI variations by measuring resonance wavelength shifts. Resolution determines the smallest detectable RI change, with higher resolutions offering more precision. The FOM balances sensitivity and resonance sharpness, ensuring accurate detection. These parameters collectively evaluate sensor performance for biomedical, chemical, and environmental applications. Moreover, the surface plasmon polariton (SPP) in PCF SPR biosensors states electromagnetic waves that move over the metal-dielectric interface and are produced when light combines with free electrons on the metal surface. The phenomenon that generates SPP is called SPR. These waves are highly sensitive to changes in the na, which makes them crucial in PCF-SPR biosensors for analyte detection. Conversely, the fundamental mode directs light through the PCF, facilitating its propagation within the sensor. Here we are giving the brief overview of different optical parameters for the PCF-SPR biosensor.
The Sellmeier equation defines the calculation of the RI of fused silica, based upon the wavelength of light [28]. The equation is stated as follows:
The Sellmeier model utilizes specific constants to characterize the wavelength-dependent RI of materials. The constants used in this context are: B1 = 0.69616300, B2 = 0.407942600, B3 = 0.897479400, and C1 = 0.00467914826, C2 = 0.0135120631, C3 = 97.9340025.
The CL is denoted by the symbol α(dB/cm) [28]. CL in the sensor is computed according to the following relation, using the imaginary part of the Neff:
Where k0 = 2π/λ represents the free-space wave number, and Im(Neff) is the imaginary component of the Neff. This expression quantifies optical attenuation resulting from imperfect mode confinement, which plays a crucial role in sensor characterization.
Amplitude sensitivity (SA) is another vital property that indicates the sensor’s response with the variations of na by observing changes in transmitted light intensity [29]. The numerical formulation is expressed as:
Here, na indicates the RI of the analyte, and ∂na represents the difference between the na of two neighboring analytes. The function α(λ, na) denotes the CL, while ∂α(λ, na) presents the variation in CL as the na changes. This formula evaluates the effect of na fluctuations on the amplitude of light waves through the SPR sensor.
Another critical performance metric is wavelength sensitivity (Sλ), which reflects how the sensor output responds to changes in the incident light’s wavelength [29]. It is defined by the following relation:
Where Δλpeak represents the peak wavelength variation, and Δna is the variation in na between two adjacent analytes.
The calculation of sensor resolution is essential to assess the detection capability of the proposed sensor, as defined by the equation below [30]:
Where Δna represents the change in na, and Δλmin = 0.1 nm denotes the smallest detectable wavelength shift. This equation helps quantify the sensor’s ability to distinguish small variations in analyte concentration.
The Figure of Merit (FOM) is an important parameter used to evaluate the performance of an SPR-based biosensor. It is defined as the ratio of Sλ to the full width at half maximum (FWHM) of the resonance curve [30]. The formula for FOM is given by:
Where, Sλ (nm/RIU) indicates the shift in resonance wavelength per unit change in na, and FWHM (nm) representing the spectral width of the resonance dip.
For a high-performance PCF-SPR biosensor, higher values of FOM, Sλ, and SA contribute to improved detection accuracy, enhanced signal response, and better analyte sensitivity. In contrast, lower CL improves light propagation, minimizes signal attenuation, and enhances overall sensor efficiency. The mapping of optical parameters and their impact on biosensor performance is given below.
- Higher FOM → Sharper resonance peak → Improved detection accuracy and resolution
- Higher SA → Greater intensity variations → More precise signal detection
- Higher Sλ → Larger resonance wavelength shift → Enhanced sensitivity to analyte changes
- Lower CL → Better light propagation → Reduced signal attenuation and improved efficiency
2.4 Dataset generation
In this study, we have used COMSOL Multiphysics software to design and simulate the sensor models and evaluated these models using the finite element method (FEM) [31]. The dataset is derived from simulation outputs and includes critical structural and optical features such as core diameters (d1, d2), spacing between air holes pitch (p), thickness of the gold coating (tg), na, operational wavelength (wl), calculated Neff, CL, and SA. In addition to these primary features, we derived further optical performance metrics such as Sλ, resolution, and FOM. This comprehensive dataset was also utilized to train ML models aimed at predicting key optical responses of the proposed sensor across various structural configurations, thereby facilitating the identification of high-performance design combinations.
To evaluate each single-mode calculation simulation took around 2 minutes. The amount of time varies according to the number of degrees of freedom resolved. The number of degrees of freedom solved for our mode analysis is 242881. This number depends on the structural design of the sensor, particularly the size and arrangement of the air holes. We used a workstation with a 2.3 GHz Intel Core i3 processor and 12 GB of RAM to perform the calculations.
The simulation process generally follows these steps:
- Build the biosensor design according to the plan.
- Choose suitable electromagnetic interfaces for the analysis.
- Define the materials used for the core and cladding.
- Create a mesh to ensure precise estimates.
- Choose the input settings.
- Use a suitable solver to run the exercise.
- Evaluate the results and explain what the data means.
- Change the settings if necessary and improve the model.
- Gather the results and create a dataset for more research.
Here, Fig 4 represents different states of the PCF-SPR biosensor model, depending on its design and field distributions. Here, Fig 4(a) shows the meshed model of our biosensor model. That divides the computational domain into small, finite elements to solve partial differential equations (PDEs) for light propagation using the FEM [32]. The accuracy and efficiency of the simulation depend on the quality of the mesh. That depends on the air hole arrangement and other design parameters of the sensor structure. Again, Fig 4(b) illustrates the electric field distribution of the core mode for the y-polarized mode. The bright regions indicate areas of strong electric field intensity, revealing how light interacts within the fiber. Fig 4(c) displays the power flow distribution of the SPP mode for the y-polarized mode. The energy is mostly gathered near the plasmonic interface. This shows that the core mode and the plasmonic mode are coupled, which is important for sensing purposes.
This dataset employs parameters such as d1, d2, p, tg, na, and wl as predictor variables. The outputs or target attributes include the Neff, CL, SA, and Sλ. From the simulation result, we have got Neff and then numerically calculated the optical properties. The data provides insights into how structural modifications influence light propagation and resonance behavior of the sensor. This dataset provides an important insight for PCF-SPR biosensor performance optimization. Table 1 presents an overview of the main variables included in the dataset used for analyzing the PCF-SPR biosensor.
2.5 AI techniques for PCF-SPR sensor optimization
Prior studies [33] mentioned that SPR-based sensors are well-suited for label-free detection of cancer markers due to their ability to monitor RI variations resulting from specific molecular binding events. AI techniques, particularly ML, have emerged as a powerful tool in the design and optimization of PCF-SPR biosensors. These data-driven models facilitate rapid prediction of complex optical properties, such as Neff, CL, and SA, based on sensor design parameters. That significantly reduces the time-consuming simulation processes. ML models, including RF, SVM, GB, and Bayesian regularization neural networks (BRANNs), have shown potential in modeling nonlinear relationships between structural features and sensor performance. Such approaches enable efficient inverse design, structural tuning, and enhanced prediction fidelity, making them ideal for biosensing applications. Furthermore, integrating ML with XAI enhances both optimization speed and interpretability. Based on other studies [34], different AI techniques can be used for sensor performance optimization as follows:
BRANNs are capable of learning from small, noisy datasets and capturing complex nonlinear dependencies between input parameters and output targets. The method reduces overfitting and enhances generalization through regularization, making it ideal for high-accuracy, real-time applications and inverse sensor design. Classical ML models such as SVM, DT, and ensemble methods like RF, AdaBoost (AB), and GB have been used for classifying optical modes and predicting sensor behavior. These models are particularly useful in early-stage design to efficiently evaluate large design spaces and estimate key performance indicators. Furthermore, advanced deep learning architectures, including feedforward neural networks (FNNs), convolutional neural networks (CNNs), and generative models such as variational autoencoders (VAEs) and conditional generative adversarial networks (GAN), are now being applied for precise resonance prediction, analyte classification, and automated inverse design of PCF structures. CNNs can analyze mode profile images, while autoencoders and 1D-CNNs help in denoising experimental data. Deep reinforcement learning (DRL) offers an adaptive framework for multi-objective optimization under fabrication and material constraints. It enables the sensor to learn from operational history and adjust design parameters in real-time, thereby supporting self-calibrating and self-optimizing systems. Adaptive sensing and environmental compensation AI techniques can also be employed to monitor environmental drift and sensor degradation. By learning from prior data, these models can dynamically adjust sensing parameters to maintain consistent accuracy over extended periods, which is especially critical in remote or in vivo diagnostics. So it is clear that the integration of these AI techniques not only enhances predictive accuracy but also reduces design time and computational cost, thus enabling the rapid development of next-generation PCF-SPR biosensors with enhanced sensitivity, robustness, and adaptability.
2.6 ML algorithms
Since our target variables are continuous, regression models were the appropriate choice for prediction tasks. We applied various regression algorithms to analyze the dataset and assess how design and other factors impact the outcomes. Below is an overview of the ML regression techniques employed:
Decision Tree Regression (DTR) operates by dividing the input feature space into distinct regions and making predictions based on the average target value within each region [35]. This supervised, non-parametric approach is intuitive and allows straightforward visualization of decision rules. However, if left unchecked, it can easily overfit the training data.
Random Forest Regression (RFR) builds an ensemble of decision trees by training each tree on a different random subset of the data and selecting random features at each split [36,37]. The final prediction is obtained by averaging the outputs of all individual trees. This approach enhances prediction stability and accuracy while effectively reducing the risk of overfitting, making it well-suited for handling complex and varied datasets.
Gradient Boosting Regression (GBR) sequentially constructs an ensemble of weak learners, where each subsequent model aims to correct the residual errors of its predecessors [38]. This iterative refinement enables GBR to model complex patterns effectively and achieve high prediction accuracy.
Extreme Gradient Boosting Regressor (XGBR) extends GB by optimizing both computational speed and predictive performance [39]. It combines a series of decision trees trained to minimize errors, excelling at handling large-scale data and intricate relationships within features.
BR improves model stability by training several base regressors on different randomly sampled subsets of data with replacement [40]. This ensemble method reduces variance and enhances prediction accuracy. The ensemble’s output is determined by combining the predictions of all base models through averaging, which helps minimize prediction variability and mitigates the risk of overfitting.
The integration of ML techniques plays a crucial role in predicting the optical properties of the proposed PCF-SPR biosensor, such as Neff, CL, and SA. These ML models effectively learn the nonlinear mapping between key design parameters (e.g., na, tg, pitch, air-hole diameters) and corresponding optical properties. This not only reduces computational time from minutes to milliseconds but also allows for rapid screening of multiple design combinations. Among the tested models, RFR and XGBR provided the excellent trade-off between prediction accuracy and execution time. Furthermore, ML approaches aid in precise finalization of sensor parameters based on maximum sensitivity, minimal CL, and high FOM.
2.7 ML models evaluation metrics
ML regression model performance evaluation needs to assess using different performance metrics [41]. Here the metrics description will be described in short to understand the implication and numerical calculation process. Smaller MSE values indicate a more accurate model, as they reflect smaller differences between predicted and actual outcomes. MSE evaluates how well a model predicts by quantifying the average squared gap between actual outcomes and predicted values. It reflects how much the predictions deviate from the true values, with lower MSE indicating better model accuracy. The metric is calculated by averaging the squares of all prediction errors across the dataset [41].
Here, stands for the model’s forecasted value, while y denotes the actual observed value.
A MAE reflects higher predictive accuracy, as it captures the average magnitude of deviation between forecasts and actual outcomes. MAE is computed by averaging the absolute errors across all predictions, providing a straightforward indicator of prediction quality [41]. The equation (8) presents the formula for MAE calculation.
In this context, N denotes the total number of data points and yi represents the observed value, while represents the predicted value.
The R2 value quantifies the efficacy of a model in predicting the dependent variable’s outcome. The range is from 0 to 1, with 0 indicating no explanation of the variance in the dependent variable and 1 indicating a complete explanation of the relationships. An R2 value of 1 indicates that the model accounts for 100% of the variance in the target variable, while a score of 0.5 suggests that the model explains 50% of the variance [41].
We use the following formula to compute the R2 value:
In this expression, the numerator ∑(yᵢ − ŷᵢ)² represents the total squared error between the predicted values ŷᵢ and the actual observations yᵢ. The denominator ∑(yᵢ − ȳ)² captures the total variation in the actual data around the mean value ȳ.
2.8 Explainable AI (XAI)
XAI that makes AI models easier to understand and interpret. It focuses on developing methods that make the decisions and processes of AI systems transparent, so users can make sense of how outcomes are reached. This is crucial in areas like healthcare, finance, and automotive industries, where the accuracy and reliability of AI predictions are critical [42–44]. SHAP is one of the most widely used methods for model interpretability. It provides both global explanations that capture the overall behavior of the model and local explanations that detail how individual features influence specific predictions. SHAP assigns each feature a value representing its contribution to the prediction. These values are consistent and additive, ensuring that the sum of all feature contributions equals the difference between the predicted value and the model’s average output, thereby offering a fair and transparent measure of feature importance [45].
To enhance the transparency and trustworthiness of the ML model used for predicting optical properties, SHAP was employed as an XAI technique. SHAP provides detailed insights into how each input parameter, such as air hole diameters, pitch, tg, and na contributes to model outputs like Neff, CL, and SA. By visualizing SHAP values, we were able to identify the most influential design features, enabling more informed and efficient adjustments to the PCF-SPR biosensor structure. While SHAP does not directly enhance the sensor’s physical sensing performance, it plays a crucial role in interpreting the ML model’s predictions. This interpretability supports targeted design optimization, reduces the dependency on exhaustive simulations, and fosters the decision-making process for sensor performance optimization.
3. Results & analysis
3.1 Analysis of simulation results
Fig 5 displays the coupling point where the surface SPP mode intersects with the core mode. The structure features air hole diameters of 0.6 μm for d1 and 1 μm for d2, with a tg of 40 nm. We have used the COMSOL Multiphysics simulation to evaluate Neff real and imaginary values along the y-axis that were used to calculate various propagation properties. Fig 5 displays the coupling point where the surface SPP mode intersects with the core mode under the conditions: na of 1.37, core diameters d1 = 0.6 μm and d2 = 1 μm, and a tg = 40 nm. The figure demonstrates how loss increases with the decrease in wavelengths and then decreases as they increase. The figure also shows how Neff varies with wavelength, indicating a decrease in Neff as the wavelength increases. At a wavelength of 0.67 µm, the real parts of Neff for the y-polarized core and SPP modes coincide, marking the phase matching condition. This point is significant as SPR occurs here. At this wavelength, CL reaches its maximum, and Neff is 1.451. The graphs in Fig 6 illustrate how changes in d1 and d2 size influence CL variation with wavelength, where p = 2 µm, tg = 40 nm, and na = 1.37. In Fig 6(a), where d2 is fixed at 1 µm, d1 increases gradually from 0.6 µm to 1.6 µm. With the increase of d1, CL also increases gradually. The lowest loss is observed when d1 is 0.6 µm, while larger values of d1 result in higher loss. Similarly, graph in Fig 6(b), where d1 is fixed at 1.2 µm and d2 changes from 0.6 µm to 1.2 µm. In this case, the highest CL is seen at d2 = 0.6 µm, and the loss goes down as d2 increases.
Furthermore, Fig 7 illustrates the relationship between SA and wavelength for different air hole sizes. We kept the other parameters fixed at p = 2µm, tg = 40 nm, and na = 1.37. From the graphs, it is clear that the variation in air hole dimensions influences the sensor’s response, which causes changes in SA. In Fig 7(a), SA is plotted for different d1 values, keeping d2 = 1 µm as a fixed value. From the graph, we get that as d1 increases from 0.6 µm to 1.2 µm, the SA curve shifts to a higher value. The highest SA is achieved at d1 = 1.2 µm, indicating that a larger air hole in this design enhances plasmonic interaction and improves sensitivity. Fig 7(b) presents the effect of d2 variation, keeping d1 = 1.2 µm as constant. The graph shows that as d2 increases from 0.6 µm to 1.2 µm, SA also increases. This suggests that an increase in d2 makes the core-plasmon coupling stronger. Overall, the analysis demonstrates that optimizing d1 and d2 plays a crucial role in achieving high CL and SA, which impacts the sensor’s detection capabilities.
Additionally, from the experiment, we depict that the thickness of tg has a significant effect on sensor performance. We varied tg from 30nm to 60nm while keeping d1 = 0.6µm, d2 = 1µm, and p = 2µm constant. Fig 8(a) shows how CL changes with wavelength for different values of tg. The graph in Fig 8(a) indicates that as the tg increases, the CL decreases. For tg = 30nm (blue curve), the highest CL is observed, with a peak value of 350 dB/cm 0.65µm. When the thickness of tg increases to 40 nm (green curve), the peak CL shifts slightly toward higher wavelengths and reduces intensity. For tg = 50nm (red curve), the CL continues to decline, and the peak becomes broader. At tg = 60nm (cyan curve), the loss is at its lowest value, with a less pronounced peak, indicating a weaker plasmonic effect. This pattern suggests that a thinner gold layer enhances plasmonic resonance, leading to higher CL, while a thicker layer reduces it.
Again, Fig 8(b) presents the impact of different tg on SA across varying wavelengths. The graph indicates that as tg increases, SA tends to decrease. When tg = 30 nm (blue curve), the most significant negative SA is observed 0.66 µm. Increasing the thickness to 40 nm (green curve) results in a slight reduction in sensitivity and a shift in the peak toward a longer wavelength. With tg = 50 nm (red curve), the sensitivity declines further, and the peak becomes broader. At tg = 60 nm (cyan curve), the lowest sensitivity is recorded, with a less prominent peak, indicating weaker plasmonic interaction. These findings suggest that a thicker gold layer minimizes CL and improves sensitivity, while a thinner layer reduces the sensor’s overall performance.
Pitch size also plays a crucial role in determining the performance of the sensor. In this study, the pitch was varied from 2 µm to 3 µm while keeping na = 1.37, d1 = 0.6 µm, d2 = 1 µm, and tg = 40 nm constant. Fig 9(a) illustrates how CL changes with wavelength for different pitch values. The graph in Fig 9(a) shows that as the pitch increases, CL decreases. At pitch, p = 2 µm (blue curve), the highest CL is observed at wavelength 0.66 µm with high intensity. When the pitch increases to 2.5 µm (green curve), the peak shifts slightly toward a longer wavelength, and the loss intensity reduces. With a pitch of 3 µm (red curve), CL continues to decline, and the peak becomes broader, indicating a weaker plasmonic effect. This suggests that a smaller pitch leads to stronger light confinement and higher loss, while a larger pitch allows better mode propagation and reduces CL. Again, Fig 9(b) examines the effect of pitch variation on SA. A similar trend is observed, where a smaller pitch results in higher sensitivity, with a pitch of 2 µm showing the strongest negative SA at wavelength 0.66 µm. As the pitch increases to 2.5 µm, the sensitivity decreases slightly, shifting toward a longer wavelength. When the pitch reaches 3 µm, the SA further weakens, leading to a broader response. These findings indicate that pitch size must be optimized based on the sensor’s intended application. We should carefully adjust the pitch choice to balance sensitivity and stability in sensor design.
Fig 10 illustrates the variation in CL across wl for different analyte refractive indices, keeping d1 = 0.6 µm, d2 = 1 µm, p = 3 µm, and gold thickness at 60 nm constant. This analysis provides insights into how na influences the optical behaviour of the sensor. In Fig 10(a), CL rises with wavelength, displaying distinct peaks for na values between 1.31 and 1.41. As na increases, the resonance peak shifts to longer wavelengths, and the peak intensity gradually increasing. This shift reflects stronger plasmonic coupling at higher na values, resulting in greater CL. The trend underscores the strong dependence of CL on na, highlighting its importance in sensor performance. Fig 10(b) exhibits a similar pattern but extends the wavelength range up to 2.5 µm and includes an additional na value of 1.42. As na increases, the resonance peaks continue shifting toward longer wavelengths, with the highest CL observed for na = 1.42. The peaks become more prominent, and loss values rise significantly, especially at higher na values. These results emphasize the significant impact of na on CL, showing that increasing na shifts resonance to longer wavelengths while amplifying loss. This behaviour is critical for designing sensors with enhanced sensitivity and precision in detecting variations in na.
Again, Fig 11 displays how SA varies with wavelength across different analyte refractive indices, using fixed parameters: d1 = 0.6 µm, d2 = 1 µm, p = 3 µm, and a gold thickness of 60 nm. The variations in SA across different wl indicate the influence of na on plasmonic interactions. As na increases from 1.31 to 1.41, the sensitivity peaks shift towards longer wl. For na = 1.31–1.32 (blue curve), the first significant drop occurs around 0.65 µm, whereas for na = 1.40–1.41 (red curve), the minimum sensitivity shifts beyond 0.9 µm. The negative peaks indicate strong plasmonic coupling, highlighting the sensor’s capability to detect small changes in na. These variations suggest that the optimal sensing wavelength shifts as na increases, making precise wl selection crucial for achieving high sensitivity. Overall, the results emphasize the impact of na on SA and the importance of choosing the appropriate wl for effective sensing. The shift in resonance peaks with increasing na highlights the need for wl tuning to maximize detection accuracy.
The Table 2 presents different characteristics of the SPR biosensor across various parameter values of na, with constant d1 = 0.6 µm, d2 = 1 µm, p = 3 µm, and tg = 60 nm. It presents CL, peak resonance wavelength (λpeak), SA, Sλ, resolution, and FOM corresponding to na values. As na increases, the resonance wavelength shifts to longer values. We observe that the peak loss found at 590 nm wavelength for na = 1.31, and it reaches 2210nm for na = 1.42. SA remains low for smaller na values but increases significantly beyond na = 1.36. At na = 1.31, SA is 10 (RIU-1), but it jumps to 50 (RIU-1) at na = 1.38 and reaches 1250 (RIU-1) at na = 1.41, showing improved sensor response for higher na. Sλ also increases as na rises. It reaches a maximum of 125,000 nm/RIU at na = 1.41. The resolution improves with the increase of na, reaching 8.00 × 10−7 RIU at na = 1.41, which employs the sensor’s ability to detect small changes in na. Furthermore, FOM also rises steadily with the increase of na. It remains below 50 for lower na values but increases beyond na = 1.36 and highest at 1402.28 at na = 1.41. These results show that the sensor performs improves with higher na values, because CL, SA, Sλ, and FOM reach their highest values.
Table 3 presents the performance evaluation of the PCF-SPR biosensor based on various design parameters and na. The design parameters are small and large air hole diameters (d1, d2), pitch (p), tg, and the optical properties, such as λpeak, CL, Sλ, resolution, FOM, and SA. With the increase of na from 1.31 to 1.41, the λpeak shifts to higher values that vary from 0.57 µm to 0.95 µm. Maximum CL varies significantly, reaching its highest value of 445.37 dB/cm at na = 1.4. Similarly, Sλ increases and reaches a peak value of 105000 nm/RIU at na = 1.41. Resolution also improves as na rises, reaching 9.52 × 10 ⁻ 7 RIU at na = 1.41. Furthermore, the FOM shows a rapid increase and shows the highest value at 2112.15 RIU-1 for na = 1.41, which confirms superior sensing capability. Again SA also rises with increasing na, where the highest value is 95.28 RIU-1 at na = 1.41. These results suggest that the sensor performs with optimized parameters such as d1 = 0.6 µm, d2 = 1.0 µm, p = 2.5 µm, and tg = 40 nm, contributing to maximum sensitivity and resolution. From this table, we get the results and insights with parameter variation on biosensor efficiency that help to select optimal design configurations for the best performing sensor.
Table 4 presents the maximum absolute SA values for different na in a PCF-SPR biosensor. The listed parameters include the structural dimensions: d1, d2, p, tg along with the operating wavelength (wl). The SA (RIU-1) values represent the sensor’s ability to detect changes in the surrounding RI, making them crucial for evaluating the sensor’s performance. As na increases, SA values generally increase in magnitude, indicating enhanced sensitivity. The highest negative SA value of −1422.34 RIU-1 is observed at na = 1.39, highlighting the sensor’s peak detection capability at this na.
3.2 ML-based performance analysis
Using ML, we have used the simulation-based dataset to explore other design combinations and to explore better-performing designs. The dataset “Dataset 1” contains 5252 samples with eight features, where d1, d2, tg, na, and wl serve as inputs, while Neff, CL, and SA are designated as outputs. We have created two subsets, “Dataset 2” and “Dataset 3”, from the initial primary “Dataset 1”. “Dataset 2” contains the combined samples for Neff and CL, while “Dataset 3” includes samples for SA. Using the train-test split method using the Scikit-learn library, we partitioned the dataset into training and testing sets with a 75% and 25% ratio. After preprocessing and splitting the data, each model was trained on the training set, and its performance was evaluated on the testing set. We implemented various ML algorithms employing ensemble techniques and subsequently applied XAI methods to these models to improve interpretability and transparency.
The polynomial equation y = 40.15x² − 105.93x + 70 shown in Fig 12 describes how the resonance wavelength shifts as na changes. In this equation, x represents na, and y is the resonance wavelength in micrometers. The quadratic term (40.15x²) means that the wavelength shift increases more rapidly as na increases. The linear term (−105.93x) shows the direct impact of na on resonance wavelength. The negative coefficient −105.93 means that for smaller values of na the resonance wavelength (µm) initially decreases. However, as na increases, the positive quadratic term 40.15x² starts to dominate linear term (−105.93x), causing the resonance wavelength to rise sharply. The constant term (70.45) is the estimated resonance wavelength when na is zero, though this value is theoretical and does not hold physical significance. The equation follows a curved trend rather than a straight-line change, meaning that at higher na values, small shifts cause more noticeable wavelength changes. This pattern is useful in biosensor applications, where detecting small na variations is important with high sensitivity and accuracy.
Fig 13 compares the actual and predicted Neff values using the RFR model. The actual values are marked in purple, while the predicted values are in orange. The graph shows that the RFR model predicts Neff accurately, with minor deviations in some areas. Additionally, Fig 14 presents the validation of different ML models for predicting Neff. We have plotted together the actual data alongside the predicted data using the DTR, RFR, GBR, XGBR, and BR models. The close match between actual and predicted values implies that all models perform well, showing minimal variations. The validation confirms that these models generalize effectively, maintaining consistency across different wavelength values.
Table 5 provides performance metrics such as R², MAE, and MSE for both training and test datasets for different ML models. Here, DTR achieves the highest train R² (0.999969) but has slightly lower test accuracy. RFR, BR, and XGBR show strong generalization, with high R² values and low errors. KNN records the lowest test R² (0.992828) and the highest test MAE. (0.007912), indicating lower accuracy. GBR performs well, achieving a high test R² (0.997951) and the lowest test MSE (0.000053). The validation results suggest that ensemble models such as RFR, GBR, and XGBR provide the most reliable predictions for Neff with minimal error. In terms of execution time, the DTR is the fastest, with the lowest training time (0.020 sec) and test time (0.000099 sec). However, it is less accurate compared to ensemble models. While XGBR offers better efficiency, with a lower training time (0.238 sec) compared to RFR (0.618 sec), RFR remains a strong performer due to its consistent performance. Although GBR is slightly more accurate, it requires more computational resources. Overall, XGBR and RFR emerge as the best performers, offering strong predictive accuracy with a balance of execution efficiency.
Furthermore, we have calculated the SHAP values using the RFR model, to assess feature importance and interpretability in the analysis. SHAP values quantify how much each feature of the input data influences the model’s prediction, relative to the average prediction. Positive SHAP values indicate an increase in the target value Neff, while negative values mean a decrease. It also helps to understand how much each input attribute contributes to Neff’s final prediction. Fig 15 illustrates this by combining feature importance with feature effects. Each point on the summary plot represents a Shapley value for a feature and an instance, with the y-axis indicating the feature and the x-axis the Shapley value. The color gradient from blue to red represents the feature’s value from low to high. Notably, wl has a significant impact on Neff, with higher values (in red) decreasing and lower values (in blue) increasing. This also shows that wl has a significant negative impact on Neff, underscoring its crucial role in determining Neff, while other variables have a less significant influence on Neff value prediction.
Again, the SHAP waterfall plot in Fig 16 shows how different input features contribute to predicting Neff, starting from a base value E[f(x)] = 1.453 and going to a final predicted value f(x) = 1.454. The plot depicts that each input feature either increases or decreases Neff, impacting the final predicted value. The blue bars represent negative contributions, while the red bars indicate positive contributions. It reveals that wavelength (wl = 0.63 µm) has the most significant impact, which increases Neff by 0.00187. Pitch (p = 2 µm) decreases Neff by 0.00064, while d1 (1.2 µm) slightly decreases it by 0.00012. The influence of d2 (1 µm) is a small negative contribution of 0.00008. The na = 1.35 has a minor positive effect of 0.00003, whereas the tg = 0.04 µm has no noticeable impact. This SHAP plot provides insight into how input parameters influence the predicted Neff value. We observe that wl is the most dominant factor, followed by p, while other features have a much smaller effect on the final prediction.
3.2.1 Confinement loss (CL).
The graph in Fig 17 shows how the predicted CL values compare to the actual ones using the RFR model. The actual data points, represented in purple, are plotted alongside the predicted values in orange. The pattern suggests that the model accurately follows the trend of CL, although slight differences are noticeable in higher ranges. Overall, the predictions align well with actual values across different wavelengths, demonstrating the model’s effectiveness. A further evaluation of ML models in predicting CL is displayed in Fig 18. The actual data is plotted alongside predicted values using DTR, RFR, GBR, XGBR, and BR models. The results indicate that most of the models match the actual data closely, showing minimal variation, which confirms their reliability for generalization.
Additionally, to analyze performance, Table 6 provides a comparison of performance metrics such as R², MAE, and MSE for both training and test datasets. Where DTR has a high train R² of 0.999444, its lower test R² of 0.927159 suggests reduced accuracy when handling new data. RFR and BR exhibit strong predictive capabilities, with test R² values of 0.96148 and 0.961493, respectively, along with lower error rates. XGBR also performs well, achieving a test R² of 0.941124 and a test MSE of 0.000935. KNN and GBR show slightly lower test R² values (0.909516 and 0.912935) and higher MAE, indicating relatively lower accuracy compared to ensemble models. For CL prediction, DTR is the fastest, with a training time of 0.021 seconds and a test time of 0.0003 seconds, but it has lower test accuracy. RFR and BR achieve the highest test R² but require longer training times (0.627 and 0.655 seconds). XGBR provides a strong balance, with a high test R², a low test MSE, and moderate training time (0.261 seconds). KNN and GBR have the lowest test R² and higher errors, making them less suitable. Among all, RFR and BR demonstrate the most reliable CL predictions with minimal error.
Like Neff analysis, we also used SHAP to explore the impact of different input parameters on CL. SHAP values were computed using the RFR model that is one of the most effective models in this study. The summary plot in Fig 19 presents the distribution of SHAP values for various features for CL prediction. Each point represents an individual prediction instance, with the y-axis displaying the features and the x-axis showing their corresponding SHAP values. The color gradient from blue to red reflects the feature values, where blue denotes lower values and red represents higher ones. Among all parameters, wl emerges as the most influential, showing both high and low values leading to significant variations in the model’s output. The na and tg also play a crucial role, generally increasing CL with higher values. Other parameters, such as p, d1, and the large air hole d2, have a smaller but still noticeable effect. The variations in SHAP values suggest complex feature interactions, which are essential for refining the model’s interpretability. A SHAP waterfall plot in Fig 20 shows the change from the baseline E[f(X)] =47.157 to the final prediction f(x)= 77.28. This shows how these features have an effect. The na parameter makes the most substantial contribution, increasing CL by 45.61283 units. In contrast, wl reduces the prediction by −35.02253 units, while tg contributes an additional 21.55977 units. Similarly, d2 leads to a decrease of 2.51656 units, whereas p has a minimal positive and d2 negative impact. These changes demonstrate how different input variables influence CL, with wavelength standing out as the dominant factor.
3.2.2 Amplitude sensitivity (SA).
In Fig 21, actual and predicted SA values are compared, where actual values are shown in purple and predicted values are marked in orange. The results indicate that the model has excellent predictions, but some deviations appear, particularly at lower sensitivity values. Fig 22 presents a detailed evaluation to predict SA using ML models. The black line represents the actual data, while various colors display the predictions from DTR, RFR, XGBR, GBR, and BR. Most models follow the expected trend, but RFR and BR exhibit the closest match to actual values, indicating their strong predictive accuracy.
Again, Table 7 presents key performance metrics such as R², MAE, and MSE for both training and test datasets for predicting SA. Where, DTR shows an R² of 1.0 in training but drops to 0.788216 in testing, indicating overfitting. Its test MAE (0.010117) and MSE (0.001413) are relatively high, suggesting weaker generalization. DTR is the fastest, with a training time of 0.018 seconds and a test time of 0.0005 seconds, but has a lower test R² (0.788216). RFR and BR achieve the highest test R² (0.868116 and 0.867602) with a test MAE around 0.00924 but require longer training times (0.474 and 0.470 seconds). XGBR provides a strong balance, with a test R² of 0.813183, low test MSE (0.001356), and moderate training time (0.218 seconds). KNN and GBR perform weaker, with KNN showing the lowest test R² (0.50024) and highest test MAE (0.023273). Overall, RFR and BR offer the best accuracy, their balance of high accuracy and low error makes them well-suited for SA prediction.
The SHAP summary plot in Fig 23 makes it very clear that the feature wl has the biggest effect on SA. This highlights how important it is for optimal sensor model performance. Additionally, the feature also demonstrates a substantial impact, underscoring its importance in predicting SA. The SHAP summary plot also depicts that tg has a moderate effect, indicating its notable impact on predictions. In contrast, d1 and d2 show minimal impacts, suggesting that these parameters have less influence on SA compared to wl, na, and tg. Again, Fig 24 illustrates a SHAP waterfall model with a specific sample. It shows how various features contribute to the model’s final prediction, starting with a baseline value of E [f(X)] = −32.067 and reaching an output of f(x) = −36.866. Here, the feature wl has the most significant negative impact, decreases the prediction by −9.11925 units. The na feature also adds a substantial 2.01146 units to the prediction. In contrast, the feature tg increases the prediction by 1.09693 units. The d1 and d2 features contribute small negative adjustments. This demonstrates the sensitivity of the model’s output to changes in each feature, with wl and na being the most influential in driving the prediction upward.
3.3 Comparison with previous works
Table 8 compares the performance of our proposed PCF-SPR biosensor with recent works, highlighting significant improvements in optical properties. The proposed design outperforms previous models in terms of CL, SA, Sλ, resolution, and FOM, demonstrating superior sensing capabilities. In terms of Sλ, the proposed biosensor achieves 125,000nm/RIU, which is higher than all the works. The SA of −1422.34 RIU ⁻ ¹ remains competitive, close to 7220 RIU ⁻ ¹ [46] and −1971.30 RIU ⁻ ¹ [47], while excelling in other performance areas. Additionally, the proposed biosensor achieves an exceptionally low resolution of 8 × 10 ⁻ ⁷ RIU, which is superior to previous models [20,21,47–52]. Among all the properties, the FOM of 2112.15 RIU ⁻ ¹ is significantly higher than those reported in other studies [17,22,49,50,52] indicating a better balance between sensitivity and resolution. In our study, we employed six ML models (DTR, RFR, KNN, GBR, XGBR, BR), along with XAI techniques, specifically SHAP, to gain insights into the model’s decision-making process. The XGBR model demonstrated excellent performance with an R² value of 0.9976 for the prediction of Neff, outperforming other models in the literature. The use of XAI methods like SHAP made the results more interpretable, providing valuable information about how different design parameters impact the sensor’s performance. This transparency not only enhanced our understanding of the system but also allowed for more informed decisions during the optimization process. The ML models showed lower error rates and higher accuracy compared to previous works, achieving an MAE of 0.00221 and an MSE of 0.00059, which are significantly lower than most of the other studies. This demonstrates the robustness of the ML models in predicting sensor performance. Additionally, integrating XAI with ML optimization significantly reduced computational time and cost, making it more efficient than conventional methods for exploring optimal design combinations. Overall, the proposed PCF-SPR biosensor, with its combination of ML and XAI techniques, shows substantial improvements in SA, Sλ, resolution, and FOM compared to previous designs. This makes it a promising candidate for high-precision applications in various sensing domains, while the inclusion of XAI offers valuable insights into the underlying sensor behavior.
Furthermore, compared to traditional PCF-SPR sensor optimization approaches that rely solely on parametric sweeps using FEM, our hybrid methodology incorporating ML (e.g., RFR, XGB) and SHAP-based XAI significantly enhances computational efficiency and interpretability. FEM alone often demands substantial time and computing power for iterative tuning of design parameters. In contrast, our work reduces the time for predicting key optical parameters such as Neff, CL, and SA from minutes to milliseconds, enabling rapid exploration of a broader design space. Recent sensor architectures have demonstrated high performance using complex geometries. Such as IMD-EMD merged PCF [53] and quasi D-shaped waveguides with external metal deposition [54], offering high sensitivities for detecting heavy metals, oils [55], and cancer biomarkers [56]. However, these structures typically require higher fabrication and simulation costs. Our proposed sensor, in comparison, achieves high performance metrics (Sλ = 125,000 nm/RIU and FOM = 2112.15) using a simpler geometry with the help of an intelligent data-driven approach. By combining ML and XAI with efficient sensor design, this framework supports rapid development of adaptive, intelligent biosensing platforms for diverse real-world applications.
4. Discussion
Moreover, from our results and analysis, it confirms that ML models can accurately predict various optical properties. By providing rapid and precise predictions, ML lowers computational costs and time and accelerates the optimization process for high-performance PCF-SPR biosensor design. This approach enables efficient exploration of the best-performing configurations by evaluating numerous design variations without additional simulations. Furthermore, the comparison between COMSOL simulations and ML models highlights the significant advantage of ML in terms of computational efficiency. While COMSOL requires approximately 2 minutes for each single-mode calculation, ML models achieve similar predictions in only milliseconds. Among the tested RFR and XGBoost, RFR provides the best balance between accuracy and execution time. The drastic reduction in computation time makes ML-based approaches highly efficient for rapid mode prediction, offering a promising alternative for scenarios requiring multiple evaluations with minimal processing overhead.
Additionally, SHAP analysis provides interpretability and a clear understanding of each input feature’s influence on the sensor’s optical properties. This work effectively enhanced the sensor design by using COMSOL simulations to create data, ML for rapid optimization, and SHAP for better understanding. The SHAP analysis reveals that Au thickness (tg) and pitch (p) play notable roles in sensor performance. For Neff, p has a moderate negative effect, indicating that increasing pitch slightly lowers the effective index due to reduced core confinement. In contrast, tg shows minimal influence on Neff. For CL, tg significantly increases loss, aligning with its known effect of enhancing plasmonic interaction but introducing absorption. Pitch has a minor positive effect on CL, suggesting a marginal loss increase with wider spacing. In SA prediction, tg moderately boosts sensitivity, confirming its importance in optimizing SPR strength. However, p has minimal effect on SA. Overall, tg is more critical for optimizing SA and CL, while pitch subtly influences mode confinement.
The performance of the proposed PCF-SPR biosensor is evaluated using two critical metrics, Sλ and FOM, which together determine the sensor’s effectiveness in high-precision detection tasks. The sensor achieves exceptional values, with a maximum Sλ of 125,000 nm/RIU and FOM of 2112.15, indicating its strong capability to detect change of na. High Sλ ensures that even minimal variations in the na cause significant shifts in the resonance wavelength, making the sensor highly effective for detecting biochemical interactions. The FOM, which combines sensitivity with spectral resolution, reflects the sharpness of the resonance peak, an essential factor for achieving accurate and low-error detection results.
Such sensor performance is particularly advantageous in medical diagnostics, especially for detecting cancer biomarkers [33,56], where early-stage detection requires identifying minute biomolecular changes in samples like blood or serum. The integration of ML and XAI into the design process enables accurate prediction of optical responses and efficient parameter optimization. This not only reduces reliance on computationally intensive simulations but also enhances the sensor’s adaptability in real-time, making it well-suited for dynamic and complex biological systems. Our proposed design, covering a wide na detection range of 1.31–1.42, allows for effective operation across diverse diagnostic media. Beyond medical diagnostics, the biosensor’s high sensitivity, low CL, and wide operational range make it equally applicable to chemical and environmental sensing tasks, such as the detection of organic solvents, contaminants, and pharmaceutical compounds.
While ML models are highly effective at predicting key optical properties such as Neff, CL, and sensitivity, certain non-quantifiable or dynamic sensing parameters remain challenging to predict. For instance, parameters influenced by fabrication tolerances, material degradation, surface roughness, and temperature-dependent shifts are often difficult to capture accurately using ML unless real experimental data are integrated into the training process. Similarly, nonlinear environmental effects, such as biofouling or long-term drift, typically require real-time adaptive models or physical testing for accurate assessment. Despite these limitations, the ML-based predictions offer significant benefits for the overall sensor design process. They drastically reduce computational load, enable rapid evaluation of large design spaces, and help in identifying optimal configurations without exhaustive simulation runs. More importantly, explainable ML techniques such as SHAP add interpretability, allowing designers to understand which parameters most strongly influence sensor behavior.
5. Conclusion
This study demonstrates the significant enhancement of optical properties in PCF-SPR biosensors by integrating ML with simulation-based design. The proposed biosensor features a simple design with low CL, high SA, Sλ, and a high FOM. Operating over na range from 1.31 to 1.42, with gold employed as the plasmonic material. The biosensor achieves exceptional performance metrics, including a maximum Sλ of 125,000 nm/RIU, an SA of −1422.34 RIU ⁻ ¹, a resolution of 8 × 10 ⁻ ⁷ RIU, and a FOM of 2112.15. The integration of various ML models, including RFR, DTR, GBR, XGBR, KNN, and BR, accelerated the optimization process, significantly reducing computational costs and time compared to conventional methods. The XGBR model demonstrated excellent predictive accuracy (R² = 0.9976, MAE = 0.00221, MSE = 0.00059) for Neff predictions. Specially, the use of XAI techniques, particularly SHAP, provided valuable insights into how design parameters influence sensor performance, enabling efficient exploration of optimal parameter combinations. Due to its high sensitivity and low CL, the proposed biosensor is well-suited for detecting small na variations, making it ideal for medical diagnostics, disease detection, environmental monitoring, biochemical sensing, and industrial applications. Future work can focus on exploring alternative plasmonic materials, enhancing the generalization of ML models, and conducting experimental validations to further improve the sensor’s reliability and real-world applicability.
References
- 1. Knight JC, Birks TA, Russell PS, Atkin DM. All-silica single-mode optical fiber with photonic crystal cladding. Opt Lett. 1996;21(19):1547–9. pmid:19881720
- 2. Khatun MR, Islam MS. Propagation properties and stress sensitivity of S-PCF, H-PCF and O-PCF. J Commun. 2012;7(11):832–9.
- 3. Huq Arif MdF, Hossain MM, Islam N, Khaled SM. A nonlinear photonic crystal fiber for liquid sensing application with high birefringence and low confinement loss. Sens Bio-sens Res. 2019;22:100252.
- 4. Islam MR, et al. Design and analysis of birefringent SPR based PCF biosensor with ultra-high sensitivity and low loss. Optik. 2020;221:165311.
- 5.
Khatun MR, Mim MA. Analysis of highly sensitive simple designed PCF-based SPR biosensor. In: 2024 6th International Conference on Electrical Engineering and Information & Communication Technology (ICEEICT); 2024. p. 79–83. doi: https://doi.org/10.1109/iceeict62016.2024.10534529
- 6.
Roni TA, Hassan R, Faisal M. Dual-side polished SPR biosensor with wide sensing range. In: 2020 11th International Conference on Electrical and Computer Engineering (ICECE); 2020. p. 487–90. doi: https://doi.org/10.1109/icece51571.2020.9393102
- 7. Huraiya MA, Ramaraj SG, Shahadat Hossain SM, Chakrabarti K, Tabata H, Razzak SMA. A highly optimized and sensitive bowtie shape-based SPR biosensor for different analyte detection. Nanoscale Adv. 2024;7(3):899–908. pmid:39720126
- 8. Jing J, Liu K, Jiang J, Xu T, Wang S, Ma J, et al. Performance improvement approaches for optical fiber SPR sensors and their sensing applications. Photon Res. 2021;10(1):126.
- 9. Islam MR, et al. Surface plasmon resonance based highly sensitive gold coated PCF biosensor. Appl Phys A. 2021;127:1–12.
- 10. Manickam P, Senthil R. Numerical demonstration of photonic quasi-crystal fiber–surface plasmonic resonance urinary methanol sensor. Plasmonics. 2023;18(2):511–9.
- 11. Zhang Q, Li W, Ren Q, Zheng J, Xie Q, Wang X. A D-type dual side-polished, highly sensitive, plasma refractive index sensor based on photonic crystal fiber. Front Phys. 2022;10:1008784.
- 12. Chaudhary VS, Kumar D, Kumar S. Gold-immobilized photonic crystal fiber-based SPR biosensor for detection of malaria disease in human body. IEEE Sensors J. 2021;21(16):17800–7.
- 13. Rajeswari D, Revathi AA. Highly sensitive SPR-based PCF bio sensor for plasma cell detection in human blood for the detection of early stage cancer. Optik. 2022;258:168897.
- 14. Saha C, Haque F, Islam N, Hossain MM, Easin Arafat M, Yousuf MA, et al. Dual-core silver-coated plasmonic sensor modeling with machine learning. Heliyon. 2024;10(19):e38175. pmid:39386780
- 15. Kumar A, Verma P, Jindal P. Surface plasmon resonance sensor based on MXene coated PCF for detecting the cancer cells with machine learning approach. Microelectron Eng. 2023;267–268:111897.
- 16. Abe R, Takeda T, et al. Optimization of an H0 photonic crystal nanocavity using machine learning. Opt Lett. 2020;45:319–22.
- 17. Al Mahfuz M, Afroj S, Rahman A, Azad Hossain Md, Anwar Hossain Md, Habib MS. Ultra-sensitive visible-IR range fiber based plasmonic sensor: a finite-element analysis and deep learning approach for RI prediction. IEEE Access. 2024;12:64727–35.
- 18. Khatun MR, Hossain MM. Efficient prediction of optical properties in hexagonal PCF using machine learning models. Optik. 2024;312:171929.
- 19. Chowdhury S, et al. A highly sensitive multi-channel SPR-PCF based biosensor with deep learning prediction approach. Alex Eng J. 2023;77:189–203.
- 20. Goswami M, Khare P, Shakya S. AI algorithm for mode classification of PCF-SPR sensor design. Plasmonics. 2024;19(1):363–77.
- 21. Ehyaee A, Rahmati A, Bosaghzadeh A, Olyaee S. Machine learning-enhanced surface plasmon resonance based photonic crystal fiber sensor. Opt Express. 2024;32(8):13369–83. pmid:38859309
- 22. Akter S, Abdullah H. Design and investigation of high-sensitivity PCF SPR biosensor for various cancer cells detection using a gold-coated circular-shaped structure. Plasmonics. 2024:1–11.
- 23. Islam N, Faizul Huq Arif Md, Abu Yousuf M, Asaduzzaman S. Highly sensitive open channel based PCF-SPR sensor for analyte refractive index sensing. Results Phys. 2023;46:106266.
- 24. Ahmed K, Bui FM, Wu F-X. PreOBP_ML: machine learning algorithms for prediction of optical biosensor parameters. Micromachines (Basel). 2023;14(6):1174. pmid:37374757
- 25. Chaity AC. Highly sensitive photonic crystal fiber biosensor based on surface plasmon resonance for six distinct types of cancer detection. Plasmonics. 2023;19(4):1891–902.
- 26. Karabacak M, Margetis K. Interpretable machine learning models to predict short-term postoperative outcomes following posterior cervical fusion. PLoS One. 2023;18(7):e0288939. pmid:37478157
- 27. Bréchet F, Marcou J, et al. Complete analysis of the characteristics of propagation into photonic crystal fibers, by the finite element method. Opt Fiber Technol. 2000;6:181–91.
- 28. Haider F, Aoni RA, Ahmed R, Chew WJ, Mahdiraji GA. Alphabetic-core assisted microstructure fiber based plasmonic biosensor. Plasmonics. 2020;15(6):1949–58.
- 29. Haque E, Mahmuda S, Hossain MdA, Hai NH, Namihira Y, Ahmed F. Highly sensitive dual-core PCF based plasmonic refractive index sensor for low refractive index detection. IEEE Photonics J. 2019;11(5):1–9.
- 30. Sakib MdN, Hossain MbB, Al-tabatabaie KF, Mehedi IM, Hasan MdT, Hossain MdA, et al. High performance dual core D-shape PCF-SPR sensor modeling employing gold coat. Results Phys. 2019;15:102788.
- 31.
Hameed MFO, Obayya S. Computational photonic sensors. Springer International Publishing; 2019. doi: https://doi.org/10.1007/978-3-319-76556-3
- 32.
Pepper DW, Heinrich JC. The finite element method: basic concepts and applications with MATLAB, MAPLE, and COMSOL. CRC Press; 2017.
- 33. Ramola A, Shakya AK, Bergman A. Comprehensive analysis of advancement in optical biosensing techniques for early detection of cancerous cells. Biosensors (Basel). 2025;15(5):292. pmid:40422031
- 34. Ramola A, Shakya AK, Bergman A. Finite element method-based modeling of a novel square photonic crystal fiber surface plasmon resonance sensor with a Au–TiO2 interface and the relevance of artificial intelligence techniques in sensor optimization. Photonics. 2025;12(6):565.
- 35. Gordon AD, Breiman L, Friedman JH, Olshen RA, Stone CJ. Classification and regression trees. Biometrics. 1984;40(3):874.
- 36. Liaw A, Wiener M. Classification and regression by RandomForest. R News. 2002;2:18–22.
- 37. Breiman L. Random forests. Mach Learn. 2001;45(1):5–32.
- 38.
Aziz N, Akhir EAP, Aziz IA, Jaafar J, Hasan MH, Abas ANC. A study on gradient boosting algorithms for development of AI monitoring and prediction systems. In: 2020 International Conference on Computational Intelligence (ICCI); 2020. p. 11–6. doi: https://doi.org/10.1109/icci51257.2020.9247843
- 39.
Chen T, Guestrin C. XGBoost: a scalable tree boosting system. Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining; 2016. p. 785–94.
- 40.
Sutton CD. Classification and regression trees, bagging, and boosting. In: Handbook of statistics. Elsevier; 2005. p. 303–29. doi: https://doi.org/10.1016/s0169-7161(04)24011-1
- 41. Chicco D, Warrens MJ, Jurman G. The coefficient of determination R-squared is more informative than SMAPE, MAE, MAPE, MSE and RMSE in regression analysis evaluation. PeerJ Comput Sci. 2021;7:e623. pmid:34307865
- 42.
Schoenborn JM, Althoff K-D. Recent trends in XAI: a broad overview on current approaches, methodologies and interactions ICCBR workshops; 2019.
- 43. Deshpande NM, et al. Explainable artificial intelligence – a new step towards the trust in medical diagnosis with AI frameworks: a review. CMES - Comp Model Eng Sci. 2022.
- 44. Mim MA, Khatun MR, Hossain MM, Rahman W, Munir A. Exploring early learning challenges in children utilizing statistical and explainable machine learning. Algorithms. 2025;18(1):20.
- 45. Salih AM, et al. A perspective on explainable artificial intelligence methods: SHAP and LIME. Adv Intell Syst. 2024;7(1):2400304.
- 46. Chowdhury S, Abdulrazak LF, et al. A highly sensitive multi-channel SPR-PCF based biosensor with deep learning prediction approach. Alex Eng J. 2023;77:189–203.
- 47. Chowdhury AT, Alam A, et al. Gold nanowire-infused square-clad SPR-PCF biosensor for the detection of various cancer cells. Sens Bio-sens Res. 2024;45:100670.
- 48. Sardar MdR, Faisal M. Dual-core dual-polished PCF-SPR sensor for cancer cell detection. IEEE Sensors J. 2024;24(7):9843–54.
- 49. Oudenani A, Sonne A. A D-shaped SPR-based PCF bio-sensor with a high sensitivity for wide refractive index detection. Plasmonics. 2024;20(7):5245–53.
- 50. Ding X, Lin Q, Wang M, Liu S, Zhang W, Chen N, et al. Design and simulation of high-performance D-type dual-mode PCF-SPR refractive index sensor coated with Au-TiO2 layer. Sensors (Basel). 2024;24(18):6118. pmid:39338861
- 51. Guedri-Knani L, Kaziz S, Dridi C. Optimizing and predicting performance of dual-side polished SPR photonic crystal fiber using MLR and ANN models. Plasmonics. 2024;20(6):3135–46.
- 52. Lu X, Yu X, Zhou J, Chang M, Lu D. An ultra-wide range D-shaped fiber SPR sensor with a nanostructure of gold-MoS2 and sodium for the simultaneous measurement of refractive index and temperature. Sensors (Basel). 2025;25(2):377. pmid:39860747
- 53. Kumar Shakya A, Singh S. Design of novel Penta core PCF SPR RI sensor based on fusion of IMD and EMD techniques for analysis of water and transformer oil. Measurement. 2022;188:110513.
- 54. Shakya AK, Singh S. Design of a novel refractive index BIOSENSOR for heavy metal detection from water samples based on fusion of spectroscopy and refractive index sensing. Optik. 2022;270:169892.
- 55. Shakya AK, Singh S. Novel Merger of spectroscopy and refractive index sensing for modelling hyper sensitive hexa-slotted plasmonic sensor for transformer oil monitoring in near-infrared region. Opt Quant Electron. 2023;55(9):764.
- 56. Shakya AK, Ramola A, Singh S, Vidyarthi A. Optimized design of plasmonic biosensor for cancer detection: core configuration and nobel material coating innovation. Plasmonics. 2024.