Characterizing Exceptional Points Using Neural Networks
One of the key features of non-Hermitian systems is the occurrence of
exceptional points (EPs), spectral degeneracies where the eigenvalues and
eigenvectors merge. In this work, we propose applying neural networks to
characterize EPs by introducing a new feature -- summed phase rigidity (SPR).
We consider different models with varying degrees of complexity to illustrate
our approach, and show how to predict EPs for two-site and four-site gain and
loss models. Further, we demonstrate an accurate EP prediction in the
paradigmatic Hatano-Nelson model for a variable number of sites. Remarkably, we
show how SPR enables a prediction of EPs of orders completely unseen by the
training data. Our method can be useful to characterize EPs in an automated
manner using machine learning approaches.
Md. Afsar Reja, Awadhesh Narayan
# Characterizing Exceptional Points Using Neural Networks

###### Abstract

One of the key features of non-Hermitian systems is the occurrence of exceptional points (EPs), spectral degeneracies where the eigenvalues and eigenvectors merge. In this work, we propose applying neural networks to characterize EPs by introducing a new feature - _summed phase rigidity_ (SPR). We consider different models with varying degrees of complexity to illustrate our approach, and show how to predict EPs for two-site and four-site gain and loss models. Further, we demonstrate an accurate EP prediction in the paradigmatic Hatano-Nelson model for a variable number of sites. Remarkably, we show how SPR enables a prediction of EPs of orders completely unseen by the training data. Our method can be useful to characterize EPs in an automated manner using machine learning approaches.

_Introduction-_ In recent years, the exploration of non-Hermitian systems has been gaining wide interest [1; 2; 3; 4; 5; 6]. This is due to a large number of inherent rich physical phenomena, such as exceptional points (EPs), non-Hermitian skin effect (NHSE), non-Bloch band theory, exotic topological phases, and extended symmetry classes, which have no counterpart in the contemporary Hermitian realm. One of the most intriguing characteristics of non-Hermitian systems is the existence of EPs - spectral degeneracy points at which not only the eigenvalues merge but also the eigenstates coalesce simultaneously [7; 8]. At EPs, the Hamiltonian matrix becomes defective. EPs play an essential role in NHSE and topological phases of non-Hermitian systems [9]. In addition to harbouring numerous fundamentally interesting features, EPs have already given rise to several applications such as enhanced sensing at higher-order EPs [10], in optical microcavities [11], and directional lasing [12]. EPs have been realized in various experimental setups such as optics [13; 14], photonics [15], electric circuits [16; 17] and acoustics [18; 19].

Due to its diverse applications and unique learning capabilities, machine learning (ML) is rapidly being adopted by researchers as a novel tool. In particular, ML has the potential to uncover new physics without prior human assistance. The growing trend of the application of ML techniques is not only restricted to different areas of condensed matter physics [20], but are also being explored in other areas such as particle physics, cosmology, and quantum computing [21]. In past years, ML techniques are being applied with outstanding accuracy to study topological phases [22; 23; 24; 25] and topological invariants [26; 27], classification of topological phases [24; 28], and phase transitions [29] in the Hermitian realm. Very recently, the first applications of ML techniques to non-Hermitian systems have been undertaken. For instance, Narayan _et al._[30], Cheng _et al._[31] and Zhang _et al._[32] have undertaken the study of non-Hermitian topological phases using convolutional neural networks (NNs). Yu _et al._ have used an unsupervised method, namely diffusion maps, to explore such phases [33]. Non-Hermitian topological phases in photonics have been studied using manifold clustering [34]. Furthermore, Araki and co-authors have analysed NHSE in an ML framework [35]. Moreover, ML approaches have been recently explored to investigate various non-Hermitian experimental platforms. Examples include, physics-graph-informed ML to study second-order NHSE in topoelectrical circuits [36], principal component analysis and NNs to explore non-Hermitian photonics [37], and diffusion maps to analyse non-Hermitian knotted phases in solid state spin systems [38].

