본문 펼치기
## OPEN
# Machine learning method for predicting line-shapes of Fano resonances induced by bound states in the continuum
V. S. Gerasimov <sup>1,2</sup> , A. S. Kostyukov <sup>1</sup> , A. E. Ershov <sup>1,2</sup> , D. N. Maksimov <sup>1,3</sup> , V. Kimberg <sup>4</sup> <sup></sup> ,
M. S. Molokeev <sup>3,5</sup> & S. P. Polyutov <sup>1,6</sup>
We consider resonances induced by symmetry protected bound states in the continuum in dielectric
gratings with in-plane mirror symmetry. It is shown that the shape of the resonance in transmittance
is controlled by two parameters in a generic formula which can be derived in the framework of the
coupled mode theory. It is numerically demonstrated that the formula encompasses various lineshapes including asymmetric Fano, Lorentzian, and anti-Lorentzian resonances. It is confirmed that
the transmittance zeros are always present even in the absence up-down symmetry. At the same time
reflectance zeros are not generally present in the single mode approximation. It is found that the lineshapes of Fano resonances can be predicted to a good accuracy by the random forest machine learning
method which outperforms the standard least square methods approximation in error by an order of
magnitude in error with the training dataset size _N_ _≈_ 10 <sup>4</sup> .
Optical bound states in the continuum (BICs) are source-free localized solutions of Maxwell’s equations which
are spectrally embedded into the continuum of scattering states <sup>1–5</sup> . The optical BICs in dielectric metasurfaces
have recently become an important instrument for resonant enhancement of light-matter interaction to be
employed for resonant light absorption <sup>6–10</sup>, sensing <sup>11,12</sup>, harmonic generation <sup>13–16</sup>, and lasing <sup>17–20</sup> . Although
BICs are not coupled to the incident light, breaking the system’s symmetry under variation of some control
parameter <sup>21,22</sup> results in the so-called quasi-BICs, i.e. long-lived resonant modes with the quality factor diverging
to infinity on approach to the BIC in parametric space. This divergence is visible in the transmittance spectrum
as a collapsing Fano resonance <sup>23–28</sup> and simultaneously leads to electromagnetic field enhancement in the host
metasurface <sup>29,30</sup> . This picture is generic in nanophotonics since high-quality resonant modes of any kind reveal
themselves as sharp Fano resonances in the transmittance spectrum <sup>31–34</sup> . As shown in <sup>35</sup> in the single resonant
coupled mode approximation the Fano resonances can be described as a product of interference between two
optical pathways, namely the resonant pathway due to the excitation of the resonant mode, and the direct or
non-resonant pathway due to frequency independent background.
In this work we investigate the line shape of Fano resonances induced by symmetry protected optical BICs
in dielectric gratings. The symmetry breaking leading to transformation of BICs to quasi-BICs is controlled
by small deviation of the angle of incidence from the normal. Our goal is to analyse possible resonant lineshapes and find out weather the line-shapes can be predicted by machine learning methods using the geometric
and optical properties as the input parameters. Our tool for describing the Fano resonance line-shape is the
temporal coupled mode theory (TCMT) <sup>35</sup> . Nowadays, the TCMT is recognized as an efficient tool for describing
the spectra of various phonic devices <sup>36–43</sup> due to both universality and the clear physical picture it provides.
It is worth mentioning that we are going to consider optical systems without up-down symmetry which can
affect the line-shape of Fano resonances <sup>38,44–48</sup> . Optical and geometric parameters that give rise to BICs and
quasi-BICs on metasurfaces are typically determined by numerically solving Maxwell’s equations. However, it is
highly desirable to predict optical properties avoiding computationally expensive partial differential equations
1International Research Center of Spectroscopy and Quantum Chemistry, Siberian Federal University, Krasnoyarsk,
Russia660041. <sup>2</sup> Institute of Computational Modelling SB RAS, Krasnoyarsk, Russia660036. <sup>3</sup> Kirensky Institute of
Physics, Federal Research Center KSC SB RAS, Krasnoyarsk, Russia660036. <sup>4</sup> Theoretical Chemistry and Biology,
KTH Royal Institute of Technology, 106 91 Stockholm, Sweden. <sup>5</sup> Laboratory of Theory and Optimization of
Chemical and Technological Processes, University of Tyumen, Tyumen, Russia625003. <sup>6</sup> Federal Siberian Research
Clinical Centre under the Federal Medical Biological Agency, Krasnoyarsk, Russia660037. <sup></sup> email: kimberg@kth.se
solutions for every possible parameter set. Instead, interpolation techniques based on existing data can offer a
more efficient alternative. Nowadays, machine learning techniques have already been applied to various problems
of nanophotonics <sup>49–55</sup> including problems related to optical BICs <sup>56–59</sup> . Recently, the TCMT approach has been
hybridized with neural networks <sup>41,60,61</sup> for resonant response synthesis in photonic devices. Here we follow our
previous work <sup>62</sup> where we showed that the random forest machine learning method is capable of predicting the
frequency of optical BICs in symmetric dielectric metasurfaces. We focus on BICs on metasurfaces structured
as dielectric gratings <sup>63,64</sup>, which have recently drawn significant attention due to their applications in strong
coupling <sup>65</sup>, sensors <sup>66–69</sup>, refractometry <sup>70</sup>, and absorption enhancement <sup>71</sup> . In what follows we revisit the TCMT
in application to Fano resonances induced by symmetry protected BICs and apply the random forest method in
combination with the TCMT to adress the line-shape prediction problem.
TCMT equations
As one can see in Fig. 1a the system under scrutiny is a ruled grating made of dielectric bars with refractive index
_nb_ . The grating is placed on top of a dielectric substrate with refractive index _ns_ . The supestrate of the system is
air with _n_ 0 = 1. All geometric parameters, including the period _p_, the width _w_, and the height _h_ are specified in
Fig. 1a. In what follows we take _p_ = 0 _._ 697 µm. In the system under consideration, the wavelength, linewidth,
and all geometric parameters scale proportionally with the period _p_ . As a result, the findings remain applicable
to lattices with different periods. In this work we only consider TM-waves which propagate along the _x_ -axis but
not along the bars, so the scattering problem can be solved in the framework of 2D electrodynamics. The mode
profile of a symmetry protected BIC is shown in the Fig. 1a in the form of the _z_ -component of the electric field.
the vectors of incident and outgoing amplitudes as follows
One can see in Fig. 1b that the scattering problem is described by a 4 _×_ 4 scattering matrix _S_ <sup>�</sup> 4, which links
(1)
(1)
vectors are given by
s ( _−_ ) = _S_ <sup>�</sup> 4 s (+) _,_
where the outgoing s <sup>(</sup> <sup>_−_</sup> <sup>)</sup> and incident s <sup>(+)</sup> vectors are given by
(2)
<sup>_._</sup>
_s_ <sup>(</sup> 1 <sup>_±_</sup> <sup>)</sup>
_s_ <sup>(</sup> 2 <sup>_±_</sup> <sup>)</sup>
_s_ <sup>(</sup> 3 <sup>_±_</sup> <sup>)</sup>
_s_ <sup>(</sup> 4 <sup>_±_</sup> <sup>)</sup>
s ( _±_ ) =
We assume that all dielectrics are lossless so the block form _S_ -matrix is unitary _S_ <sup>�</sup> <sup>_†_</sup>
4 <sup>_S_</sup> <sup>�4</sup> <sup>= �I. The system also possesses time-</sup>
reversal symmetry therefore the _S_ -matrix is symmetric _S_ <sup>�</sup> 4 <sup>⊺</sup> <sup>=</sup> <sup>_S_</sup> <sup>�4. Importantly the matrix</sup> <sup>_S_</sup> <sup>�(4) must be of the</sup>
We assume that all dielectrics are lossless so the block form _S_ -matrix is unitary _S_ <sup>�</sup> <sup>_†_</sup>
4
reversal symmetry therefore the _S_ -matrix is symmetric _S_ <sup>�</sup> 4 <sup>⊺</sup> <sup>=</sup> <sup>_S_</sup> <sup>�4</sup>
block form
_S_ <sup>�</sup> 4 <sup>_†S_</sup> <sup>�4</sup> <sup>= �I. The system also possesses time-</sup>
4 <sup>⊺</sup> <sup>=</sup> <sup>_S_</sup> <sup>�4. Importantly the matrix</sup> <sup>_S_</sup> <sup>�(4) must be of the</sup>
0
2 0
_S_ �2
_S_ �4 =
_S_ - <sup>⊺</sup>
(3)
matrix as shown in Supplemental Document 1. Without a loss of generality we can focus on the left-going waves,
to ensure the momentum conservation in scattering from the metasurface <sup>38</sup>, where _S_ <sup>�</sup> 2 is a 2 _×_ 2 unitary matrix.
so that
Since the system has the _σv_ mirror symmetry the problem can be reduced to finding _S_ <sup>�</sup> 2 that is a symmetric
_s_ <sup>(</sup> 1 <sup>_−_</sup> <sup>)</sup>
_s_ <sup>(</sup> 2 <sup>_−_</sup> <sup>)</sup>
= _S_ <sup>�</sup> 2
_s_ <sup>(+)</sup> 3
_s_ <sup>(+)</sup> 4
1
_s_ <sup>(</sup> 2 <sup>_−_</sup> <sup>)</sup>
3
_s_ <sup>(+)</sup> 4
4
2
_._ (4)
Fig. 1 . Metasurface in the form of a dielectric grating on a dielectric substrate. ( a ) Schematic of the
metasurface with the electric field of the antisymmetric BIC mode. ( b ) Definition of the scattering channels.
According to <sup>35</sup> the TCMT equations describing single-mode scattering take the following form
_<u>da</u>_ <u>(</u> _<u>t</u>_ <u>)</u>
<u>(</u> _<u>t</u>_ <u>)</u>
_dt_ = _−_ ( _iω_ 0 + _γ_ ) _a_ ( _t_ ) + _κ_ <sup>⊺</sup> s <sup>(+)</sup> ( _t_ ) _,_
(5)
s <sup>(</sup> <sup>_−_</sup> <sup>)</sup> ( _t_ ) = _C_ <sup>�</sup> s <sup>(+)</sup> ( _t_ ) + _a_ ( _t_ ) d _,_
_κ_
decay rate, _a_ ( _t_ ) – the amplitude of the resonant eigenmode, _κ_ is the coupling vector and d is the decoupling
vector. In what follows we assume that the system is illuminated by a monochromatic wave of frequency _ω_,
where _C_ <sup>�</sup> is the matrix of direct (non-resonant) process, _ω_ 0 is the resonance center frequency, _γ_ is the radiation
so all time-dependent quantities in Eq. (5) oscillate in time with the harmonic factor _e_ <sup>_−iωt_</sup> . Importantly, the
parameters in the TCMT equations are not independent, but linked to each other due to constraints imposed
by energy conservation, Lorentz reciprocity and time reversal symmetry <sup>35,72</sup> . As we have already mentioned, the
energy conservation manifests itself in the unitarity of the S-matrix whereas the time-reversal symmetry forces
the S-matrix to be symmetric. In this situation the parameters of the TCMT equations are known to satisfy the
following three equations <sup>35</sup>
2 _γ_ = d <sup>_†_</sup> d _,_
_κ_ = d _,_
(6)
_C_ - d <sup>_∗_</sup> + d = 0 _._
In our case both energy conservation and time-reversal are present, however, care is needed in application
of the time reversal operation since it maps the left-going waves onto the right-going ones. In Supplemental
parameters as in Eq. (6).
Document 2 we show that the 2 _×_ 2 unitary and symmetry of _S_ <sup>�</sup> 2 lead to the same constraints for the coupling
is unitary and symmetric,
is unitary and symmetric,
Now we have to solve Eq. (6) for the decoupling vector. We set out from the most generic form of _C_ <sup>�</sup>, which
_ρe_ <sup>_−iη_</sup>
_ρe_ <sup>_−iη_</sup> _iτ_
_iτ_ _ρe_ <sup>_iη_</sup>
_C_ - = _e_ <sup>_iϕ_</sup>
_,_ _ρ_ =
<u>1</u> _−_ _τ_ <sup>2</sup> (7)
with _τ_ _∈_ [ _−_ 1 _,_ 1], where all parameters are real valued. The parameters _ρ_ and _τ_ in Eq. (7) are the absolute values
of the reflection and transmission amplitudes, respectively, while _ϕ, η_ _∈_ [0 _, π_ ] describe the phase of scattered
waves. The number of parameters in Eq. (7) can be reduced by redefining the incident channels via a unitary
transformation
(
_s_ <sup>(+)</sup> 1
_s_ <sup>(+)</sup> 2
)
_._ (8)
)
) (
_s_ ˜ <sup>(+)</sup> 1
_s_ ˜ <sup>(+)</sup> 2
=
(
_e_ <sup>_iϕ_</sup> <sup>1</sup> 0
0 _e_ <sup>_iϕ_</sup> <sup>2</sup>
To be consistent with the time-reversal symmetry the outgoing channels have to be transformed as follows
(
_s_ <sup>(</sup> 1 <sup>_−_</sup> <sup>)</sup>
_s_ <sup>(</sup> 2 <sup>_−_</sup> <sup>)</sup>
)
_._ (9)
)
) (
_s_ ˜ <sup>(</sup> 1 <sup>_−_</sup> <sup>)</sup>
_s_ ˜ <sup>(</sup> 2 <sup>_−_</sup> <sup>)</sup>
=
(
_e_ <sup>_−iϕ_</sup> <sup>1</sup> 0
0 _e_ <sup>_−iϕ_</sup> <sup>2</sup>
Then, by using Eqs. (8) and (9) together with Eq. (7) one arrives at a single parameter family of unitary symmetric
matrices
_,_ _ρ_ =
<u>�</u>
<u>1</u> _−_ _τ_ <sup>2</sup> _,_ _τ_ _∈_ [ _−_ 1 _,_ 1] _,_ (10)
if one chooses
_iτ_
_iτ_ _ρ_
- _ρ_
_C_ - =
<sup>_<u>−</u>_</sup> <sup>_<u>ϕ</u>_</sup>
<u>2</u> _,_ _ϕ_ 2 = _−_ <sup>_<u>η</u>_</sup> <sup><u>+</u></sup> <u>2</u> <sup>_<u>ϕ</u>_</sup>
_ϕ_ 1 = <sup>_<u>η −</u>_</sup> <sup>_<u>ϕ</u>_</sup>
<u>2</u>
(11)
<u>2</u> <sup>_<u>ϕ</u>_</sup>
in Eq. (8). It can be easely checked that the above unitary transformation complies with Eq. (6). The unitary
transformation in Eq. (8) can be thought of as a shifting the reference plane between the scattering domain
and the outer space along the _y_ -axis. This is always possible in the far-field where the solution is exhaustively
described by the scattering channels. By using Eq. (10) in Eq. (6) one finds a single-parametric family of solutions
for d as follows
~~√~~
_τ_ sin _α −_ _i_ (1 + _ρ_ ) cos _α_
( _τ_ cos _α −_ _i_ (1 + _ρ_ ) sin _α_
d =
_<u>γ</u>_
<u>(1 +</u> _ρ_ <u>)</u>
(12)
)
_,_
_α ∈_ [ _−π/_ 2 _, π/_ 2] _,_
_τ_ sin _α −_ _i_ (1 + _ρ_ ) cos _α_
The derivation details are presented in Supplemental Document 3.
After using _κ_ = d in Eq. (S10) one finds the final solution for the _S_ -matrix
<u>dd</u> <sup>⊺</sup>
_S_ <u>�</u> = _C_ <u>� +</u> _i_ <u>(</u> _ω_ 0 _−_ _ω_
_i_ <u>(</u> _ω_ 0 _−_ _ω_ <u>) +</u> _γ_ <sup>_._</sup> (13)
The transmission coefficient independent of the direction of incidence is written as
_T_ = <sup><u>[</u></sup> <sup>_<u>τ</u>_</sup> <sup><u>(</u></sup> <sup>_<u>ω</u>_</sup> <sup><u>0</u></sup> <sup>_<u>−</u>_</sup> <sup>_<u>ω</u>_</sup> <sup><u>) +</u></sup> <sup>_<u>ργ</u>_</sup> <sup><u>sin(2</u></sup> <sup>_<u>α</u>_</sup> <sup><u>)]2</u></sup> _._ (14)
<u>(</u> _ω_ 0 _−_ _ω_ <u>)</u> <sup><u>2</u></sup> <u>+</u> _γ_ <sup><u>2</u></sup>
If _α_ = _±π/_ 4 Eq. (14) limits to the well-known solution presented in <sup>35</sup> for system with up-down symmetry. The
transmettance spectrum Eq. (14) complies with the earlier result from <sup>46</sup> on the fundamental bounds on decay
rates in asymmetric single-mode optical resonators, where it was shown that the transmittance is bound to
peak to unity only in symmetric resonators. Equation (14) can be applied not only for TM-modes on dielectric
metasurfaces. It remains valid for any optical material given that there is an isolated resonance coupled to two
scattering channels.
The system supports a symmetry protected BIC in the Γ-point. With variation of the angle of incidence _θ_ in
the vicinity of the Γ-point the BIC is transformed to a high- _Q_ resonant mode with the resonant frequency _ω_ 0
and the decay rate _γ_ given by the following Taylor expansion
_ω_ 0 = _ω_ BIC + _κωθ_ <sup>2</sup> + _O_ ( _θ_ <sup>4</sup> ) _,_
_γ_ = _κγθ_ <sup>2</sup> + _O_ ( _θ_ <sup>4</sup> ) _._
(15)
Upon using the Taylor expansion Eq. (15) in Eq. (14) one arrives at
<u>0</u> <sup>(2)</sup> <sup>_<u>θ</u>_</sup> <sup>2</sup> <sup>_<u>−</u>_</sup> <sup>_<u>ω</u>_</sup> <sup><u>) +</u></sup> <sup>_<u>ργ</u>_</sup> <sup>(2) sin(2</sup> <sup>_<u>α</u>_</sup> <sup><u>)</u></sup> <sup>_<u>θ</u>_</sup> <sup>2]2</sup>
_T_ = <sup><u>[</u></sup> <sup>_<u>τ</u>_</sup> <sup><u>(</u></sup> <sup>_<u>ω</u>_</sup> <sup><u>BIC +</u></sup> <sup>_<u>ω</u>_</sup> <u>0</u> <sup>(2)</sup>
<sup>_<u>θ</u>_</sup> <sup>2</sup> <sup>_<u>−</u>_</sup> <sup>_<u>ω</u>_</sup> <sup><u>) +</u></sup> <sup>_<u>ργ</u>_</sup> <sup>(2) sin(2</sup> <sup>_<u>α</u>_</sup> <sup><u>)</u></sup> <sup>_<u>θ</u>_</sup> <sup>2]2</sup> + _O_ ( _θ_ <sup>6</sup> ) _,_ (16)
0 <sup><u>(2)</u></sup> <sup>_θ_</sup> <sup>2</sup> <sup>_−_</sup> <sup>_ω_</sup> <sup>)2</sup> <sup>+ (</sup> <sup>_γ_</sup> <sup>(2)</sup> <sup>_θ_</sup> <sup>2)2</sup>
( _ω_ BIC + _ω_ 0 <sup><u>(2)</u></sup>
which gives the line-shape of the Fano resonance induced by a symmetry protected BIC.
Dataset acquisition
Our goal is to predict the shapes of the BIC-induced Fano resonance in the system shown in Fig. 1. According
to Eq. (14), besides the resonance center-frequency _ω_ 0 and the radiation decay rate _γ_, which are specified by
dispersion of leaky band hosting the BIC, there are only two parameters characterizing the shape of the Fano
resonance, namely _α_ and _τ_ . Both parameters can be found by fitting the numerically computed transmittance
spectrum at the incidence angle slightly different from normal. In this work we take _θ_ = 2 deg. The radiation
decay rate and the center-frequency dictate the position and the width of the Fano resonance, correspondingly.
Therefore, for predicting the shape of the resonance we have to analyse how the four parameters _nb,_ _ns,_ _h_ and
_w_ affect the quantities of _α_ and _τ_ . Here we address this problem by applying machine learning algorithm to the
data set obtained by numerically solving Maxwell’s equation under variation of all four control parameters. The
ranges of parameters are specified below
_nb_ _∈_ [2 _,_ 5] _,_ _ns_ _∈_ [1 _._ 5 _,_ 4] _,_ _h ∈_ [0 _._ 2 _p,_ 0 _._ 8 _p_ ] _,_ _w_ _∈_ [0 _._ 2 _p,_ 0 _._ 8 _p_ ] _._ (17)
Note that the line-shape of the resonance is the same after a simultaneous change of the signs of both _α_ and _τ_ .
Following our previous work <sup>62</sup> we focus on the wavelengh range 1100–2000 nm. Thus, we specify the following
ranges for the property parameters
_τ_ _∈_ [ _−_ 1 _,_ 1] _,_ _g_ _∈_ [0 _,_ 1] _,_ 2000 nm _> λ >_ 1100 nm _,_ _γ_ _>_ 0 _,_ (18)
where _λ_ is the wavelength of the resonance _λ_ = 2 _πc/ω_ 0 and
_g_ =
√
<u>1</u> _−_ _τ_ <sup>2</sup> sin(2 _α_ ) _._ (19)
To produce the dataset (see in Ref. <sup>73</sup> ) we ran 100,000 numerical experiments of which 18,836 resulted in finding
a symmetry protected BIC in the frequency range of interest. The simulations were preformed with application
of the finite-element method (FEM) in COMSOL multiphysics package. The calculated values of the property
parameters were extracted by least square fitting of Eq. (14) to the numerical data. The numerical experiments
yielded values of four feature parameters ( _h_, _nb_, _w_, _ns_ ) and four property parameters ( _λ_, _g_, _τ_, _γ_ ). In Fig. 2a we
show the distribution of the feature parameters whereas the distribution of the property parameters is shown in
Fig. 2b. One can see in Fig. 2a,b that most of the feature parameters and the BIC wavelength (property) exhibited
almost uniform distributions. These uniform distributions suggest that the dataset encompasses representative
cases. Additionally, the correlation matrix shown in Fig. 2c demonstrates the absence of linear relationships
between the feature and property parameters, thereby justifying the application of machine learning methods.
Random Forest method
In order to improve the precision of predicting the property parameters ( _τ_, _g_, _λ_, _γ_ ), we extended the dataset of
feature parameters ( _h_, _nb_, _w_, _ns_ ) incorporating their multiplication products, so the extended feature dataset
also includes ( _h_ <sup>2</sup>, _h · nb_, _h · w_, _h · ns_, _n_ <sup>2</sup> _b_ <sup>,</sup> <sup>_nb_</sup> <sup>_· w_</sup> <sup>,</sup> <sup>_nb_</sup> <sup>_· ns_</sup> <sup>,</sup> <sup>_w_</sup> <sup>2,</sup> <sup>_w · ns_</sup> <sup>,</sup> <sup>_n_</sup> _s_ <sup>2). For the prediction task, we utilized</sup>
<sup>2</sup> _b_ <sup>,</sup> <sup>_nb_</sup> <sup>_· w_</sup> <sup>,</sup> <sup>_nb_</sup> <sup>_· ns_</sup> <sup>,</sup> <sup>_w_</sup> <sup>2,</sup> <sup>_w · ns_</sup> <sup>,</sup> <sup>_n_</sup> _s_ <sup>2</sup>
_s_ <sup>2). For the prediction task, we utilized</sup>
Fig. 2 . Distribution of ( a ) feature parameters and ( b ) calculated values of property parameters. ( c ) Correlation
matrix between the feature and the property parameters.
the random forest (RF) algorithm, a powerful ensemble method based on regression trees <sup>74,75</sup> . This approach
involved constructing multiple decision trees by recursively partitioning the multidimensional predictor space.
During the prediction phase, the RF model outputs the mode of the classes (for classification) or the mean average
prediction (for regression) derived from the individual trees <sup>76,77</sup> . For the implementation of the RF model, we
developed a Python script named RandomForest.py using the Python 3.6 programming language <sup>78</sup> . The script
utilises the standard libraries, including _numpy, pandas, sklearn, matplotlib,_ and _mpl_toolkits_ . To account for the
stochastic nature of the RF algorithm, we performed the 5-fold cross-validation test, aggregating the results to
obtain an averaged performance and calculate the mean average error (MAE). Each iteration involved randomly
splitting the data into two sets. One set comprising 70% of the total data was used for training the model. The
remaining 30% of the data was used for testing. As a result, we constructed four distinct RF models, one for each
property parameter ( _τ_, _g_, _λ_, _γ_ ).
Besides it predictive power, the RF algorithm can also quantify the importance of each feature parameter
after training. This can be achieved by permuting the values of a selected feature within the training data and
calculating the error on the perturbed dataset. The importance score for the feature is obtained by averaging
the difference in error before and after permutation across all trees and subsequent normalization by the
differences <sup>79,80</sup> . The features that yield higher values of this score are ranked as more important compared to
features with lower values.
Finally, in applying the RF method, it is found out that the algorithm fails to correctly predict the property
parameter _τ_ when its absolute value approaches unity. This is due to the structure of Eq. (14) in which the
numerator becomes independent of the sign of _τ_ when _ρ/τ_ _≪_ 1. To amend this difficulty we used (0,1) binary
representation of sign( _τ_ ) to be predicted using the classification RF method. The quantity _|τ_ _|_ was used as the
property parameter in application of the prediction RF instead of _τ_ . The results of application of the RF algorithm
are collected in Fig. 3. In in Fig. 3 we plot the RF predicted versus calculated values of the four continuous
property parameters ( _|τ_ _|_, _g_, _λ_, _γ_ ). The plots are supplemented by histograms of the importance score of four the
most important feature parameters, and by plots comparing the RF performance against the polynomial least
square method (LSM). In the case of the binary parameter the performance is qualified by the confusion matrix.
Results
We proceed to anylizing the data presented in Fig. 3. In the first row of Fig. 3 we plot the calculated versus the
RF predicted values of the four continuous properties from the test data set. The last plot in the first row is the
confusion matrix for sign( _τ_ ). The MAE and the coefficients of determination _R_ <sup>2</sup> for all continuous properties
are presented on the top of each plot. One can see that all properties are predicted to a good accuracy with
exception of _γ_ . This is due to the singular behaviour of the resonant linewidth in the spectral vicinity of a BIC.
Namely, since _γ_ can be vanishingly small its value can change by orders in magnitude under small variation of
angle _θ_ near normal incidence, see Eq. (15). In the second row of Fig. 3 we plot the importance score of the four
most important features from the extended data set in predicting all five property parameters. The data show
that with the exception of the wavelength, which is predominantly determined by the optical path across the
bar <sup>62</sup>, no other property is solely determined by a single parameter from the extended feature parameter set. The
reader is referred to Ref. <sup>62</sup> for a more detailed discussion on the prediction of _λ_ . In the third row of Fig. 3 we
compare the performance of RF against that of the polynomial LSM approximation in dependence on the size
of the training data set. One can see that for all properties except the resonant wavelength, the RF significantly
outperforms the LSM. Moreover, for the properties _|τ_ _|_ and _g_, which solely determine the resonant line-shape the
MAE of the RF is _≈_ one order of magnitude smaller that that of the LSM. Note that comparison against the least
square method is impossible for the binary property sign( _τ_ ), and therefor no LSM data are presented in the last
plot of the third row in Fig. 3.
The data collected allows one to draw some conclusion on the shapes of Fano resonance induced by symmetry
protected BIC. First of all the position of the resonance is dictated by wavelengh _λ_ corresponding to the resonant
frequency _ω_ 0. This quantity can be accurately predicted by both the RF method and the LSM due to the fact
Fig. 3 . RF predictions for the four continuous property parameters ( _λ, γ, |τ_ _|, g_ ), and binary parameter
sign( _τ_ ). The first row shows the calculated vs. predicted values of the property parameters. Note that for the
binary parameters sign( _τ_ ) the results are visualized in the form of the confusing matrix. The second row shows
the histogram plots of the four largest importance scores for the extended feature parameter set. The third row
compares the performance of the RF method against the LSM depending on the size of the training dataset _N_ .
that is is predominantly controlled by a single feature _w · nb_ . The width of the resonance, albeit it is better
predicted by the RF method than by the LSM, is the most difficult to predict due to the singular nature of the
BIC. This does not, however, impose a difficulty since in any prefabricated set-up the resonant width is easily
controlled by the angle of incidence. Finally, the line-shape of the resonance is controlled by _τ_ and _α_, both
being efficiently predicted by the RF method. It is worth mentioning that according to the data from Fig. 2 the
distribution of _τ_ has the following momenta _⟨|τ_ _|⟩_ = 0 _._ 791, and _⟨τ_ <sup>2</sup> _⟩_ = 0 _._ 653. It means that more often than
not the resonance is observed on the background with transmission dominating over reflection. The first two
momenta of the distribution of _α_ are as follows _⟨α⟩_ = 0 _._ 577, and _⟨α_ <sup>2</sup> _⟩_ = 0 _._ 376. Remarkably, on average _α_ is
close to _π/_ 4 = 0 _._ 785 which corresponds to metasurfaces with up-down mirror symmetry. As it has been already
mentioned the unit transmittance only occurs at _α_ = _π/_ 4. Thus, statistically the observed Fano resonances are
likely to exhibit near-unit transmittance at the peak of Fano resonances.
The profiles of Fano resonances are demonstrated in Fig. 4 where we plot six different line-shapes from
the test dataset. For each case the FEM data are first compared against their approximation by Eq. (14) on the
left panel of each subplot. On the right panel of each subplot we demonstrate the RF predicted line-shapes
in comparison against Eq. (14). One can see that in each case the position of the RF predicted resonance is
shifted with respect to the calculated one by distance bigger the the line-width of the resonance. This is due to
vanishingly small line-width of the resonances with the average quality factor _Q_ = 8166 in the spectral vicinity
of a BIC across the dataset. Note that, although the according to Fig. 3 the resonant wavelength is predicted to
a good accuracy, the RF fails to correctly position the resonance on the scale of its line-width. On the contrary
the the RF predicted line-shapes of the resonance fit well to the calculated data. Note that different line-shapes
are possible in the system under scrutiny including asymmetric Fano Fig. 4b,c,f, Lorentzian Fig. 4e, and antiLorentzian Fig. 4a,d line-shapes. Note that the transmittance always reaches zero at the dip of the resonances at
the same time the numerically exact reflectance zeros are clearly absent in Fig. 4c,d. Finally, we note in passing
that on approach to normal incidence the Fano resonance collapses and the transmittance becomes frequency
independent with _T_ = _τ_ <sup>2</sup> .
Discussion
In this work we investigated line-shapes of the Fano resonances induced by symmetry protected bound states
in the continuum in dielectric gratings. It is numerically demonstrated that the line-shapes are controlled by
two parameters in Eq. (14) which encompasses various line-shapes including asymmetric Fano, Lorentzian,
and anti-Lorentzian resonances. In full accordance with the previous studies <sup>46,48,81</sup> it is confirmed that the
transmittance zeros are always present even in the absence up-down symmetry. At the same time the reflectance
Fig. 4 . Fano resonances induced by symmetry protected BICs in dielectric gratings. FEM calculation data—
green circles, Data approximation by Eq. (14)—solid blue lines, RF—predictions within the test dataset—dashdot red lines. The numerically obtained and the RF predicted values of _α_ and _τ_ are shown in each sub-plot.
zeros can only be approached accidentally when parameter _α_ in Eq. (14) is close to _π/_ 4. It is found that the lineshapes of Fano resonances can be predicted to a good accuracy by the random forest machine learning methods
which outperforms the standard least square methods approximation by an order of magnitude in error with
the training dataset size _N_ _≈_ 10 <sup>4</sup> . We speculate that the presented results may be useful for the design and
synthesis of resonant responses in all-dielectric metasurfaces with one-dimensional periodicity. In the case of
metasurfaces with two-dimensional periodic patterning, our approach would require generalization to account
for polarization cross-talk. This represents an interesting direction for future research.
Data availability
[Data supporting the findings of this study and Python script are available at GitLab: https://gitlab.com/nanowo](https://gitlab.com/nanoworld_ml/bic-ml)
[rld_ml/bic-ml.](https://gitlab.com/nanoworld_ml/bic-ml)
Received: 11 June 2025; Accepted: 13 August 2025
References
1. Hsu, C. W., Zhen, B., Stone, A. D., Joannopoulos, J. D. & Soljačić, M. Bound states in the continuum. _Nat. Rev. Mater._ 1, 16048.
[https://doi.org/10.1038/natrevmats.2016.48 (2016).](https://doi.org/10.1038/natrevmats.2016.48)
2. Koshelev, K., Bogdanov, A. & Kivshar, Y. Meta-optics and bound states in the continuum. _Sci. Bull._ 64, 836–842 (2019).
3. Koshelev, K., Favraud, G., Bogdanov, A., Kivshar, Y. & Fratalocchi, A. Nonradiating photonics with resonant dielectric
nanostructures. _Nanophotonics_ 8 [, 725–745. https://doi.org/10.1515/nanoph-2019-0024 (2019).](https://doi.org/10.1515/nanoph-2019-0024)
4. Joseph, S., Pandey, S., Sarkar, S. & Joseph, J. Bound states in the continuum in resonant nanostructures: An overview of engineered
materials for tailored applications. _Nanophotonics_ 10, 4175–4207 (2021).
5. Kang, M., Liu, T., Chan, C. T. & Xiao, M. Applications of bound states in the continuum in photonics. _Nat. Rev. Phys._ 5, 659–678.
[https://doi.org/10.1038/s42254-023-00642-8 (2023).](https://doi.org/10.1038/s42254-023-00642-8)
6. Zhang, M. & Zhang, X. Ultrasensitive optical absorption in graphene based on bound states in the continuum. _Sci. Rep._ 5, 1–6
(2015).
7. Wang, X. et al. Controlling light absorption of graphene at critical coupling through magnetic dipole quasi-bound states in the
continuum resonance. _Phys. Rev. B_ 102, 155432 (2020).
8. Sang, T., Dereshgi, S. A., Hadibrata, W., Tanriover, I. & Aydin, K. Highly efficient light absorption of monolayer graphene by quasi
bound state in the continuum. _Nanomaterials_ 11, 484 (2021).
9. Xiao, S., Wang, X., Duan, J., Liu, T. & Yu, T. Engineering light absorption at critical coupling via bound states in the continuum.
_JOSA B_ 38, 1325–1330 (2021).
10. Cai, Y., Liu, X., Zhu, K., Wu, H. & Huang, Y. Enhancing light absorption of graphene with dual quasi bound states in the continuum
resonances. _J. Quant. Spectrosc. Radiat. Transf._ 283, 108150 (2022).
11. Liu, Y., Zhou, W. & Sun, Y. Optical refractive index sensing based on high-Q bound states in the continuum in free-space coupled
photonic crystal slabs. _Sensors_ 17 [, 1861. https://doi.org/10.3390/s17081861 (2017).](https://doi.org/10.3390/s17081861)
12. Romano, S. et al. Label-free sensing of ultralow-weight molecules with all-dielectric metasurfaces supporting bound states in the
continuum. _Photonics Res._ 6 [, 726. https://doi.org/10.1364/prj.6.000726 (2018).](https://doi.org/10.1364/prj.6.000726)
13. Ndangali, F. R. & Shabanov, S. V. The resonant nonlinear scattering theory with bound states in the radiation continuum and the
second harmonic generation. In _Active Photonic Materials V_, vol. 8808, 88081F (International Society for Optics and Photonics,
2013).
14. Wang, T. & Zhang, S. Large enhancement of second harmonic generation from transition-metal dichalcogenide monolayer on
grating near bound states in the continuum. _Opt. Express_ 26, 322–337 (2018).
15. Carletti, L., Koshelev, K., De Angelis, C. & Kivshar, Y. Giant nonlinear response at the nanoscale driven by bound states in the
continuum. _Phys. Rev. Lett._ 121, 033903 (2018).
16. Koshelev, K. et al. Subwavelength dielectric resonators for nonlinear nanophotonics. _Science_ 367, 288–292 (2020).
17. Kodigala, A. et al. Lasing action from photonic bound states in continuum. _Nature_ 541 [, 196–199. https://doi.org/10.1038/nature2](https://doi.org/10.1038/nature20799)
[0799 (2017).](https://doi.org/10.1038/nature20799)
18. Hwang, M.-S. et al. Ultralow-threshold laser using super-bound states in the continuum. _Nat. Commun._ 12 [, 4135. https://doi.org/](https://doi.org/10.1038/s41467-021-24502-0)
[10.1038/s41467-021-24502-0 (2021).](https://doi.org/10.1038/s41467-021-24502-0)
19. Yu, Y. et al. Ultra-coherent fano laser based on a bound state in the continuum. _Nat. Photonics_ 15 [, 758–764. https://doi.org/10.103](https://doi.org/10.1038/s41566-021-00860-5)
[8/s41566-021-00860-5 (2021).](https://doi.org/10.1038/s41566-021-00860-5)
20. Yang, J.-H. et al. Low-threshold bound state in the continuum lasers in hybrid lattice resonance metasurfaces. _Laser Photonics Rev._
15, 2100118 (2021).
21. Koshelev, K., Lepeshov, S., Liu, M., Bogdanov, A. & Kivshar, Y. Asymmetric metasurfaces with high-Q resonances governed by
bound states in the continuum. _Phys. Rev. Lett._ 121 [, 193903. https://doi.org/10.1103/physrevlett.121.193903 (2018).](https://doi.org/10.1103/physrevlett.121.193903)
22. Maksimov, D. N., Gerasimov, V. S., Romano, S. & Polyutov, S. P. Refractive index sensing with optical bound states in the
continuum. _Opt. Express_ 28 [, 38907. https://doi.org/10.1364/oe.411749 (2020).](https://doi.org/10.1364/oe.411749)
23. Shipman, S. P. & Venakides, S. Resonant transmission near nonrobust periodic slab modes. _Phys. Rev. E_ 71, 026611 (2005).
24. Sadreev, A. F., Bulgakov, E. N. & Rotter, I. Bound states in the continuum in open quantum billiards with a variable shape. _Phys._
_Rev. B_ 73, 235342 (2006).
25. Blanchard, C., Hugonin, J.-P. & Sauvan, C. Fano resonances in photonic crystal slabs near optical bound states in the continuum.
_Phys. Rev. B_ 94 [, 155303. https://doi.org/10.1103/physrevb.94.155303 (2016).](https://doi.org/10.1103/physrevb.94.155303)
26. Bogdanov, A. A. et al. Bound states in the continuum and fano resonances in the strong mode coupling regime. _Adv. Photonics_ 1,
016001 (2019).
27. Pankin, P. S., Maksimov, D. N., Chen, K.-P. & Timofeev, I. V. Fano feature induced by a bound state in the continuum via resonant
state expansion. _Sci. Rep._ 10 [, 13691. https://doi.org/10.1038/s41598-020-70654-2 (2020).](https://doi.org/10.1038/s41598-020-70654-2)
28. Bulgakov, E. N. & Maksimov, D. N. Optical response induced by bound states in the continuum in arrays of dielectric spheres. _J._
_Opt. Soc. Am. B_ 35 [, 2443. https://doi.org/10.1364/josab.35.002443 (2018).](https://doi.org/10.1364/josab.35.002443)
29. Yoon, J. W., Song, S. H. & Magnusson, R. Critical field enhancement of asymptotic optical bound states in the continuum. _Sci. Rep._
5 [, 18301. https://doi.org/10.1038/srep18301 (2015).](https://doi.org/10.1038/srep18301)
30. Mocella, V. & Romano, S. Giant field enhancement in photonic resonant lattices. _Phys. Rev. B_ 92 [, 155117. https://doi.org/10.1103/](https://doi.org/10.1103/physrevb.92.155117)
[physrevb.92.155117 (2015).](https://doi.org/10.1103/physrevb.92.155117)
31. Campione, S. et al. Broken symmetry dielectric resonators for high quality factor fano metasurfaces. _ACS Photonics_ 3, 2362–2367.
[https://doi.org/10.1021/acsphotonics.6b00556 (2016).](https://doi.org/10.1021/acsphotonics.6b00556)
32. Zhou, W. et al. Progress in 2d photonic crystal fano resonance photonics. _Prog. Quantum Electron._ 38, 1–74 (2014).
33. Limonov, M. F., Rybin, M. V., Poddubny, A. N. & Kivshar, Y. S. Fano resonances in photonics. _Nat. Photonics_ 11 [, 543–554. https://](https://doi.org/10.1038/nphoton.2017.142)
[doi.org/10.1038/nphoton.2017.142 (2017).](https://doi.org/10.1038/nphoton.2017.142)
34. Krasnok, A. et al. Anomalies in light scattering. _Adv. Opt. Photonics_ 11 [, 892. https://doi.org/10.1364/aop.11.000892 (2019).](https://doi.org/10.1364/aop.11.000892)
35. Fan, S., Suh, W. & Joannopoulos, J. D. Temporal coupled-mode theory for the fano resonance in optical resonators. _J. Opt. Soc. Am._
_A_ 20 [, 569. https://doi.org/10.1364/josaa.20.000569 (2003).](https://doi.org/10.1364/josaa.20.000569)
36. Alpeggiani, F., Parappurath, N., Verhagen, E. & Kuipers, L. Quasinormal-mode expansion of the scattering matrix. _Phys. Rev. X_ 7,
[021035. https://doi.org/10.1103/PhysRevX.7.021035 (2017).](https://doi.org/10.1103/PhysRevX.7.021035)
37. Ming, X., Liu, X., Sun, L. & Padilla, W. J. Degenerate critical coupling in all-dielectric metasurface absorbers. _Opt. Express_ 25,
[24658. https://doi.org/10.1364/oe.25.024658 (2017).](https://doi.org/10.1364/oe.25.024658)
38. Zhou, H. et al. Perfect single-sided radiation and absorption without mirrors. _Optica_ 3 [, 1079. https://doi.org/10.1364/optica.3.001](https://doi.org/10.1364/optica.3.001079)
[079 (2016).](https://doi.org/10.1364/optica.3.001079)
39. Maksimov, D. N., Bogdanov, A. A. & Bulgakov, E. N. Optical bistability with bound states in the continuum in dielectric gratings.
_Phys. Rev. A_ 102, 033511 (2020).
40. Bikbaev, R. G., Maksimov, D. N., Pankin, P. S., Chen, K.-P. & Timofeev, I. V. Critical coupling vortex with grating-induced high
q-factor optical tamm states. _Opt. Express_ 29 [, 4672. https://doi.org/10.1364/oe.416132 (2021).](https://doi.org/10.1364/oe.416132)
41. Zhang, J. et al. Physics-driven machine-learning approach incorporating temporal coupled mode theory for intelligent design of
metasurfaces. _IEEE Trans. Microw. Theory Tech._ 71 [, 2875–2887. https://doi.org/10.1109/tmtt.2023.3238076 (2023).](https://doi.org/10.1109/tmtt.2023.3238076)
42. Wu, H., Yuan, L. & Lu, Y. Y. Approximating transmission and reflection spectra near isolated nondegenerate resonances. _Phys. Rev._
_A_ 105 [, 063510. https://doi.org/10.1103/physreva.105.063510 (2022).](https://doi.org/10.1103/physreva.105.063510)
43. Huang, Z., Wang, J., Jia, W., Zhang, S. & Zhou, C. All-dielectric metasurfaces enabled by quasi-bic for high-q near-perfect light
absorption. _Opt. Lett._ 50 [, 105. https://doi.org/10.1364/ol.541553 (2024).](https://doi.org/10.1364/ol.541553)
44. Popov, E., Mashev, L. & Maystre, D. Theoretical study of the anomalies of coated dielectric gratings. _Opt. Acta Int. J. Opt._ 33,
[607–619. https://doi.org/10.1080/713821994 (1986).](https://doi.org/10.1080/713821994)
45. Shipman, S. P. & Tu, H. Total resonant transmission and reflection by periodic structures. _SIAM J. Appl. Math._ 72 [, 216–239. https:](https://doi.org/10.1137/110834196)
[//doi.org/10.1137/110834196 (2012).](https://doi.org/10.1137/110834196)
46. Wang, K. X., Yu, Z., Sandhu, S. & Fan, S. Fundamental bounds on decay rates in asymmetric single-mode optical resonators. _Opt._
_Lett._ 38 [, 100. https://doi.org/10.1364/ol.38.000100 (2013).](https://doi.org/10.1364/ol.38.000100)
[47. Bykov, D. A. & Doskolovich, L. L. 103/physreva.92.013845 (2015).](https://doi.org/10.1103/physreva.92.013845) _ω −_ _kx_ Fano line shape in photonic crystal slabs. _Phys. Rev. A_ 92 [, 013845. https://doi.org/10.1](https://doi.org/10.1103/physreva.92.013845)
48. Yuan, L., Zhang, M. & Lu, Y. Y. Real transmission and reflection zeros of periodic structures with a bound state in the continuum.
_Phys. Rev. A_ 106 [, 013505. https://doi.org/10.1103/physreva.106.013505 (2022).](https://doi.org/10.1103/physreva.106.013505)
49. Ma, W. et al. Deep learning for the design of photonic structures. _Nat. Photonics_ 15, 77–90 (2021).
50. Jiang, J., Chen, M. & Fan, J. A. Deep neural networks for the evaluation and design of photonic devices. _Nat. Rev. Mater._ 6, 679–700
(2021).
51. So, S., Badloe, T., Noh, J., Bravo-Abad, J. & Rho, J. Deep learning enabled inverse design in nanophotonics. _Nanophotonics_ 9,
1041–1057 (2020).
52. Pilozzi, L., Farrelly, F. A., Marcucci, G. & Conti, C. Machine learning inverse problem for topological photonics. _Commun. Phys._ 1,
57 (2018).
53. Kudyshev, Z. A., Shalaev, V. M. & Boltasseva, A. Machine learning for integrated quantum photonics. _ACS Photonics_ 8, 34–46
(2020).
54. Zhao, Z. et al. Advancements in microwave absorption motivated by interdisciplinary research. _Adv. Mater._ 36 [. https://doi.org/10.](https://doi.org/10.1002/adma.202304182)
[1002/adma.202304182 (2023).](https://doi.org/10.1002/adma.202304182)
55. Deng, Y., Fan, K., Jin, B., Malof, J. & Padilla, W. J. Physics-informed learning in artificial electromagnetic materials. _Appl. Phys. Rev._
12 [. https://doi.org/10.1063/5.0232675 (2025).](https://doi.org/10.1063/5.0232675)
56. Lin, R., Alnakhli, Z. & Li, X. Engineering of multiple bound states in the continuum by latent representation of freeform structures.
_Photonics Res._ 9, B96–B103 (2021).
57. Ma, X. et al. Strategical deep learning for photonic bound states in the continuum. _Laser Photonics Rev._ 16, 2100658 (2022).
58. Wang, F. et al. Automatic optimization of miniaturized bound states in the continuum cavity. _Opt. Express_ 31, 12384–12396 (2023).
59. Wang, Z. et al. Customizing 2.5d out-of-plane architectures for robust plasmonic bound-states-in-the-continuum metasurfaces.
_Adv. Sci._ 10 [, 2206236. https://doi.org/10.1002/advs.202206236 (2023).](https://doi.org/10.1002/advs.202206236)
60. Zhang, Y. et al. Dynamics of polarization-tuned mirror symmetry breaking in a rotationally symmetric system. _Nat. Commun._ 15,
[5586. https://doi.org/10.1038/s41467-024-49696-x (2024).](https://doi.org/10.1038/s41467-024-49696-x)
61. Su, J. L. et al. Metaphynet: intelligent design of large-scale metasurfaces based on physics-driven neural network. _J. Phys. Photonics_
6 [, 035010. https://doi.org/10.1088/2515-7647/ad4cc8 (2024).](https://doi.org/10.1088/2515-7647/ad4cc8)
62. Molokeev, M. S. et al. Infrared bound states in the continuum: random forest method. _Opt. Lett._ 48 [, 4460. https://doi.org/10.1364](https://doi.org/10.1364/ol.494629)
[/ol.494629 (2023).](https://doi.org/10.1364/ol.494629)
63. Bulgakov, E. N., Maksimov, D. N., Semina, P. N. & Skorobogatov, S. A. Propagating bound states in the continuum in dielectric
gratings. _J. Opt. Soc. Am. B_ 35 [, 1218–1222. https://doi.org/10.1364/josab.35.001218 (2018).](https://doi.org/10.1364/josab.35.001218)
64. Zhong, H., He, T., Meng, Y. & Xiao, Q. Photonic bound states in the continuum in nanostructures. _Materials_ 16, 7112 (2023).
65. Son, H. et al. Strong coupling induced bound states in the continuum in a hybrid metal-dielectric bilayer nanograting resonator.
_ACS Photonics_ 11, 3221–3231 (2024).
66. Maksimov, D. N., Gerasimov, V. S., Bogdanov, A. A. & Polyutov, S. P. Enhanced sensitivity of an all-dielectric refractive index
sensor with an optical bound state in the continuum. _Phys. Rev. A_ 105, 033518 (2022).
67. Wu, W., Wang, K. & Qian, L. All-dielectric grating-based refractive index sensor with a high figure of merit driven by bound states
in the continuum. _Opt. Eng._ 63, 127104–127104 (2024).
68. Li, Z., Nie, G., Chen, Z., Zhan, S. & Lan, L. High-quality quasi-bound state in the continuum enabled single-nanoparticle virus
detection. _Opt. Lett._ 49, 3380–3383 (2024).
69. Yao, H.-Y., Kang, Y.-T. & Her, T.-H. Ultra-sensitive refractive index sensing enabled by accidental bound states in the continuum
on ultrathin dielectric grating metasurfaces. _Opt. Express_ 33, 13298–13315 (2025).
70. Yadav, G., Sahu, S., Kumar, R. & Jha, R. Bound states in the continuum empower subwavelength gratings for refractometers in
visible. In _Photonics_, vol. 9, 292 (MDPI, 2022).
71. Liu, J. & Liu, Y. Perfect narrow-band absorber of monolayer borophene in all-dielectric grating based on quasi-bound state in the
continuum. _Ann. Phys._ 535, 2200500 (2023).
72. Zhao, Z., Guo, C. & Fan, S. Connection of temporal coupled-mode-theory formalisms for a resonant optical system and its time
reversal conjugate. _Phys. Rev. A_ 99 [, 033839. https://doi.org/10.1103/physreva.99.033839 (2019).](https://doi.org/10.1103/physreva.99.033839)
73. Maksimov, D. et al. Dataset: Regression. https:/ /opticapublishin g.figs har [](https://opticapublishing.figshare.com/s/99bdf72248fca9e967a3) [e.](https://opticapublishing.figshare.com/s/99bdf72248fca9e967a3) c om /s /99bdf 72248fca9e967a3.
74. Breiman, L. Random forests. _Mach. Learn._ 45 [, 5–32. https://doi.org/10.1023/A:1010933404324 (2001).](https://doi.org/10.1023/A:1010933404324)
75. Ho, T. K. Random decision forests. In _Proceedings of 3rd International Conference on Document Analysis and Recognition_, vol. 1,
[278–282. https://doi.org/10.1109/ICDAR.1995.598994 (1995).](https://doi.org/10.1109/ICDAR.1995.598994)
76. Liu, Y., Wang, Y. & Zhang, J. _New Machine Learning Algorithm: Random Forest_, 246–252. (Springer, 2012).
[77. Segal, M. R. Machine learning benchmarks and random forest regression. https://escholarship.org/uc/item/35x3v9t4.](https://escholarship.org/uc/item/35x3v9t4)
78. Van Rossum, G. & Python Dev Team. _Python 3.6 Language Reference_ (Samurai Media, 2016).
79. Altmann, A., Toloşi, L., Sander, O. & Lengauer, T. Permutation importance: A corrected feature importance measure. _Bioinformatics_
26 [, 1340–1347. https://doi.org/10.1093/bioinformatics/btq134 (2010).](https://doi.org/10.1093/bioinformatics/btq134)
80. Wehenkel, M., Sutera, A., Bastin, C., Geurts, P. & Phillips, C. Random forests based group importance scores and their statistical
interpretation: Application for alzheimer’s disease. _Front. Neurosci._ 12 [. https://doi.org/10.3389/fnins.2018.00411 (2018).](https://doi.org/10.3389/fnins.2018.00411)
81. Gippius, N. A., Tikhodeev, S. G. & Ishihara, T. Optical properties of photonic crystal slabs with an asymmetrical unit cell. _Phys._
_Rev. B_ 72 [, 045138. https://doi.org/10.1103/physrevb.72.045138 (2005).](https://doi.org/10.1103/physrevb.72.045138)
Acknowledgements
This study was supported by the Ministry of Science and Higher Education of Russian Federation (Grant FSRZ2023-0006), A.S.K. acknowledges the support by the Foundation for the Advancement of Theoretical Physics
and Mathematics “BASIS” (Grant 23-1-5-76-1), M.S.M. acknowledges the support by the Ministry of Science
and Higher Education of Russian Federation (Grant FEWZ-2024-0052), V.S.G. and A.E.E. acknowledges the
support by the Ministry of Science and Higher Education of Russian Federation (Grant 124012900550-1).
Author contributions
Theory: D.N.M.; FEM calculation: V.S.G., A.S.K.; Machine Learning calculation: M.S.M., A.E.E.; Results analysis: V.K., S.P.P.; Manuscript preparation: V.S.G., D.N.M., M.S.M. All authors reviewed the manuscript.
Funding
Open access funding provided by Royal Institute of Technology.
Declarations
Competing interests
The authors declare no competing interests.
Additional information
Supplementary Information [The online version contains supplementary material available at https://doi.org/1](https://doi.org/10.1038/s41598-025-16192-1)
[0.1038/s41598-025-16192-1.](https://doi.org/10.1038/s41598-025-16192-1)
Correspondence and requests for materials should be addressed to V.K.
Reprints and permissions information is available at www.nature.com/reprints.
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and
institutional affiliations.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which
permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give
appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and
indicate if changes were made. The images or other third party material in this article are included in the article’s
Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included
in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or
exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy
[of this licence, visit http://creativecommons.org/licenses/by/4.0/.](http://creativecommons.org/licenses/by/4.0/)
© The Author(s) 2025