In this work, we propose and demonstrate the characterization of EPs using NNs. We introduce a new feature, which we term _summed phase rigidity_ (SPR), which allows an unambiguous characterization of higher-order EPs. As an illustration of our approach, starting with simple models, we have categorised the EPs in various systems with increasing complexity with the help of NNs. In particular, we show how EPs can be distinguished in two- and four-site models by means of NNs. Furthermore, our NN construction and SPR enables an accurate prediction of the order of the EPs. Finally, using the celebrated Hatano-Nelson model for a variable number of sites, we demonstrate an accurate prediction of EPs and show how SPR allows a prediction of EPs of orders completely unseen by the training data. Our approach is useful for the characterization of EPs in an automated manner using ML techniques.

_Two-site model-_ We first consider the simple two-site non-Hermitian model with on-site gain and loss to illustrate our approach [see Fig. 1(a)]. The system is described by the following Hamiltonian [39]

\[H_{2}=\begin{pmatrix}\omega_{0}+i\gamma&J\\ J&\omega_{0}-i\gamma\end{pmatrix}, \tag{1}\]

where \(\omega_{0}\) is the onsite potential, \(J\) is the coupling between the sites as shown in Fig. 1(a), and the non-Hermiticity is introduced by the gain and loss term \(\pm i\gamma\). The eigenvalues are given by \(\lambda_{\pm}=\omega_{0}\pm\sqrt{J^{2}-\gamma^{2}}\). For
simplicity, we choose \(\omega_{0}=0\), and the EP occurs at \(\gamma=\pm J\). Note that this model can host EPs of order two only.

We briefly describe the concept of phase rigidity, based on which we will classify the EPs. The phase rigidity, \(r\), at any point in the parameter space of a given Hamiltonian is defined as [40; 41]

\[r=\frac{\langle\Psi_{L}|\Psi_{R}\rangle}{\langle\Psi_{R}|\Psi_{R}\rangle}, \tag{2}\]

where \(\Psi_{L}\) and \(\Psi_{R}\) are left and right eigenstates of the non-Hermitian Hamiltonian. Due to bi-orthogonality, \(r\) takes a value of zero at EPs and a value of unity far from the EP. Instead of \(r\), which ranges from zero to one, we propose to take the negative log of \(r\), i.e., \(-\ln|r|\). This change of scale essentially enhances the separation between EPs and non-EPs in the parameter space - this leads to a much-improved characterization of EPs as we will show. So at an EP, this quantity takes a large positive value, and far from an EP, it drops to zero.

We choose 40,000 randomly generated points in the \(\gamma-J\) plane for our two-site model and compute \(-ln|r|\). Then, in a similar manner, we produced 10,000 points such that \(\gamma=J\) and combined them with the points from above. Among this generated data, we kept 10% as test data, and the rest are used as training data. We constructed a network consisting of two hidden layers with 16 and 4 neurons per layer, respectively. The total number of trainable parameters is 121. We used the rectified linear unit (ReLU) as the activation function for the hidden layers. The loss (mean squared error loss) curve for 200 epochs with a batch size of 32 is shown in Fig. 1(b). We note that convergence is quite fast (within nearly 50 epochs) and the loss for the test set does not fluctuate too much or deviate from the training set loss curve, indicating the sign of a good fit.

After training is performed by optimizing various hyperparameters (see Table 1), we predict the order of EPs for the test set. On the other hand, for this simple illustrative case, we already know the true order of the EPs. We compare the true and the predicted results for the same data points in the \(\gamma-J\) plane, as shown in Fig. 1(c) and Fig. 1(d). We observe that our NN predictions are almost identical to the true values with an accuracy of 99%, based on which we can easily classify whether a given point is an EP or not. We also calculated the performance of the network by means of the \(R^{2}\) score. This is presented in Table 1 and is close to 0.968.

_Four-site model_- Next, we consider a slightly more involved scenario in a four-site model, which may host both second and fourth-order EPs. The Hamiltonian reads [42]

\[H_{4}=\begin{pmatrix}i\delta&p&0&0\\ p&i\gamma&q&0\\ 0&q&-i\gamma&p\\ 0&0&p&-i\delta\end{pmatrix}. \tag{3}\]

Here \(p\) denotes the coupling between sites one and two, and between sites three and four, \(q\) is the coupling between sites two and three, \(\pm i\delta\) and \(\pm i\gamma\) are gain and loss terms, as shown schematically in Fig. 2 (a). The above Hamiltonian can host both second- and fourth-order EPs, depending on values of \(p\), \(q\), \(\delta\), and \(\gamma\) in the parameter space. For the rest of the discussion, we set \(\gamma=1\). The EP-2 lies on a surface in the parameter space satisfying the following condition

\begin{table}
\begin{tabular}{c c c c} \hline \hline \multirow{2}{*}{Model} & No. of & Total & \multirow{2}{*}{
\begin{tabular}{c} Performance \\ (\(R^{2}\) score) \\ \end{tabular} } \\  & hidden layers & trained & \\  & (neurons) & parameters & \\ \hline \hline Two-site & 2 (16, 4) & 121 & 0.968 \\ Four-site & 2 (32, 16) & 673 & 0.974 \\ \(N\) sites & 2 (12, 4) & 105 & 0.998 \\ (Hatano-Nelson) & 2 (12, 4) & 105 & 0.998 \\ \hline \hline \end{tabular}
\end{table}
Table 1: **Details of NN structures.** The details of the constructed networks are presented for the different models. We note that for a fixed number (two) of layers to get a good \(R^{2}\) score (\(\approx 0.95\%\)), one needs to increase the number of total trainable parameters by increasing the number of neurons per layer. This is because of the increasing complexity of models.

Figure 1: **Training of NN for the two-site model.** (a) Illustration of the two-site gain and loss non-Hermitian model. Here \(J\) is the coupling between the two sites and \(\pm i\gamma\) denotes the gain and loss terms. (b) A NN with 2 hidden layers was constructed. The hidden layers consist of 16 and 4 neurons, respectively. The total number of trainable parameters is 121. The loss curve with epoch is plotted during training. The blue represents the training dataset and the yellow for validation. It is clear from the loss curve that our model is not over-fitted. (c) \(-\ln(|r|)\) is plotted for the test dataset in \(J-\gamma\) plane on a color scale. A color bar values tending to unity represent an EP and low values denote non-EP. (d) The corresponding predicted value from the NN is shown. We see a good agreement between the actual and predicted values in (c) and (d).
\[p^{4}+\delta^{2}+2\delta p^{2}-\delta^{2}q^{2}=0. \tag{4}\]

On the other hand, we obtain an EP-4 when both Equation 4 and the following Equation 5 are satisfied simultaneously,

\[1+\delta^{2}-2p^{2}-q^{2}=0. \tag{5}\]

As compared to the previous case, i.e., a classification between an EP and a non-EP, here we need to distinguish three types of points, EP-2, EP-4, and non-EPs. To do this, we have designed a new feature, which we term the _summed phase rigidity_, SPR. This is defined as

\[\text{SPR}=\sum_{k}-\ln|r_{k}|/\text{max}(-\ln|r_{k}|), \tag{6}\]

where \(k\) runs over all eigenstates of the given Hamiltonian. For an \(N\)-th order EP, \(\text{SPR}\approx N\) at the EP. The steps for constructing SPR are illustrated in Table 2.

We trained the network to classify the points in the parameter space according to the SPR value. As such, we set the following cutoffs for the SPR - an SPR value of nearly zero (\(0<\text{SPR}<1\)) corresponds to the ordinary point (non-EP), SPR between 1 and 2 reflects a second order EP (EP-2), and SPR above three corresponds to a fourth order EP (EP-4). Note that in practical computations, SPR takes a value lower than \(N\) for an \(N\)-th order EP. This is because our generated data points are chosen randomly and phase rigidity depends on the detuning parameters, \(\delta z\), which take the system away from an EP. In general, \(r\varpropto\delta z^{1/N}\). Nevertheless, we show that SPR can classify the corresponding points with an outstanding accuracy, and can thus be a very useful training feature.

We generated a data set with 50,000 points, such that it is a mixture of 5000 EP-2 and 5000 EP-4 points, with the rest being non-EPs. As before, we keep aside 10% of data points as test data, and the rest is used as the training data. The data points are generated by randomly picking a point from the \((p,q,\delta)\) parameter space (with \(\gamma=1\)). The conditions for EPs are established using Eq. 4 and Eq. 5. Next, we calculate SPR at these points as described above. So finally the features for each data point become \(p\), \(q\), \(\delta\) and SPR. Our trained NN consists of two hidden layers with 32 and 16 neurons per layer respectively. The total number of trainable parameters is 673. In our training with batch size 32 and 200 epochs, the loss curve in Fig. 2 (b) shows that the NN is not overfitted and converges rapidly. After training, we predict the SPR value for the test data set and plot it alongside the actual value in Fig. 2(c) and (d). We note the excellent match between the actual and predicted data. In particular, there is a clear distinction between EPs of different orders. Overall, in estimating the actual order of EPs in the test data set, we achieved an accuracy of 97.5%.

_Hatano-Nelson model with variable sites-_ Next, we present the generalized approach to characterize the EPs based on the concept of SPR. We consider the paradigmatic Hatano-Nelson model [43], which has served as the inception ground for many of the central ideas of non-Hermitian physics. The Hamiltonian for \(L\) sites under open boundary conditions is given by the following matrix

\begin{table}
\begin{tabular}{c c c c c c c c} Point type & \(J\) & \(\gamma\) & \(-\ln|r_{1}|\) & \(-\ln|r_{2}|\) & \(\frac{\text{rescaled}}{-\ln|r_{1}|\) & \(-\ln|r_{2}|}\) & SPR \\ \hline \hline Non-EP & 0.3 & 0.7 & 0.10 & 0.10 & 0.0036 & 0.0036 & 0.007 \\ EP-2 & 0.5 & 0.5 & 27.34 & 27.34 & 0.99 & 0.99 & 1.98 \\ EP-2 & 0.3 & 0.3 & 27.52 & 27.52 & 1 & 1 & 2 \\ Non-EP & 0.5 & 0.8 & 0.25 & 0.25 & 0.009 &.009 & 0.018 \\ \end{tabular}
\end{table}
Table 2: **Constructing SPR for two site model.** To construct the SPR, we first calculate \(-\ln|r|\) at the chosen points and then rescale by dividing them by the maximum value. After the rescaling, the sum of all rescaled \(-\ln|r|\) gives the SPR. Note that SPR value is nearly the order of the EP at an EP and nearly zero far from the EPs.

Figure 2: **Training of NN for the four-site model.** (a) Schematic of the four-site non-Hermitian model. Here \(p\) and \(q\) are the coupling constants between the sites, and \(\pm i\gamma\) and \(\pm i\delta\) denote the gain and loss terms. (b) An NN with 2 hidden layers was constructed. The hidden layers consist of 32 and 16 neurons, respectively. The total number of trainable parameters is 673. The loss curve with epoch during training is shown as the blue points for the training data set and as the yellow points for validation set. It is clear from the loss curve that our NN is not overfitted. (c) Histogram of test data points from the parameter space \((p,q,\delta,\gamma)\) according to the SPR value. Points near SPR=0 are non-EP, i.e., ordinary points. SPR between one and two represents the second-order EPs and SPR between three and four represents the fourth-order EPs. (d) Same as (c) but now instead the predicted value of SPR from the NN is plotted. We see good agreement between actual and predicted values from (c) and (d).
\[H_{L}=\begin{pmatrix}0&t-\gamma/2&0&...&0\\ t+\gamma/2&0&t-\gamma/2&...&0\\ 0&t+\gamma/2&0&...&0\\ \vdots&\vdots&\vdots&\ddots&\vdots\\.&.&.&.\end{pmatrix}. \tag{7}\]

Here \(t\pm\gamma/2\) denote non-reciprocal hopping terms, i.e., the unequal left and right hopping strengths. In this model, higher order EPs occur at \(t=\pm\gamma/2\), and the order depends on the number of sites, i.e., \(L\). Therefore, if a point is an EP in the \(t-\gamma\) parameter space, then the SPR value will be nearly \(L\), for an \(L\) site model. For the sake of simplicity, we change the variables as \(t_{1}=t-\gamma/2\) and \(t_{2}=t+\gamma/2\). In this \(t_{1}-t_{2}\) parameter space, EPs occur when one of \(t_{1}\) or \(t_{2}\) is nearly zero and other one is nearly one.

Here we trained the Hatano-Nelson model with different sites. We have trained the network with \(L=3\) and \(L=7\). We generated the data by choosing random points in the \(t_{1}-t_{2}\) parameter space and calculating the SPR. For \(L=3\), we generated 30,000 points, which are a mixture of 5,000 points such that \(t_{1}\approx 1\) and \(t_{2}\approx 0\), 5,000 points such that \(t_{2}\approx 1\) and \(t_{1}\approx 0\) and the rest are such that \(t_{1}\approx t_{2}\). Similarly, for \(L=7\), 30,000 data points were generated with a similar distribution. Therefore, finally, we have 60,000 data points with different SPR values, i.e., nearly 3, 7 or 0 based on the values of \(t_{1}\), \(t_{2}\) and \(L\).

Among the generated data, 10% was kept as test data and the rest is used to train the NN. We construct an NN with two hidden layers with 12 and 4 neurons, respectively. The loss curve in Fig. 3 (b) shows that NN is not over-fitted. After training, we predict the distribution of the test data set with respect to SPR value as shown in Fig. 3 (d), where \(6<\text{SPR}<7\) represents EPs of order seven, \(2<\text{SPR}<3\) denotes EPs of order three, and \(\text{SPR}<1\) are non-EP points. By comparing to the actual SPR distribution of the test data set in Fig. 3 (c), we find good agreement between actual and predicted SPR value distribution with an accuracy close to 99.9%. We, therefore, conclude that EPs of different orders can be successfully classified by using SPR.

Whether our NN has learned the generalised property of SPR is a crucial question. In order to understand this, we ask the already trained NN to predict the EPs and their orders in models that were not included during training. Fig. 4 (a) shows the distribution of true SPR data from the \((t_{1},t_{2},L=4)\) parameter space for \(L=4\) site Hatano-Nelson model. Here, \(3<\text{SPR}<4\) represents EPs of order 4, and \(0<\text{SPR}<1\) are non-EPs. Now we feed test this data set of \(L=4\) sites to the already trained NN and the distribution of data with the predicted SPR is shown in Fig. 4 (b). Remarkably, we find that the NN, which was trained for \(L=3\) and \(L=7\) sites is able to identify the EPs as well as their order with an accuracy greater than 99.9%.

Figure 3: **Training of NN for variable site Hatano-Nelson model.** (a) Schematic diagram of the Hatano-Nelson model with the left-right asymmetric hopping (\(t\pm\gamma/2\)). (b) A neural network with 2 hidden layers was constructed. The hidden layers consist of 12 and 4 neurons, respectively. The total number of trainable parameters is 105. The loss curve shown as a function of the epoch indicates that NN is not over-fitted or under-fitted. (c) Distribution of test data set with actual SPR values for \(L=3\) and \(L=7\) sites. (d) Distribution of the same data sets as (c) but with predicted SPR values from the network. We note the agreement between actual and predicted SPR values.

Figure 4: **SPR prediction of higher-order EPs of un-trained Hatano-Nelson models.** (a) Actual data distribution for \(L=4\) site Hatano-Nelson model. Here, \(3<\)SPR\(<4\) represents fourth-order EPs and SPR below one denotes ordinary points. (b) The corresponding predictions from the NN, which was trained for \(L=3\) and \(L=7\) sites only. (c) Actual data set for a mixture of \(L=4\) and \(L=6\) sites HN models, where \(3<\text{SPR}<4\) denotes an EP of order 4 and \(5<\text{SPR}\)\(<6\) represents an EP of order 6. (d) Corresponding predicted values from the NN. We discover that the NN is able to detect the order of the EP even when there is a mixture of data for EPs of different orders. Moreover, the NN is capable of predicting the EPs and their orders for those cases which were not included in either the training or the test data sets.
To further examine the robustness of our NN, we make the scenario more complicated by adding random points from \((t_{1},t_{2},L=6)\) parameter space to the existing \(L=4\) data set. The resulting distribution of the SPR values is shown in Fig. 4 (c), where \(0<\text{SPR}<1\) are non-EPs, \(3<\text{SPR}<4\) are EPs of order 4 and \(5<\text{SPR}<6\) represent the EPs of order 6. The corresponding distribution for the predicted SPR value is shown in Fig. 4 d. We note that our trained NN for \(L=3\) and \(L=7\) sites is not only capable of predicting the EPs and their orders for an untrained model, but it also has the ability to do so for a mixture of data from different non-Hermitian models with EPs of varying orders with an accuracy close to 99.9%.

_Discussion and summary-_ Before summarizing, we note here a few points regarding our NN models. First, we have followed a top-up approach to train the models. We started with complicated models, i.e., a large number of hyperparameters (number of layers, number of neurons in each layer, number of epochs, batch sizes and other hyperparameters) and reduced the complexity until the performance decreases significantly. So, the NN models presented here should offer an optimal balance between computational cost and performance. Second, we selected Adam as the adaptive learning rate optimization and ReLU as the activation function. Third, we trained each model for 200 epochs with a batch size of 32. Finally, we emphasize that our ML models are actually regression models which predict the SPR value, and the specific range of SPR is then used to classify different orders of EPs.

In summary, we have successfully demonstrated how ML techniques can be used to predict EPs and their orders in various models with outstanding accuracy. For the two-site model, we trained an NN to classify EPs and non-EPs. Next, we proposed a new feature - termed SPR - and used it to distinguish between EPs of different orders. We then generalized this procedure to the celebrated Hatano-Nelson model with variable sites. Remarkably, we found that our NN models were able to predict the true order of EPs with accuracy greater than 99% even in cases with EPs of orders completely unseen by the training data.

Looking ahead, our work may open up interesting avenues for future explorations. Our techniques can be useful for studying the parametric dependence of EPs in higher dimensions, which can become quite intricate, especially in cases such as anisotropic EPs [44]. The behavior of EPs can differ based on the symmetries present in the system [45]. We envisage that generalizations of our framework may assist in characterizing nontrivial behavior in such scenarios. Additionally, EPs have intriguing connections to topological phases of non-Hermitian systems, making our method potentially useful for studying their topological properties. We hope our work motivates these promising developments.

_Acknowledgments-_ We have used Python [46] and TensorFlow [47] for our computations, and we are grateful to the developers. M. A. R. would like to thank Sourav Mal for useful discussions, and would also like to thank Smoky, his cat, for being a calming presence when he was writing this paper. M. A. R. is supported by a graduate fellowship of the Indian Institute of Science. A. N. acknowledges a start-up grant from the Indian Institute of Science.
