\section{Introduction}

In recent decades, more and more attention have been paid to the nonlinear problems in fluid mechanics, condensed matter physics, optical fiber communication, plasma physics and even biology \cite{Draper1964, Peregrine1983, Zabusky1965, Parkins1998}. After establishing nonlinear partial
differential equations to describe these nonlinear phenomena and then analyzing the analytical and numerical solutions of these nonlinear models, the essence of these nonlinear phenomena can be understood \cite{Ablowitz1992}. Therefore, the research
of these nonlinear problems is essentially transformed into the study of nonlinear partial differential equations which describe these physical phenomena. Due to many basic properties of linear differential equations are not applicable to nonlinear differential equations, these nonlinear differential equations which the famous nonlinear Schr\"{o}dinger equation belongs to are more difficult to solve compared with the linear differential equations. It is well known that the Schr\"{o}dinger equation can be used to describe the quantum behavior of microscopic particles in quantum mechanics \cite{Schr1926}. Furthermore, various solutions of this equation can describe the nonlinear phenomena in other physical fields, such as optical fiber, plasma, Bose-Einstein condensates, fluid mechanics and Heisenberg ferromagnet \cite{Guo2012,Solli2007,Chabchoub2011,Qiao1994,Akhmediev2009,Ohta2012,Hasegawa1973,Kavitha2003,Qiao1993}.

With the explosive growth of available data and computing resources, deep neural networks, i.e., deep learning \cite{LeCun2015}, are applied in many areas including image recognition, video surveillance, natural language processing, medical diagnostics, bioinformatics, financial data analysis and so on \cite{Mitchell1997,Bishop2006,Alipanahi2015,Duda2000,Lake2015,Krizhevsky2017}. In scientific computing, especially, the neural network method \cite{McCulloch1943,Rosenblatt1958,Bryson1975} provides an ideal representation for the solution of differential equations \cite{Lagaris1998} due to its universal approximation properties \cite{Hornik1989}. Recently, a physically constrained deep learning method called physics-informed neural network (PINN) \cite{Raissi2019} and its improvement \cite{Jagtap2020} has been proposed which is particularly suitable for solving differential equations and corresponding inverse problems. It is found that the PINN architecture can obtain remarkably accurate solution with extraordinarily less data. Meanwhile, this method also provides a better physical explanation for predicted solutions because of the underlying physical constraints which is usually described explicitly by the differential equations. In this paper, the computationally efficient physics-informed data-driven algorithm for inferring solutions to more general nonlinear partial differential equations, such as the integrable nonlinear Schr\"odinger equation, is studied.

As is known to all, the study of exact solutions for integrable equations which are used to describe complex physical phenomena in the real world have been paid more and more attention in plasma physics, optical fiber, fluid dynamics and others fields \cite{Lax1968,Hasegawa1973,Iwao1997,YuS1998,Osman2019}. The Hirota bilinear method, the symmetry reduction method, the Darboux transformation, the B$\mathrm{\ddot{a}}$cklund transformations, the inverse scattering method and the function expansion method are powerful means to solve nonlinear integrable equations, and many other methods are based on them \cite{Hirota2004,Geng1999,Matveev1991,Olver1993,Zakharov1984,Ablowitz1992,Pu2020}. Although the computational cost of some direct numerical solutions of integrable equations is very high, with the revival of neural networks, the development of more effective deep learning algorithms to obtain data-driven solutions of nonlinear integrable equations has aroused great interest \cite{Li2020,Bongard2007,Raissi2017,Lij2020,LiJ2020}. Li and Chen constructed abundant numerical solutions of second-order and third-order nonlinear integrable equations with different initial and boundary conditions by deep learning method based on the PINN model \cite{Li2020,Lij2020,LiJ2020}. Previous works mainly focused on some simple solutions (e.g., N-soliton solutions, kink solutions) of given system or integrable equation. Relatively, the research results of machine learning for constructing rogue waves are rare. In Ref. \cite{Marcucci2020}, the bias function including two backward shock waves and soliton generation and the generation of rogue waves are studied by using a single wave-layer feed forward neural network.  As far as we know, the soliton solutions, breather solution and rogue wave solutions \cite{Solli2007,Chabchoub2011} of the integrable nonlinear Schr\"odinger equation have not been given out by the deep learning method based on PINN. Therefore, we introduce the deep learning method with underlying physical constraints to construct the soliton solutions, breathing solution and rogue wave solutions of integrable nonlinear Schr\"odinger equation in this work.

This paper is organized as follows. In section 2, we introduce the physically constrained deep learning method and
briefly present some problem setups. In Section 3, the one-soliton solution and two-soliton solution of the nonlinear Schr\"odinger equation is obtained by this approach, and the breather solution are derived compared with the two-soliton solution. Section 4 provides rogue wave solutions which contain one-order rogue wave and two-order rogue wave for the nonlinear Schr\"odinger equation, and the relative $\mathbb{L}_2$ errors of simulating the one-order rogue wave of nonlinear Schr\"odinger equation with different numbers of initial points sampled, residual collocation points sampled, network layers and neurons per hidden layer are also given out in detail. Conclusion is given in last section.

\section{Method}

In this paper, we consider (1+1)-dimensional nonlinear Schr\"odinger equation as follows
\begin{equation}\label{E1}
i q_t+\alpha q_{xx}+\beta |q|^2 q=0,
\end{equation}
where $\alpha, \beta$ are arbitrary parameters, $i = \sqrt{-1}$ and $q$ are complex-valued solutions with respect to $x, t$. Based on the theory of integrable systems and PINN, we establish a physically-constrained deep learning method to approximate the potential solution $|q(x,t)|$ of this integrable equation. Here, the underlying laws of physics are described explicitly by this equation and embedded into the architecture with the help of automatic differentiation \cite{Baydin2018}. The physical constraints regarded as a kind of regularization are introduced into the network via this mechanism which enables us to understand the network architecture and the predicted solutions better. In addition, due to the physical constraints, the network is trained just with few data.

Specifically, the complex value solution $q(x,t)$ is formulated as $q=u+i v$, where $u(x,t)$ and $v(x,t)$ are real-valued functions of $x,t$, and real part and imaginary part of $q(x,t)$, respectively. Then, Eq. \eqref{E1} can be converted into
\begin{equation}\label{E2}
u_t+\alpha v_{xx} + \beta (u^2+v^2)v=0,
\end{equation}
\begin{equation}\label{E3}
v_t-\alpha u_{xx} - \beta (u^2+v^2)u=0.
\end{equation}

Accordingly, We define the residuals $f_u(x, t)$ and $f_v(x, t)$ respectively
\begin{equation}\label{E4}
f_u := u_t+\alpha v_{xx} + \beta (u^2+v^2)v,
\end{equation}
\begin{equation}\label{E5}
f_v := v_t-\alpha u_{xx} - \beta (u^2+v^2)u,
\end{equation}
and the solution $q(x,t)$ is trained to satisfy the networks \eqref{E4} and \eqref{E5} which are embedded into the mean-squared objective function (also called loss function)
\begin{equation}\label{E6}
Loss=Loss_u+Loss_v+Loss_{f_u}+Loss_{f_v},
\end{equation}
where
\begin{equation}\label{E7}
Loss_u=\frac{1}{N_q}\sum^{N_q}_{i=1}|u(x_u^i,t_u^i)-u^i|^2,
\end{equation}
\begin{equation}\label{E8}
Loss_v=\frac{1}{N_q}\sum^{N_q}_{i=1}|v(x_v^i,t_v^i)-v^i|^2,
\end{equation}
\begin{equation}\label{E9}
Loss_{f_u}=\frac{1}{N_f}\sum^{N_f}_{j=1}|f_u(x_{f_u}^j,t_{f_u}^j)|^2,
\end{equation}
and
\begin{equation}\label{E10}
Loss_{f_v}=\frac{1}{N_f}\sum^{N_f}_{j=1}|f_v(x_{f_v}^j,t_{f_v}^j)|^2.
\end{equation}
Here the initial and boundary value data about $q(x,t)$ are denoted by $\{x^i_u,t^i_u,u^i\}^{N_q}_{i=1}$ and $\{x^i_v,t^i_v,v^i\}^{N_q}_{i=1}$. Similarly, the collocation points for $f_u(x,t)$ and $f_v(x,t)$ are specified as $\{x_{f_u}^j,t_{f_u}^j\}^{N_{f}}_{j=1}$ and $\{x_{f_v}^j,t_{f_v}^j\}^{N_{f}}_{j=1}$ which are sampled using the classical latin hypercube sampling (LHS) technique \cite{Stein1987}. The Loss function \eqref{E6} corresponds to the initial-boundary data and the residuals imposed by Eq. \eqref{E4} and \eqref{E5} at a finite set of collocation points sampled. Specifically, the first and second terms on the right hand side of Eq. \eqref{E6} attempt to fit the solution data, and the third and fourth terms learn to satisfy the residuals $f_u$ and $f_v$. The convergence of the loss function has been analyzed in previous works \cite{Choromanska2015}.

In this paper, we optimize all loss functions simply using the L-BFGS algorithm which is a full-batch gradient-based optimization algorithm based on a quasi-Newton method \cite{Liu1989}. In addition, we use relatively simple multilayer perceptrons (MLPs) with the Xavier initialization and the hyperbolic tangent ($\tanh$) activation function \cite{Li2020}. All codes in this article are based on Python 3.7 and Tensorflow 1.15, and all numerical examples reported here are run on a DELL Precision 7920 Tower computer with 2.10 GHz 8-core Xeon Silver 4110 processor and 64 GB memory.

\section{Soliton solutions and breather solution of the nonlinear Schr\"odinger equation}

The (1+1)-dimensional focusing nonlinear Schr\"odinger equation is a classical integrable field equation for describing quantum mechanical systems, nonlinear wave propagation in optical fibers or waveguides, Bose-Einstein condensates and plasma waves. In optics, the nonlinear term is generated by the intensity dependent index of a given material. Similarly, the nonlinear term for Bose-Einstein condensates is the result of the mean-field interactions about the interacting N-body system. We consider the focusing nonlinear Schr\"odinger equation along with Dirichlet boundary conditions given by
\begin{equation}\label{E11}
\begin{split}
\begin{cases}
iq_t+q_{xx}+2|q|^2q=0,x\in[x_0,x_1],t\in[t_0,t_1],\\
q(x,t_0)=q_0(x),\\
q(x_0,t)=q(x_1,t),\\
\end{cases}
\end{split}
\end{equation}
where $q_0(x)$ is an arbitrary complex-valued function of space variable $x$, $x_0,x_1$ represent the lower and upper boundaries of $x$ respectively, and $t_0,t_1$ represent the initial and terminal time instants of $t$ respectively. In addition, this equation corresponds to Eq. \eqref{E1} with $\alpha=1$ and $\beta=2$. Eq. \eqref{E11} is often used to describe the evolution of weakly nonlinear dispersive wave modulation. In view of the characteristic of its solution, it is called "self focusing" nonlinear Schr\"odinger equation. For water wave modulation, there is usually coupling between modulation and wave induced current, so in some cases, water wave modulation can also be described by the nonlinear Schr\"odinger equation \cite{Peregrine1983}. The N-soliton solutions and breather solution of the above equation have been obtained by many different methods \cite{Hirota2004,Matveev1991,Yang2010}. Here, we simulate the soliton solutions and breather solution using the physically constrained deep learning method, and compare them with the known exact solutions, so as to prove the effectiveness of solving the numerical solutions $q(x,t)$ by neural networks. Specifically, the N-soliton solution of nonlinear Schr\"odinger equation have been derived by the Riemann Hilbert method \cite{Yang2010}, and the N-soliton solution is formed as
\begin{equation}\label{E12}
q(x,t)=-2i\frac{\mathrm{det}R}{\mathrm{det}M},
\end{equation}
where $M$ is a matrix of $N\times N$,
\begin{equation}\label{E13}
M=\begin{bmatrix}  M_{11} & M_{12} & \cdots &M_{1N} \\ M_{21} & M_{22} & \cdots &M_{2N} \\ \vdots & \vdots &\vdots&\vdots \\ M_{N1} & M_{N2} & \cdots & M_{NN} \\\end{bmatrix},
\end{equation}
with
\begin{equation}\label{E14}
M_{jk}=\frac{e^{-(\theta_k+\theta^*_j)}+c^*_jc_ke^{\theta_k+\theta^*_j}}{\zeta^*_j-\zeta_k},\quad j,k=1\cdots N,
\end{equation}
and $R$ is a matrix of $(N+1)\times(N+1)$,
\begin{equation}\label{E15}
R=\begin{bmatrix} 0 &c_1e^{\theta_1} & \cdots & c_Ne^{\theta_N} \\   e^{-\theta^*_1}& M_{11} &\cdots &M_{1N} \\ \vdots & \vdots &\vdots&\vdots \\ e^{-\theta^*_N} & M_{N1} & \cdots & M_{NN} \\\end{bmatrix},
\end{equation}
with $\theta_k=-i\zeta_kx-2i\zeta^2_kt (k=1\cdots N)$, $\zeta_k$ and $c_i (i=1\cdots N)$ are complex value constants. After taking the positive integer $N$, one can obtain the corresponding N-soliton solutions and breather solution of the nonlinear Schr\"odinger Eq. \eqref{E11}.
\subsection{One-soliton solution}
\quad

In this subsection, we numerically construct one-soliton solution of Eq. \eqref{E11} based on the neural network structure with 9 hidden layers and 40 neurons per hidden layer. When $N=1$, we have $R=\left(\begin{array}{cc}0 & c_1e^{\theta_1} \\ e^{-\theta^*_1} & M_{11} \\ \end{array}\right), M_{11}=\frac{e^{-(\theta_1+\theta^*_1)}+c^*_1c_1e^{\theta_1+\theta^*_1}}{\zeta_1^*-\zeta_1}, \mathrm{det}R=-c_1e^{\theta_1-\theta^*_1}, \mathrm{det}M=M_{11}$, so the solution \eqref{E12} is
\begin{equation}\label{E16}
q(x,t)=-2i\frac{\mathrm{det}R}{\mathrm{det}M}=2i(\zeta_1^*-\zeta_1)\frac{c_1e^{\theta_1-\theta^*_1}}{e^{-(\theta_1+\theta^*_1)}+|c_1|^2e^{\theta_1+\theta^*_1}}.
\end{equation}

Letting $$\zeta_1=\xi+i\eta,\quad c_1=e^{-2\eta x_0+i\sigma_0},$$
where $\xi, \eta$ are the real and imaginary parts of $\zeta_1$ respectively, and $x_0, \sigma_0$ are real parameters. Then the above one-soliton solution \eqref{E16} can be reduced to
\begin{equation}\label{E17}
q(x,t)=2\eta\mathrm{sech}[2\eta(x+4\xi t-x_0)]e^{[-2i\xi x-4i(\xi^2-\eta^2)t+i\sigma_0]}.
\end{equation}

One can obtain the exact one-soliton solution of the nonlinear Schr\"odinger Eq. \eqref{E11} after taking $\eta=1,\xi=1,x_0=0,\sigma_0=1$ into \eqref{E17} as follows
\begin{equation}\label{E18}
q(x,t)=2\mathrm{sech}(8t+2x)e^{(-2ix+i)}.
\end{equation}

Then we take $[x_0,x_1]$ and $[t_0,t_1]$ in Eq. \eqref{E11} as $[-5.0,5.0]$ and $[-0.5,0.5]$, respectively. The corresponding initial condition is obtained by substituting a specific initial value into \eqref{E18}
\begin{equation}\label{E19}
q_0(x)=2\mathrm{sech}(2x-4)e^{(-2ix+i)}.
\end{equation}

We employ the traditional finite difference shcemes on even grids in MATLAB to simulate Eq. \eqref{E11} with the initial data \eqref{E19} to acquire the training data. Specifically, dividing space $[-5.0,5.0]$ into 513 points and time $[-0.5,0.5]$ into 401 points, one-soliton solution $q$ is discretized into $401$ snapshots accordingly. We sub-sample a smaller training dataset that contain initial-boundary subsets by randomly extracting $N_q=100$ from original initial-boundary data and $N_f=10000$ collocation points which are generated by LHS \cite{Stein1987}. After giving a dataset of initial and boundary points, the latent one-soliton solution $q(x,t)$ is successfully learned by tuning all learnable parameters of the neural network and regulating the loss function \eqref{E6}. The model achieves a relative $\mathbb{L}_2$ error of 2.566069$\mathrm{e}-$02 in about $726$ seconds, and the number of iterations is 8324.

In Fig. 1, the density diagrams, the figures at different instants of the latent one-soliton solution $q(x,t)$, the error diagram about the difference between exact one-soliton solution and hidden one-soliton solution, and the loss curve figure are plotted respectively. The (a) of Fig. 1 clearly compares the exact solution with the predicted spatiotemporal solution. Obviously, combining with the (b), we can see that the error between the numerical solution and the exact solution is very small. We particularly present a comparison between the exact solution and the predicted solution at different time instants $t = -0.25, 0, 0.25$  in the bottom panel of (a). It is obvious that as time t increases, the one-soliton solution propagates along the negative direction of the $x$-axis. The three dimensional motion of the predicted solution and the loss curve at different iterations are given out in detail in (c) and (d) of Fig. 1. The results show that the loss curve is very smooth which proves the effectiveness and stability of the integrable deep learning method.
\begin{figure}
\centering
\includegraphics[width=6.5cm,height=5cm]{f1.eps}
$a$
\includegraphics[width=6.5cm,height=5cm]{f2.eps}
$b$\\
\includegraphics[width=6.5cm,height=5cm]{f3.eps}
$c$
\includegraphics[width=6.5cm,height=5cm]{f4.eps}
$d$
\caption{The one-soliton solution $q(x,t)$: (a) The density diagrams and figures at three different instants, respecitvely; (b) The error density diagram; (c) The three-dimensional motion; (d) The loss curve figure.}
\end{figure}

\subsection{Two-soliton solution and breather solution}
\quad

Now, we numerically construct the two-soliton solution and breather solution of Eq. \eqref{E11} based on the neural network architecture with 9 hidden layers and 80 neurons per hidden layer. When $N=2$, the solution \eqref{E12} can also be written out explicitly. We have
$$F=\left(\begin{array}{ccc}0 & c_1e^{\theta_1} & c_2e^{\theta_2} \\ e^{-\theta^*_1} & M_{11} & M_{12} \\  e^{-\theta^*_2} & M_{21} & M_{22} \\ \end{array}\right), M=\left(\begin{array}{cc}M_{11} & M_{12} \\ M_{21} & M_{22} \\ \end{array}\right),$$
where
\begin{equation}\nonumber
\begin{split}
M_{11}=\frac{e^{-(\theta_1+\theta^*_1)}+c^*_1c_1e^{\theta_1+\theta^*_1}}{\zeta_1^*-\zeta_1}, M_{12}=\frac{e^{-(\theta_2+\theta^*_1)}+c^*_1c_2e^{\theta_2+\theta^*_1}}{\zeta_1^*-\zeta_2},\\
M_{21}=\frac{e^{-(\theta_1+\theta^*_2)}+c^*_2c_1e^{\theta_1+\theta^*_2}}{\zeta_2^*-\zeta_1},
M_{22}=\frac{e^{-(\theta_2+\theta^*_2)}+c^*_2c_2e^{\theta_2+\theta^*_2}}{\zeta_2^*-\zeta_2},\\
\end{split}
\end{equation}
with $\theta_1=-i\zeta_1x-2i\zeta^2_1t, \theta^*_1=i\zeta^*_1x+2i\zeta^{*2}_1t, \theta_2=-i\zeta_2x-2i\zeta^2_2t, \theta^*_2=-i\zeta^*_2x-2i\zeta^{*2}_2t$, $\zeta_j (j=1,2)$ are complex value constants, so one can derive the general form of two-soliton solution as follows
\begin{equation}\label{E20}
\begin{split}
q(x,t)=2i\frac{c_2M_{11}e^{\theta_2-\theta^*_2}-c_2M_{12}e^{\theta_2-\theta^*_1}-c_1M_{21}e^{\theta_1-\theta^*_2}+c_1M_{22}e^{\theta_1-\theta^*_1}}{M_{11}M_{22}-M_{12}M_{21}}.
\end{split}
\end{equation}

According to the relationship between the two-soliton solution and the breather solution, we can know that when $\mathrm{Re}(\zeta_1)\neq\mathrm{Re}(\zeta_2)$, the solution $q(x,t)$ is a two-soliton solution, and when $\mathrm{Re}(\zeta_1)=\mathrm{Re}(\zeta_2)$, the solution $q(x,t)$ degenerates into a bound state which is also called the breather solution. Given appropriate parameters
\begin{equation}\label{E21}
\zeta_1=0.1+0.7i,\quad\zeta_2=-0.1+0.4i,\quad c_1=c_2=1,
\end{equation}
we can obtain the exact two-soliton solution from the formulae \eqref{E20}
\begin{equation}\label{E22}
q(x,t)=\frac{-2iA}{B},
\end{equation}
where
\begin{equation}\nonumber
\begin{split}
A=&(0.224+0.158i)e^{i(1.92t+0.32it-0.2x-0.8ix)}-(0.224+0.232i)e^{-i(-0.6t+0.56it-0.2x+1.4ix)}+\\
&(0.224-0.232i)e^{i(0.6t+0.56it+0.2x+1.4ix)}+(0.518i-0.224)e^{-i(-1.92t+0.32it+0.2x-0.8ix)},
\end{split}
\end{equation}
and
\begin{equation}\nonumber
\begin{split}
B=1.25e^{0.88t+0.6x}+0.13e^{-0.24t-2.2x}+1.25e^{-0.88t-0.6x}-1.12e^{i(1.32t-0.4x)}-1.12e^{-i(1.32t-0.4x)}+0.13e^{0.24t+2.2x}.
\end{split}
\end{equation}

On the other hand, given other appropriate parameters
\begin{equation}\label{E23}
\zeta_1=0.7i,\quad\zeta_2=0.4i,\quad c_1=c_2=1,
\end{equation}
one can obtain the exact breather solution
\begin{equation}\label{E24}
q(x,t)=\frac{-2i(-0.246ie^{-i(-0.64t+1.4ix)}+0.462ie^{-i(-1.96t-0.8ix)}-0.264ie^{i(0.64t+1.4ix)}+0.462ie^{-i(-1.96t+0.8ix)})}{1.21e^{-0.6x}+1.21e^{0.6x}-1.12e^{1.32it}+0.09e^{2.2x}-1.12e^{-1.32it}+0.09e^{-2.2x}}.
\end{equation}

Now we take $[x_0,x_1]$ and $[t_0,t_1]$ in Eq. \eqref{E11} as $[-5.0,5.0]$ and $[-3.0,3.0]$, respectively. For instance, we consider the initial condition of the two-soliton solution based on Eq. \eqref{E22}
\begin{equation}\label{E25}
q_0(x)=\frac{-2iA'}{B'},
\end{equation}
where
\begin{equation}\nonumber
\begin{split}
A'=&(0.224+0.158i)e^{i(-5.76-0.96i-0.2x-0.8ix)}-(0.224+0.232i)e^{-i(1.8-1.68i-0.2x+1.4ix)}+\\
&(0.224-0.232i)e^{i(-1.8-1.68i+0.2x+1.4ix)}+(0.518i-0.224)e^{-i(5.76-0.96i+0.2x-0.8ix)},
\end{split}
\end{equation}
and
\begin{equation}\nonumber
\begin{split}
B'=1.25e^{-2.64+0.6x}+0.13e^{0.72-2.2x}+1.25e^{2.64-0.6x}-1.12e^{i(-3.96-0.4x)}-1.12e^{-i(-3.96-0.4x)}+0.13e^{-0.72+2.2x}.
\end{split}
\end{equation}

Similarly, the initial condition of the breather solution is given
\begin{equation}\label{E26}
q_0(x)=\frac{-2i\left(-0.246ie^{-i(1.92+1.4ix)}+0.462ie^{-i(5.88-0.8ix)}-0.264ie^{i(-1.92+1.4ix)}+0.462ie^{-i(5.88+0.8ix)}\right)}{1.21e^{-0.6x}+1.21e^{0.6x}-1.12e^{-3.96i}+0.09e^{2.2x}-1.12e^{3.96i}+0.09e^{-2.2x}}.
\end{equation}

With the same data generation and sampling method in Section 3.1, we numerically simulate the two-soliton solution and the breather solution of the nonlinear Schr\"odinger equation \eqref{E11} using the physically-constrained deep learning method mentioned above. After training the two-soliton solution, the neural network achieves a relative $\mathbb{L}_2$ error of 5.500792$\mathrm{e}-$02 in about $2565$ seconds, and the number of iterations is 17789. However, the network model for learning breather solution achieves a relative $\mathbb{L}_2$ error of 9.689267$\mathrm{e}-$03 in about $1934$ seconds, and the number of iterations is 13488. Apparently, since the breather solution is a special form of the two-soliton solution and accordingly the solution structure is simpler, the training of the breather solution takes remarkably less time, the relative error is obviously smaller, and moreover the result is better than that of the two-soliton solution from Fig. 2 and Fig. 3.

Fig. 2 and Fig. 3 show the density diagrams, the profiles at different instants and error density diagrams of the two-soliton solution and the breather solution, respectively. From the bottom panel of $(a)$ in Fig. 2, we can clearly see that the intersection of two solitary waves with different wave widths and amplitudes produces a peak of a higher amplitude different from the former two solitary waves, which satisfies the law of conservation of energy. We reveal the profiles of the three moments at $t=-1.50,0,1.50$, respectively, and find that the amplitude is the largest when $t=0$. From soliton theory, we know that the two solitary waves have elastic collision. Similarly, one can look at the breather solution shown in $(a)$ of Fig. 3 is a special bound state two-soliton solution formed by two solitary waves with the same wave velocity, wave width and amplitude, and has a periodic motion with respect to time $t$. The $(b)$ of Fig. 2 and Fig. 3 show the error dynamics of the difference between the exact solution and the predicted solution for the two-soliton solution and the breather solution, respectively. In Fig. 4, the corresponding three dimensional motion of the two-soliton solution and the breather solution are shown, respectively. It is evident that the breather solution is more symmetric than the general two-soliton solution.
\begin{figure}
\centering
\includegraphics[width=6.5cm,height=5cm]{f5.eps}
$a$
\includegraphics[width=6.5cm,height=5cm]{f6.eps}
$b$
\caption{The two-soliton solution $q(x,t)$: (a) The density diagrams and the profiles at different moments; (b) The error density diagram.}
\end{figure}

\begin{figure}
\centering
\includegraphics[width=6.5cm,height=5cm]{f7.eps}
$a$
\includegraphics[width=6.5cm,height=5cm]{f8.eps}
$b$
\caption{The breather solution $q(x,t)$: (a) The density diagrams and the profiles at different moments; (b) The error density diagram.}
\end{figure}

\begin{figure}
\centering
\includegraphics[width=6.5cm,height=5cm]{f9.eps}
$a$
\includegraphics[width=6.5cm,height=5cm]{f10.eps}
$b$
\caption{The three dimensional motion of $q(x,t)$: (a) the two-soliton solution; (b) the breather solution.}
\end{figure}

For the numerical simulation of the three-soliton solution, we only need to take $N=3$ in Eqs. \eqref{E12}-\eqref{E15} to get the exact solution of the three-soliton solution, and then discretize the initial and boundary value data of the exact solution as our original dataset and train our network to simulate the corresponding three-soliton solution numerically. Similarly, N-soliton solutions can be learned by the same approach. Of course, the higher the order of soliton solution, the more complex the form of the solution, then the longer the resulting network training time takes.

\section{Rogue wave solutions of the nonlinear Schr\"odinger equation}

Recently, the research of rogue wave has been one of the hot topics in many areas such as optics, ocean dynamics, plasma, Bose-Einstein condensate and even finance \cite{ Solli2007,Chabchoub2011,Bludov2009,Moslem2011,Yan2011}. In addition to the peak amplitude more than twice of the background wave, rogue waves also have the characteristics of instability and unpredictability. Therefore, the study and application of rogue waves play a momentous role in real life, especially in avoiding the damage to ships caused by ocean rogue waves. As an one-dimensional integrable scalar equation, the nonlinear Schr\"odinger equation plays a key role in describing rogue waves. In 1983, Peregrine \cite{Peregrine1983} first gave a rational rogue waves to the nonlinear Schr\"odinger equation, whose generation principle is identified as the evolution of the breather waves when the period tends to infinity. At present, the researches on rogue wave of this equation through data-driven methods, such as machine learning, are relatively less. Marcucci et al.  \cite{Marcucci2020} have studied the computational machine in which nonlinear waves replace the internal layers of neural networks, discussed learning conditions, and demonstrated functional interpolation, datasets, and Boolean operations. When considering the solitons, rogue waves and shock waves of the nonlinear Schr\"odinger equation, highly nonlinear and even discontinuous regions play a leading role in the network training and solution calculation. In this section, we construct the rogue wave solutions of the nonlinear Schr\"odinger equation by the neural network with underlying physical constraints. Here, we consider the another form of focusing nonlinear Schr\"odinger equation along with Dirichlet boundary conditions given by
\begin{equation}\label{E27}
\begin{split}
\begin{cases}
iq_t+\frac{1}{2}q_{xx}+|q|^2q=0,x\in[x_0,x_1],t\in[t_0,t_1],\\
q(x,t_0)=q_0(x),\\
q(x_0,t)=q(x_1,t),\\
\end{cases}
\end{split}
\end{equation}
where $q_0(x)$ is an arbitrary complex-valued function of space variable $x$, here $x_0,x_1$ represent the lower and upper boundaries of $x$ respectively, and $t_0,t_1$ represent the initial and terminal time instants of $t$ respectively. In addition, this equation corresponds to Eq. \eqref{E1} with $\alpha=\frac{1}{2}$ and $\beta=1$. The rogue wave solutions of Eq. \eqref{E27} can be obtained by lots of different tools \cite{Akhmediev2009}. Therefore, we can get respectively the one-order rogue wave and the two-order rogue wave of Eq. \eqref{E27} as follows
\begin{equation}\label{E28}
q(x,t)=\left[1-\frac{4(1+2it)}{4t^2+4x^2+1}\right]e^{it},
\end{equation}
and
\begin{equation}\label{E29}
q(x,t)=\left(1+\frac{G+itH}{D}\right)e^{it},
\end{equation}
where
\begin{equation}\nonumber
\begin{split}
&G=\frac38-3x^2-2x^4-9t^2-10t^4-12t^2x^2,\\
&H=\frac{15}{4}+6x^2-4x^4-2t^2-4t^4-8t^2x^2,\\
&D=\frac{3}{32}+\frac98x^2+\frac12x^4+\frac23x^6+\frac{33}{8}t^2+\frac92t^4+\frac23t^6-3t^2x^2+2t^2x^4+2t^4x^2.
\end{split}
\end{equation}

In the two following parts, we will construct the training dataset to reconstruct our predicted solutions based on the above two rogue wave solutions by constructing a neural network with 9 hidden layers and 40 neurons per hidden layer.

\subsection{One-order rogue wave}
\quad

In this subsection, we will numerically uncover the one-order rogue wave of the nonlinear Schr\"odinger equation using the neural network method above. Now, we take $[x_0,x_1]$ and $[t_0,t_1]$ in Eq. \eqref{E27} as $[-2.0,2.0]$ and $[-1.5,1.5]$, respectively. The corresponding initial condition is obtained from \eqref{E28}, we have
\begin{equation}\label{E30}
q_0(x)=\left(1+\frac{-4+12i}{4x^2+10}\right)e^{-1.5i}.
\end{equation}

Next, we obtain the initial and boundary value dataset by the same data discretization method in Section 3.1, and then we can simulate precisely the one-order rogue wave solution by feeding the data into the network. By randomly subsampling $N_q=100$ from the original dataset and selecting $N_f=10000$ configuration points which are generated by LHS, a training dataset composed of initial-boundary data and collocation points is generated. After training, the neural network model achieves a relative $\mathbb{L}_2$ error of 7.845201$\mathrm{e-}$03 in about $871$ seconds, and the number of iterations is 9584.

Our experiment results are summarized in Fig. 5, and we simulate the solution $q(x,t)$ and then obtain the density diagrams, profiles at different instants, error dynamics diagrams, three dimensional motion and loss curve figure of the one-order rogue wave. Specifically, the magnitude of the predicted spatio-temporal solution $|q(x,t)|$ is shown in the top panel of (a) of Fig. 5. It can be simply seen that the amplitude of the rogue wave solution changes greatly in a very short time from the bottom panel of (a) in Fig. 5. Meanwhile, we present a comparison between the exact and the predicted solution at different time instants $t=-0.75, 0, 0.75$. (b) of Fig. 5 reveals the relative $\mathbb{L}_2$ error becomes larger as the time increases. From (d) of Fig. 5, we can observe that when the number of iterations is more than 2000, there are some obvious fluctuations which we could call "burr" in the training, it does not exist during the training process about the one-soliton solution of the nonlinear Schr\"odinger equation. With only a handful of initial-boundary data, one can accurately capture the intricate nonlinear dynamical behavior of the integrable Schr\"odinger equation by this method.
\begin{figure}
\centering
\includegraphics[width=6.5cm,height=5cm]{f11.eps}
$a$
\includegraphics[width=6.5cm,height=5cm]{f12.eps}
$b$\\
\includegraphics[width=6.5cm,height=5cm]{f13.eps}
$c$
\includegraphics[width=6.5cm,height=5cm]{f14.eps}
$d$
\caption{The one-order rogue wave solution $q(x,t)$: (a) The density diagram and profiles at three different instants; (b) The error density diagram; (c) The three-dimensional motion; (d) The loss curve.}
\end{figure}

In addition, based on the same initial and boundary values of the one-order rogue waves in the case of $N_q=100$ and $N_f=10000$, we employ the control variable method often used in applied sciences to study the effects of different numbers of network layers and neurons per hidden layer on the one-order rogue wave dynamics of nonlinear Schr\"odinger equation. The relative $\mathbb{L}_2$ errors of different network layers and different neurons per hidden layer are given in Table 1. From the data in Table 1, we can see that when the number of network layers is fixed, the more the number of single-layer neurons, the smaller the relative error becomes. Due to the influence of randomness caused by some factors, there are some cases that do not conform with the above conclusion. However, when the number of single-layer neurons is fixed, the influence of the number of network layers on the relative error is not obvious. To sum up, we can draw the conclusion that the network layers and the single-layer neurons jointly determine the relative $\mathbb{L}_2$ error to some extent. In the case of the same training dataset, Table 2 shows the relative $\mathbb{L}_2$ error with 9 network layers and 40 neurons per hidden layer when taking different numbers of subsampling points $N_q$ in the initial-boundary data and collocation points $N_f$. From the Table 2, we can see that the influence of $N_q$ on the relative $\mathbb{L}_2$ error of the network is not obvious, which also indicates the network model with physical constraints can uncover accurate predicted solutions with smaller initial-boundary data and relatively many sampled collocation points.

\begin{table}[htbp]
  \caption{One-order rogue wave of the nonlinear Schr$\mathrm{\ddot{o}}$dinger equation: Relative final prediction error estimations in the $\mathbb{L}_2$ norm for different numbers of network layers and neurons per hidden layer.}
  \centering
  \begin{tabular}{p{3.38cm}|p{2cm}p{2cm}p{2cm}p{2cm}p{2cm}}
  \toprule
  \textbf{\diagbox{Layers}{Neurons}} &\textbf{\quad\quad20} &\textbf{\quad\quad30} &\textbf{\quad\quad40} &\textbf{\quad\quad50} &\textbf{\quad\quad60}\\
  \midrule
  \textbf{5}   &2.765905e-03&2.903368e-04&4.961406e-04&5.232502e-04&9.323978e-04\\
  \textbf{7}   &2.699082e-03&1.328768e-03&4.030658e-04&3.633812e-04&1.448091e-03\\
  \textbf{9}   &2.732954e-03&2.618465e-03&7.845201e-03&6.880915e-04&6.797486e-04\\
  \textbf{11}  &4.641999e-03&1.779715e-03&1.440061e-03&9.148106e-04 &1.581767e-03\\
  \bottomrule
  \end{tabular}
\end{table}

\begin{table}[htbp]
  \caption{One-order rogue wave of the nonlinear Schr$\mathrm{\ddot{o}}$dinger equation: Relative final prediction error measurements in the $\mathbb{L}_2$ norm for different numbers of $N_q$ and $N_f$.}

  \centering
  \begin{tabular}{p{1.35cm}|p{2cm}p{2cm}p{2cm}p{2cm}p{2cm}}
  \toprule
  \textbf{\diagbox{$N_q$}{$N_f$}} &\textbf{\quad6000} &\textbf{\quad8000} &\textbf{\quad10000} &\textbf{\quad12000} &\textbf{\quad14000}\\
  \midrule
  \textbf{80}    &1.473695e-02&9.200569e-03&7.967294e-03&6.034213e-03&3.575678e-03\\
  \textbf{100}   &1.176106e-02&3.082057e-03&7.845201e-03&5.495886e-03&1.332274e-02\\
  \textbf{120}   &1.525780e-02&1.265775e-02&4.175621e-02&2.402183e-03&6.568740e-03\\
  \bottomrule
  \end{tabular}
\end{table}

\subsection{Two-order rogue wave}
\quad

In the next example, we consider the two-order rogue wave of the nonlinear Schr\"odinger equation, and properly take $[x_0,x_1]$ and $[t_0,t_1]$ in Eq. \eqref{E27} as $[-2.0,2.0]$ and $[-0.5,0.5]$. Here we consider the corresponding initial condition from \eqref{E29} as follows
\begin{equation}\label{E31}
q_0(x)=\left[1+\frac{-70.5-30x^2-2x^4-1.5i(-21-12x^2-4x^4)}{39.75+4.5x^2+5x^4+\frac23x^6}\right]e^{-1.5i}.
\end{equation}

We use the same data discretization method in Section 3.1 to collect the initial and boundary data. In the network architecture, initial and boundary training dataset of $N_q=100$ are randomly subsampled from the original initial-boundary data. In addition, configuration points of $N_f=10000$ are sampled by LHS. Finally, the hidden two-order rogue wave solution of nonlinear Schr\"odinger equation is approximated fairly accurately by constraining the loss function with underlying physical laws. The neural network model achieves a relative $\mathbb{L}_2$ error of 1.665401$\mathrm{e-}$02 in about $1090$ seconds, and the number of iterations is 11450.

The detailed illustration is shown in Fig. 6. The top panel of (a) of Fig. 6 gives the density map of hidden solution $q(x,t)$, and when combing (b) of Fig. 6 with the bottom panel of (a) in Fig. 6, we can see that the relative error is relatively large at t = 0.25. From (d) of Fig. 6, in contrast with the one-order rogue wave solution, the fluctuation (burr phenomenon) of the loss function is obvious when the number of iterations is less than 3000.

\begin{figure}
\centering
\includegraphics[width=6.5cm,height=5cm]{f15.eps}
$a$
\includegraphics[width=6.5cm,height=5cm]{f16.eps}
$b$\\
\includegraphics[width=6.5cm,height=5cm]{f17.eps}
$c$
\includegraphics[width=6.5cm,height=5cm]{f18.eps}
$d$
\caption{The two-order rogue wave solution $q(x,t)$: (a) The density diagrams and the snapshots at three different instants; (b) The error density diagram; (c) The three-dimensional motion; (d) The loss curve figure.}
\end{figure}

\section{Conclusion}

In this paper, we introduce a physically-constrained deep learning method based on PINN to solve the classical integrable nonlinear Schr\"odinger equation. Compared with traditional numerical methods, it has no mesh size limits. Moreover, due to the physical constraints, the network is trained with just few data and has a better physical interpretability. This method showcases a series of results of various problems in the interdisciplinary field of applied mathematics and computational science which opens a new path for using deep learning to simulate unknown solutions and correspondingly discover the parametric equations in scientific computing.

Specifically, we apply the data-driven algorithm to deduce the soliton solutions, breather solution and rogue wave solutions to the nonlinear Schr\"odinger equation. We outline how different types of solutions (such as general soliton solutions, breather solution and rogue wave solutions) are generated due to different choices of initial and boundary value data. Remarkably, these results show that the deep learning method with physical constraints can exactly recover different dynamical behaviors of this integrable equation. Furthermore, the sizes of space-time variable $x$ and $t$ interval are selected by the dynamical behaviors of these solutions. For the breathers, in particular, the wider the interval of time variable $t$, the better we can see the dynamical behavior in this case. However, with a wider range of time interval $t$, the training effect is not very good. So more complex boundary conditions, such as Neumann boundary conditions, Robin boundary conditions or other mixed boundary conditions, may be considered. Similarly, for the integrable complex modified Korteweg-de Vries (mKdV) equation, the Dirichlet boundary conditions can not recover the ideal rogue wave solutions.

The influence of noise on our neural network model is not introduced in this paper. This kind of physical factors in real life should be considered to show the network's robustness. Compared with static LHS sampling with even mesh sizes, more adaptive sampling techniques should be considered in some special problems, for example, discontinuous fluid flows such as shock wave. In addition, more general nonlinear Schr\"odinger equation, such as the derivative Schr\"odinger equation, is not investigated in this work. These new problems and improvements will be considered in the future research.


\section{Introduction}

It is an important problem in algebraic geometry and in differential geometry to decide if a given Fano variety $X$ admits a K\"ahler--Einstein (KE) metric. The Yau--Tian--Donaldson (YTD) Conjecture predicts that the existence of a KE metric on $X$ is equivalent to the K-polystability of $X$.
Using Cheeger--Colding--Tian theory, the YTD Conjecture was first proved when $X$ is smooth \cite{chen_donaldson_sun, tian, berman_polystability}, when $X$ is $\mathbb{Q}$-Gorenstein smoothable \cite{LWX19, SSY16}, or when $X$ has dimension $2$ \cite{ltw_1}. Later, a different method, namely the variational approach, was introduced in \cite{BBJ15}. The analytic side of the variational approach was completed in \cite{ltw_2, Li19} which shows that a $\mathbb{Q}$-Fano variety $X$, that is, a Fano variety with klt singularities, admits a KE metric if and only if $X$ is reduced uniformly K-stable, a concept introduced in \cite{His16} as an equivariant version of uniform K-stability (see also \cite{XZ19}). Recently, using purely algebro-geometric methods, the work \cite{LXZ21} establishes the equivalence between K-polystability and reduced uniform K-stability. This work, combining with the variational approach, proves the YTD Conjecture for all $\mathbb{Q}$-Fano varieties.

K-stability of del Pezzo surfaces which are quasi-smooth hypersurfaces in weighted projective $3$-spaces has been studied extensively.
Johnson and Koll\'ar \cite{kollar_johnson} classified those which are anticanonically polarised (i.e.\ have Fano index $1$) and decided the existence of a KE metric on many of these, by using Tian's criterion which relates KE metrics to global log canonical thresholds (also called $\alpha$-invariants) \cite{tian_alpha, nadel_annals, demailly_kollar, cheltsov_lct, odaka_sano_alpha, Fuj19b}.
This method was applied to most of these del Pezzo surfaces by Araujo~\cite{araujo_del_pezzo}, Boyer--Galicki--Nakamaye~\cite{boyer_galicki_nakamaye}, and Cheltsov--Park--Shramov~\cite{cheltsov_park_shramov_exceptional}.
One case was missing and was finally solved in \cite{cheltsov_park_shramov_delta} by using delta invariants
(see \cite{fujita_odaka_delta, blum_jonsson}).

The (non-)existence of KE metrics on many del Pezzo surfaces which are quasi-smooth hypersurfaces in weighted projective $3$-spaces with Fano index $\geq 2$ has been studied in \cite{cheltsov_park_shramov_exceptional, cheltsov_park_shramov_delta, del_pezzo_zoo, kim_won}.

In this paper, we study K-polystability of quasi-smooth degree $2a$ hypersurfaces in the weighted projective space $\PP(1,1,a,a)$. When $a\in \{2,4\}$, such del Pezzo surfaces are $\mathbb{Q}$-Gorenstein smoothable, and their K-polystability was determined by Mabuchi--Mukai \cite{MM93} and Odaka--Spotti--Sun \cite{odaka_spotti_sun} (see Remark \ref{rem:a=2or4}). To the authors' knowledge it is not known if they are K-polystable for an integer $a=3$ or $a \geq 5$.
In \cite{kim_won} Kim and Won conjecture that these surfaces are K-polystable and not K-stable.

Our main result relates the K-polystability (resp.\ K-semistability) of degree $2a$ hypersurfaces in $\PP(1,1,a,a)$ to GIT polystability (resp.\ GIT semistability) of degree $2a$ binary forms (see \cite[Chapter~4]{git}).

\begin{theorem} \label{thm:k=git}
	Let $a \geq 2$ be an integer and
	let $\bP(1,1,a,a)$ be the weighted projective space with coordinates $[x, y, z, w]$ with weights $\deg x = \deg y = 1$ and $\deg z = \deg w = a$. Let $X$ be a hypersurface of degree $2a$ in $\bP(1,1,a,a)$.

	Then $X$ is K-semistable (resp.\ K-polystable) if and only if, after an automorphism of $\bP(1,1,a,a)$, the equation of $X$ is given by $z^2+w^2+g(x,y)=0$ where $g\neq 0$ is GIT semistable (resp.\ GIT polystable) as a degree $2a$ binary form.
	Moreover, $X$ is not K-stable.
\end{theorem}

As a consequence we prove the K-polystability of quasi-smooth hypersurfaces in $\PP(1,1,a,a)$ of degree $2a$, hence partially confirming \cite[Conjecture~1.3]{kim_won}.

\begin{cor} \label{cor:k-poly}
Let $a \geq 2$ be an integer and let $X$ be a degree $2a$ quasi-smooth hypersurface in $\PP(1,1,a,a)$. Then $X$ is K-polystable and not K-stable. Moreover, $X$ admits a KE metric.
\end{cor}

Recently the result of this corollary has been independently  announced by Viswanathan using different methods.

It is possible to give a proof of K-polystability for a general hypersurface in $\PP(1,1,a,a)$ of degree $2a$, when $a$ is odd, by analysing the deformation theory of the toric surface appearing in Proposition~\ref{prop:toric} similarly to \cite{ask_petracci} and without using Theorem~\ref{thm:k=git}.

\subsection*{Notation and conventions}
We always work over $\CC$.
A \emph{del Pezzo surface} is a normal projective surface whose anticanonical divisor is $\QQ$-Cartier and ample.
Every toric variety we consider is normal.
We do not even try to write down the definitions of K-(poly/semi)stability of Fano varieties and of log Fano pairs:
we refer the reader to the excellent survey \cite{xu_survey}, the paper \cite{ADL19}, and to the references therein.

\subsection*{Acknowledgements}
The second author wishes to thank Anne-Sophie Kaloghiros for many fruitful conversations and Yuji Odaka for helpful e-mail exchanges;
he is grateful also to Ivan Cheltsov and Jihun Park for useful remarks on an earlier draft of this manuscript and for sharing a preliminary version of \cite{kim_won}. The first author is partially supported by the NSF Grant DMS-2001317.

\section{Proofs}

In what follows $a$ is a fixed integer greater than $1$.
We consider the weighted projective space $\PP(1,1,a,a)$ with coordinates $[x, y, z, w]$ with weights $\deg x = \deg y = 1$ and $\deg z = \deg w = a$.

\begin{comment}
\subsection{Some surface singularities}

If $a$ and $b$ are integers such that $1 \leq b < a$ and $\gcd(a,b)=1$, then $\frac{1}{a}(1,b)$ denotes the isolated surface singularity given by the quotient of $\AA^2$ under the action of $\boldsymbol{\mu}_a$ with weights $(1,b)$. It is a toric affine variety.

\subsubsection{} Fix an integer $a \geq 2$.
The singularity $\frac{1}{a}(1,a-1)$ is the hypersurface
\[
U = \Spec \CC[x,y,z] / (xy-z^a).
\]
It is Gorenstein and its miniversal ($\QQ$-Gorenstein) deformation is given by the equation
\[
xy - z^a - \sum_{i=2}^a t_i z^{a-i} = 0
\]
over the smooth germ $\CC \pow{t_2, \dots, t_a}$.
The sheaf $\cTqG{1}{U}$ is supported on the singular point and has length $a-1$.
 $U$ is a toric variety: consider
the action of the torus $(\mathbb{G}_\mathrm{m})^2$ on $U$ given by
\[
(\lambda_1, \lambda_2) \cdot (x,y,z) = ( \lambda_1 x , \lambda_1^{-1} \lambda_2^a y, \lambda_2 z).
\]
Thanks to this action, the vector space $\cTqG{1}{U}$ is a representation of $(\mathbb{G}_\mathrm{m})^2$
and it splits into the direct sum of the irreducible representations of $(\mathbb{G}_\mathrm{m})^2$ which correspond to the characters
\[
(0,-2), \dots, (0,-a) \in \ZZ^2
\]
of $(\mathbb{G}_\mathrm{m})^2$.

\subsubsection{}
Fix an integer $a \geq 3$ such that $a \neq 4$.
The singularity $\frac{1}{a}(1,1)$ is the cone over the rational normal curve of degree $a$ and is $\QQ$-Gorenstein rigid, so its sheaf $\cTqG{1}{}$ is zero.

\subsubsection{}
The base of miniversal $\QQ$-Gorenstein deformation of the singularity $\frac{1}{4}(1,1)$ is smooth and of dimension $1$.
\end{comment}

\begin{proposition} \label{prop:toric}
If $Y$ is the hypersurface in $\PP(1,1,a,a)$ defined by the equation $zw - x^a y^a  = 0$, then $Y$ is a K-polystable toric del Pezzo surface.
\end{proposition}

\begin{proof}
	We fix the lattice $N = \ZZ^2$ and its dual $M = \Hom_\ZZ(N,\ZZ)$. Elements of $N$ will be columns and elements of $M$ will be rows.

	Let $Q$ be the convex hull of the points
	\begin{equation*}
	(0,0), \ (0,1), \ (a^{-1},0), \ ( -a^{-1},1)
	\end{equation*}
     in $M_\RR$.
	Let $\Sigma$ be the inner normal fan of $Q$; thus $\Sigma$ is the complete normal fan in $N$ whose rays are generated by the vectors
	\begin{equation} \label{eq:vertices_of_P}
	\begin{pmatrix}
	a \\ 1
	\end{pmatrix},
	\
	\begin{pmatrix}
	0 \\ 1
	\end{pmatrix},
	\
	\begin{pmatrix}
	-a \\ -1
	\end{pmatrix},
	\
	\begin{pmatrix}
	0 \\ -1
	\end{pmatrix}.
	\end{equation}
	We want to show that $Y$ is the toric variety associated to the fan $\Sigma$.

	Provisionally, let $\toric{\Sigma}$ denote the toric variety associated to $\Sigma$.
	Consider the cone $\tau$ in $M \oplus \ZZ$ spanned by $Q \times \{1\}$.
	Consider the finitely generated monoid $\tau \cap (M \oplus \ZZ)$ and the semigroup algebra $\CC[\tau \cap (M \oplus \ZZ)]$,
	which is $\NN$-graded via the projection $M \oplus \ZZ \onto \ZZ$.
	Toric geometry says that $\toric{\Sigma} = \Proj \CC[\tau \cap (M \oplus \ZZ)]$.
	One can see that the minimal set of generators of the semigroup $\tau \cap (M \oplus \ZZ)$ is made up of the vectors
	\begin{equation*}
	(0,0,1), \ (0,1,1), \ (1,0,a), \ (-1,a,a);
	\end{equation*}
	these vectors satisfy a unique relation:
	\[
	a(0,0,1) + a(0,1,1) = (1,0,a) + (-1,a,a).
	\]
	Hence the $\NN$-graded ring $\CC[\tau \cap (M \oplus \ZZ)]$ coincides with $\CC[x,y,z,w] / (zw - x^a y^a)$, where $\deg x = \deg y = 1$ and $\deg z = \deg w = a$. Therefore $Y = \toric{\Sigma}$.

	The vectors in \eqref{eq:vertices_of_P} are the vertices of a polytope $P$ in $N$. This implies that $Y$ is a del Pezzo surface, i.e.\ $-K_Y$ is $\QQ$-Cartier and ample.

	Let $P^\circ$ be the polar of $P$; thus $P^\circ$ is the convex hull of $(0, \pm 1)$ and $\pm (\frac{2}{a}, -1)$ in $M_\RR$.
	The polygon $P^\circ$ is the moment polytope of the toric boundary of $Y$, which is an anticanonical divisor.
	Since $P$ is centrally symmetric, also $P^\circ$ is centrally symmetric, thus the barycentre of $P^\circ$ is the origin. By \cite{berman_polystability} $Y$ is K-polystable.
\end{proof}

	\begin{comment}
	$Q = \frac{1}{2} \left(P^\circ + \left(0, 1 \right)\right)$ with vertices

\medskip

\end{comment}

\begin{comment}

\begin{proposition} \label{prop:hypersurfaces_are_general_in_moduli}
Let $a \geq 1$ be an odd integer and let $X$ be a quasi-smooth hypersurface in $\PP(1,1,a,a)$ of degree $2a$.
Then every small $\QQ$-Gorenstein deformation of $X$ is a quasismooth hypersurface in $\PP(1,1,a,a)$ of degree $2a$.
\end{proposition}

\begin{remark}
The conclusion of Proposition~\ref{prop:hypersurfaces_are_general_in_moduli} does not hold for $a=2$ and for $a=4$: indeed, in these two cases a quasismooth hypersurface in $\PP(1,1,a,a)$ of degree $2a$ is singular and $\QQ$-Gorenstein smoothable. We do not know what happens for even integers $a \geq 6$.
\end{remark}

\begin{proof}[Proof of Proposition~\ref{prop:hypersurfaces_are_general_in_moduli}]
	The case $a=1$ is well known and can be easily proved by adapting what follows, without having singularities and without introducing stacks.
	Thus we assume $a \geq 2$.

	For brevity let $\PP$ denote the variety $\PP(1,1,a,a)$. This is a normal projective $3$-fold whose singular locus is a smooth rational curve along which $\PP$ has transverse $\frac{1}{a}(1,1)$ singularities.
	Since $\PP$ is a normal variety with quotient singularities, there exists a unique smooth Deligne--Mumford stack $\cP$ with coarse moduli space $\PP$ such that  $\cP \to \PP$ is an isomorphism in codimension $1$ (see  \cite[(2.8)]{vistoli} and \cite[\S4.1]{fmn_toric}).
	Thus the stacky locus of $\cP$ coincides with the singular locus of $\PP$.
	In this particular case, $\cP$ is a quotient stack:
	\[
	\cP = \left[ \AA^4 \setminus \{ 0 \} \ / \ \mathbb{G}_\mathrm{m}   \right]
	\]
	where $\mathbb{G}_\mathrm{m}$ acts linearly with weights $1,1,a,a$.

	$X$ has $2$ singular points of type $\frac{1}{a}(1,1)$. Let $\mathcal{X}$ be the smooth Deligne--Mumford stack with coarse moduli space $X$ such that $\mathcal{X} \to X$ is an isomorphism in codimension $1$. The stacky locus of $\mathcal{X}$ consists of the $2$ singular points of $X$, where there is a stabiliser $\boldsymbol{\mu}_a$.

	We have a cartesian diagram
	\[
	\xymatrix{
	\mathcal{X} \ar[d] \ar[r] & \cP \ar[d] \\
	X \ar[r] & \PP
	}
	\]
	where the horizontal arrows are closed embeddings of effective Cartier divisors and the vertical arrows are the map from a Deligne--Mumford stack to its coarse moduli space.

	Since $a$ is odd, the canonical (also called `index one') cover of $\frac{1}{a}(1,1)$ is $\AA^2$. This implies that $\mathcal{X} \to X$ and $\cP \to \PP$ are canonical cover stacks \cite{abramovich_hassett}. Therefore $\QQ$-Gorenstein deformations of $X$ are the deformations which are induced by deformations of $\mathcal{X}$: $\DefqG{X} = \Def{\mathcal{X}}$.

	Let $\Hilb{X}{\PP}$ denote the infinitesimal Hilbert functor of the closed embedding $X \into \PP$. We need to show that the natural forgetful map
	\[
	\Hilb{X}{\PP} \longrightarrow \DefqG{X}
	\]
	is smooth.
	This is equivalent to show that
		\[
	\Hilb{\mathcal{X}}{\cP} \longrightarrow \Def{\mathcal{X}}
	\]
	is smooth. As $\mathcal{X}$ and $\cP$ are smooth, from an easy argument in deformation theory (see \cite[Proposition~3.2.9]{sernesi}) it is enough to show that
	$H^1(\cT_\cP \vert_{\mathcal{X}})$ vanishes, where $\cT_\cP$ is the tangent sheaf of $\cP$.

The Euler sequence
\[
0 \longrightarrow \cO_\cP \longrightarrow \cO_\cP(1)^{\oplus 2} \oplus \cO_\cP(a)^{\oplus 2} \longrightarrow \cT_\cP \longrightarrow 0
\]
consists of locally free sheaf on $\cP$.
By restricting to $\mathcal{X}$ we get the short exact sequence
\[
0 \longrightarrow \cO_\mathcal{X} \longrightarrow \cO_\mathcal{X}(1)^{\oplus 2} \oplus \cO_\mathcal{X}(a)^{\oplus 2} \longrightarrow \cT_\cP \vert_{\mathcal{X}} \longrightarrow 0.
\]
From the vanishing of $\rH^1(\cO_\mathcal{X}(1))$, of $\rH^1(\cO_\mathcal{X}(a))$, and of $\rH^2(\cO_\mathcal{X})$ we deduce the vanishing of $\rH^1(\cT_\cP \vert_{\mathcal{X}})$.
	\end{proof}
\end{comment}

\begin{remark}
\begin{enumerate}
 \item Another way to show K-polystability of $Y$ is by realising $Y\cong (\bP^1\times\bP^1)/(\mathbb{Z}/a\mathbb{Z})$, where the $\mathbb{Z}/a\mathbb{Z}$-action on $\bP^1\times\bP^1$ is given by
 \[
  \zeta\cdot ([u_0,u_1],[v_0,v_1]):=([\zeta u_0, u_1],[\zeta^{-1} v_0,v_1])\quad \textrm{with }\zeta=e^{\frac{2\pi i}{a}}.
 \]
 Since the above action is free away from finitely many points, and it preserves the product of Fubini-Study metrics on $\bP^1\times\bP^1$, we know that $Y$ admits a KE metric and hence is K-polystable by \cite{berman_polystability}.

 \item A degree $2a$ hypersurface in $\PP(1,1,a,a)$ is defined by an equation
	\[
	q(z,w) + f(x,y) z + h(x,y) w + g(x,y) = 0
	\]
	where $q$ is a quadratic form, $f$ and $h$ are forms of degree $a$, and $g$ is a form of degree $2a$.
	With an automorphism of $\PP(1,1,a,a)$ which is induced by a linear change of the coordinates $z,w$, we can diagonalise the quadratic form $q$, so that the term $zw$ disappears.
	Furthermore, if $q$ has full rank, with an automorphism of $\PP(1,1,a,a)$ induced by $z \mapsto z + \frac{f}{2}$ and $w \mapsto w + \frac{h}{2}$, the equation becomes
	\[
	z^2 + w^2 + g(x,y) = 0.
	\]
\end{enumerate}
\end{remark}

\begin{proof}[Proof of Theorem~\ref{thm:k=git}]
	We start from the ``if'' part.
	Suppose $X\subset\bP(1,1,a,a)$ is defined by the equation $z^2+w^2+g(x,y)=0$ with $g\neq 0$. Then the ``if'' part states that $X$ is K-semistable (resp.\ K-polystable) if $g$ is GIT semistable (resp.\ GIT polystable).

	By forgetting the $w$-coordinate, we obtain a double cover $\pi: X\to \bP(1,1,a)$ with branch locus $D=(z^2+g(x,y)=0)$. Thus by \cite{LZ20, Zhu20} we know that $X$ is K-semistable (resp.\ K-polystable) if and only if $(\bP(1,1,a),\frac{1}{2}D)$ is K-semistable (resp.\ K-polystable).

	Let us assume for the moment that $g$ is an arbitrary degree $2a$ binary form. Denote by $D_0:=(z^2=0)$ as a divisor on $\bP(1,1,a)$.  It is clear that $\bP(1,1,a)$ is the projective cone over $\bP^1$ with polarization $\cO_{\bP^1}(a)$, and $\frac{1}{2}D_0$ is the section at infinity. Since $\bP^1$ is K\"ahler--Einstein,  \cite[Proposition 3.3]{LL19} shows that $(\bP(1,1,a), (1-\frac{r}{2})\frac{1}{2}D_0)$ admits a conical KE metric, where $r\in \mathbb{Q}_{>0}$ satisfies $\cO_{\bP^1}(a)\sim_{\mathbb{Q}} -r^{-1} K_{\bP^1}$, i.e. $r=\frac{2}{a}$. By computation, $(1-\frac{r}{2})\frac{1}{2}=\frac{a-1}{2a}$. Thus $(\bP(1,1,a), \frac{a-1}{2a}D_0)$ admits a conical KE metric and hence is K-polystable.
	It is clear that under the $\bG_m$-action $\sigma$ on $\bP(1,1,a)$ given by $\sigma(t)\cdot [x,y,z]=[x,y,tz]$, the log Fano pair $(\bP(1,1,a), \frac{a-1}{2a}D)$ specially degenerates to $(\bP(1,1,a), \frac{a-1}{2a}D_0)$ as $t\to 0$. Thus by openness of K-semistability \cite{BLX19, Xu19} we know that $(\bP(1,1,a), \frac{a-1}{2a}D)$ is K-semistable.

	Next, we assume that $g\neq 0$ is GIT semistable. By GIT of binary forms, we know that each linear factor in $g(x,y)$ has multiplicity at most $a$. In other words, the curve $D$ has only $A_{k-1}$-singularities (i.e.\ locally analytically given by $x^2+y^k=0$) where $k\leq a$. Thus we have that $\lct(\bP(1,1,a);D)\geq \frac{1}{2}+\frac{1}{a}=\frac{a+2}{2a}$. This implies that $(\bP(1,1,a), \frac{a+2}{2a}D)$ is a log canonical log Calabi--Yau pair. Thus interpolation for K-stability \cite[Proposition 2.13]{ADL19} implies that $(\bP(1,1,a), \frac{1}{2}D)$ is K-semistable.

	Next, we assume that $g\neq 0$ is GIT polystable. There are two cases: $g$ is strictly GIT polystable (i.e.\ GIT polystable but not GIT stable), or $g$ is GIT stable. In the first case, under a suitable coordinate we may write $g(x,y)=x^a y^a$. Thus the double cover $X$ is toric, and as shown in Proposition~\ref{prop:toric} $X$ is K-polystable. In the second case, we know that each linear factor in $g(x,y)$ has multiplicity at most $a-1$. Thus the curve $D$ has only $A_{k-1}$-singularities where $k\leq a-1$. Thus we have that $\lct(\bP(1,1,a);D)\geq \frac{1}{2}+\frac{1}{a-1}>\frac{a+2}{2a}$, which implies that $(\bP(1,1,a), \frac{a+2}{2a}D)$ is a klt log Calabi--Yau pair. Thus interpolation for K-stability \cite[Proposition 2.13]{ADL19} implies that $(\bP(1,1,a), \frac{1}{2}D)$ is K-stable. This finishes the proof of the ``if'' part.

	Next, we treat the ``only if'' part. In fact, this follows from moduli comparison arguments as in \cite{ADL19}. Let $\mathbf{A}:=H^0(\bP^1, \cO_{\bP^1}(2a))$ be the affine space parametrizing degree $2a$ binary forms.
	Let $\mathbf{A}^{\rm ss}\subset \mathbf{A}\setminus\{0\}$ be the open subset of GIT semistable binary forms.
	Consider the universal family of weighted hypersurfaces $\mathcal{X}\to \mathbf{A}^{\rm ss}$ where $\mathcal{X}\subset \bP(1,1,a,a)\times \mathbf{A}^{\rm ss}$ has fibre $(z^2+w^2+g(x,y)=0)$ over each $g\in \mathbf{A}^{\rm ss}$.
	By the ``if'' part we know that each fibre of $\mathcal{X}\to \mathbf{A}^{\rm ss}$ is K-semistable.

	Consider the $(\bG_m\times \mathrm{SL}_2)$-action $\lambda$ on $\mathbf{A}$ given by 	$\lambda(t,A)\cdot g(x,y)=t^2 g(A^{-1}(x,y))$. It is clear that $\mathbf{A}^{\rm ss}$ is a $(\bG_m\times\mathrm{SL}_2)$-invariant open subset. Then there is a $(\bG_m\times\mathrm{SL}_2)$-action $\tilde{\lambda}$ on $\mathcal{X}$ as a lifting of $\lambda$ given by
	\[
	 \tilde{\lambda}(t,A)\cdot ([x,y,z,w],g):=([A(x,y),tz,tw], \lambda(t,A)\cdot g).
	\]
    Denote by $\mathcal{M}^{\mathrm{GIT}}:=[\mathbf{A}^{\rm ss}/(\bG_m\times\mathrm{SL}_2)]$ and $M^{\mathrm{GIT}}:=\mathbf{P}\mathbin{/\mkern-6mu/} \mathrm{SL}_2$ where $\mathbf{P}:=\bP(\mathbf{A})$. It is clear that $M^{\mathrm{GIT}}$ is the good moduli space of $\mathcal{M}^{\mathrm{GIT}}$. Taking quotient of the family $\mathcal{X}\to\mathbf{A}^{\rm ss}$ by $
    \tilde{\lambda}$, we obtain a $\mathbb{Q}$-Gorenstein flat family of K-semistable $\mathbb{Q}$-Fano varieties over $\mathcal{M}^{\mathrm{GIT}}$, where fibres over closed points are precisely K-polystable fibres.

    From a series of important recent works \cite{Jia17, LWX18, CP18, blum_xu_uniqueness, ABHLX19, Xu19, BLX19, XZ19, XZ20, BHLLX20, LXZ21}, we know that there exists an Artin stack of finite type $\mathcal{M}_{2,8/a}^{\rm Kss}$ parametrizing K-semistable (possibly singular) del Pezzo surfaces of degree $8/a$. Moreover, $\mathcal{M}_{2,8/a}^{\rm Kss}$ admits a projective good moduli space $M_{2,8/a}^{\rm Kps}$ parametrizing K-polystable ones. Let $\mathcal{M}^{\mathrm{K}}$ be the Zariski closure (with reduced structure) of the locally closed substack in $\mathcal{M}_{2,8/a}^{\rm Kss}$ parametrizing K-semistable degree $2a$ weighted hypersurfaces $X\subset \bP(1,1,a,a)$. Let $M^{\mathrm{K}}$ be the good moduli space of $\mathcal{M}^{\mathrm{K}}$ as a closed  algebraic subspace of $M_{2,8/a}^{\rm Kps}$.
    Then the above construction and the ``if'' part produces a morphism $\Phi:\mathcal{M}^{\mathrm{GIT}}\to \mathcal{M}^{\mathrm{K}}$ which descends to a morphism $\phi:M^{\mathrm{GIT}}\to M^{\mathrm{K}}$. Since a general weighted hypersurface $X$ has the form $z^2+w^2+g(x,y)=0$ in a suitable coordinate where $g\neq 0$ has no multiple linear factors, we know that $\Phi$ is dominant. The ``if'' part shows that $\Phi$ sends closed points to closed points. Since $M^{\mathrm{GIT}}$ is projective, we know that $\phi$ is proper and dominant, which implies that $\phi$ is surjective. Moreover, since $\mathrm{SL}_2$ has no non-trivial characters, we have injections
    \[
     \mathrm{Pic}(M^{\mathrm{GIT}})=\mathrm{Pic}(\mathbf{P}\mathbin{/\mkern-6mu/}\mathrm{SL}_2)\hookrightarrow \mathrm{Pic}_{\mathrm{SL}_2}(\mathbf{P}^{\rm ss})\hookrightarrow \mathrm{Pic}(\mathbf{P}^{\rm ss})
    \]
    by \cite[Proposition 4.2 and Section 2.1]{KKV89}. It is clear that $\mathbf{P}\setminus\mathbf{P}^{\rm ss}$ has codimension at least $2$ in $\mathbf{P}$. Thus we have $\mathrm{Pic}(\mathbf{P}^{\rm ss})\cong \mathrm{Pic}(\mathbf{P})\cong \mathbb{Z}$. In particular, the GIT quotient $M^{\mathrm{GIT}}$ has Picard rank $1$. It is clear that $M^{\mathrm{K}}$ is not a single point. Thus $\phi:M^{\mathrm{GIT}}\to M^{\mathrm{K}}$ is a finite surjective morphism by Zariski's main theorem.

    Next, we show that K-poly/semistability implies GIT poly/semistability. Since $\phi$ is surjective,  a K-polystable hypersurface $X\subset\bP(1,1,a,a)$ satisfies that $[X]=\phi([g])\in M^{\mathrm{K}}$ for some GIT polystable binary form $g\in \mathbf{A}\setminus\{0\}$. Thus $X$ has the form $z^2+w^2+g(x,y)=0$ with $g\neq 0$ being GIT polystable. If $X\subset\bP(1,1,a,a)$ is K-semistable, then it specially degenerates to a K-polystable point $[X_0]\in M^{\mathrm{K}}$ by \cite{LWX18}. Clearly $X_0$ has the form $z^2+w^2+g_0(x,y)=0$ with $g_0\neq 0$ being GIT polystable. Since the rank of quadratic forms cannot jump up under degeneration, the quadratic terms in $(z,w)$ of the equation of $X$ has rank $2$, which implies that $X=(z^2+w^2+g(x,y)=0)$ for some $g$. By \cite[Corollary 1.7]{Fuj19}, we know that $(\bP(1,1,a), \frac{1}{2}D)$ is K-semistable where $D=(z^2+g(x,y)=0)$. Since $X$ carries a $\mathbb{Z}/2\mathbb{Z}$-action given by $w\mapsto -w$, we may assume that the special degeneration from $X$ to $X_0$ is $\mathbb{Z}/2\mathbb{Z}$-equivariant by \cite{LZ20, Zhu20}. In particular, this shows that $(\bP(1,1,a), \frac{1}{2}D)$ specially degenerates to $(\bP(1,1,a), \frac{1}{2}D_0)$ where $D_0=(z^2+g_0(x,y)=0)$. By the lower semi-continuity of lct (see e.g.\ \cite{demailly_kollar}), we know that $\lct(\bP(1,1,a); D)\geq \lct(\bP(1,1,a);D_0)\geq \frac{a+2}{2a}$ where the latter inequality was proven in the ``if'' part due to the fact that $g_0$ is GIT polystable. Thus this shows that $g\neq 0$, and each linear factor in $g(x,y)$ has multiplicity at most $a$. Thus we obtain the GIT semistability of $g$.
    The proof of the ``only if'' part is finished.

	Finally, we show that any hypersurface $X\subset\bP(1,1,a,a)$ of degree $2a$ is not K-stable. If $X$ were K-stable, then it would have equation $z^2 + w^2 + g(x,y) = 0$, or equivalently the equation $zw + g(x,y) = 0$. It is clear that $t \cdot (z,w) = (tz, t^{-1}w)$ defines an effective action of $\mathbb{G}_\mathrm{m}$ on $X$. Thus $X$ is not K-stable by definition.
\end{proof}

	\begin{proof}[Proof of Corollary~\ref{cor:k-poly}]
		It is clear that $X$ is quasi-smooth if and only if, up to an automorphism of $\PP(1,1,a,a)$, $X$ has the equation $z^2+w^2+g(x,y)=0$ where $g$ has no multiple linear factors. Thus by Theorem~\ref{thm:k=git}  we conclude that $X$ is K-polystable and not K-stable. The existence of KE metrics on $X$ follows from \cite{ltw_1}.
	\end{proof}

	\begin{remark}\label{rem:a=2or4}
		For $a=2$, the del Pezzo surface $X$ admits an embedding into $\bP^4$ as a complete intersection of two hyperquadrics. This is induced by the linear system $|-K_X|$ which  is very ample.

		For $a=4$, $X$ (as a double cover of $\bP(1,1,4)$) appeared in \cite{odaka_spotti_sun} where it lies in the exceptional divisor of Kirwan blow-up of the GIT moduli space. Hence $X$ admits a $\mathbb{Q}$-Gorenstein smoothing to degree $2$ smooth del Pezzo surfaces.

		Therefore, in both cases ($a=2$ or $a=4$) our K-moduli space $M^{\mathrm{K}}$, introduced in the proof of Theorem~\ref{thm:k=git}, form a divisor in the K-moduli spaces of $\mathbb{Q}$-Gorenstein smoothable del Pezzo surfaces of degree $\frac{8}{a}$ studied in \cite{MM93, odaka_spotti_sun}.
		We will see in Proposition~\ref{prop:a=3or>=5} what happens for $a=3$ or $a \geq 5$.
	\end{remark}

\begin{proposition} \label{prop:a=3or>=5}
	If $a=3$ or $a \geq 5$, then the locus of K-polystable degree $2a$ hypersurfaces in $\PP(1,1,a,a)$ is a connected component of
	$M_{2,8/a}^{\rm Kps}$.
\end{proposition}

\begin{proof}
We denote by $\Gamma$ the connected component of $M_{2,8/a}^{\rm Kps}$ containing K-polystable degree $2a$ hypersurfaces in $\PP(1,1,a,a)$.
In the proof of Theorem~\ref{thm:k=git} we showed that the locus of K-polystable degree $2a$ hypersurfaces in $\PP(1,1,a,a)$ is closed in $\Gamma$; this locus is denoted by $M^{\mathrm{K}}$.
We need to prove that  $M^{\mathrm{K}}$ coincides with $\Gamma$. We will achieve this by a dimension count. Using the notation of the proof of Theorem~\ref{thm:k=git}, there is a finite surjective morphism $\phi: M^{\mathrm{GIT}}\to M^{\mathrm{K}}$. Thus we have
\[
\dim M^{\mathrm{K}} = \dim M^{\mathrm{GIT}} = \dim \mathbf{P} - \dim \mathrm{SL}_2 = 2a-3.
\]

Let us now compute the dimension of $\Gamma$ by analysing the deformation theory of the K-polystable toric del Pezzo surface $Y$ introduced in Proposition~\ref{prop:toric}. Note that a similar study was discussed in \cite{MGS21}.

\medskip

Let $\cT^0_Y$ denote the sheaf of derivations on $Y$, i.e.\ the dual of $\Omega_Y^1$.
Let $\cTqG{1}{Y}$ denote the sheaf of $1$st order $\QQ$-Gorenstein deformations of $Y$.
The singular locus of $Y$, which consists of $4$ points, contains the set-theoretic support of $\cTqG{1}{Y}$.

Since $Y$ is a toric Fano, we have $H^1(\cT^0_Y) = H^2(\cT^0_Y) = 0$ by \cite[\S4.3]{petracci_survey}. Via a standard argument about the local-to-global spectral sequence for Ext, we deduce that the tangent space of the $\QQ$-Gorenstein deformation functor of $Y$ is $H^0(\cTqG{1}{Y})$.
The $\QQ$-Gorenstein deformation functor of $Y$ is unobstructed because $Y$ is a del Pezzo surface with cyclic quotient singularities \cite[Lemma~6]{procams}. Therefore the germ at the origin of the vector space $H^0(\cTqG{1}{Y})$ is the base of the miniversal (Kuranishi) $\QQ$-Gorenstein deformation of $Y$.

Consider the torus $T_N = N \otimes_\ZZ \mathbb{G}_\mathrm{m}$ acting on the toric variety $Y$.
There is an action of $T_N$ on the vector space $H^0(\cTqG{1}{Y})$, hence $H^0(\cTqG{1}{Y})$ splits into the direct sum of irreducible representations (characters) of the torus $T_N$.

We observe that the singularities of $Y$ are:
\begin{itemize}
	\item $2$ points of type $\frac{1}{a}(1,-1) = A_{a-1}$, which correspond to the cones in $\Sigma$ spanned by
	\[
	\pm \begin{pmatrix}
	a \\ 1
	\end{pmatrix},
	\
	\pm \begin{pmatrix}
	0 \\ 1
	\end{pmatrix},
	\]
	\item $2$ points of type $\frac{1}{a}(1,1)$, which correspond to the cones in $\Sigma$ spanned by
	\[
	\pm \begin{pmatrix}
	a \\ 1
	\end{pmatrix},
	\
	\mp \begin{pmatrix}
	0 \\ 1
	\end{pmatrix}.
	\]
\end{itemize}
Since $a=3$ or $a \geq 5$, the surface singularity $\frac{1}{a}(1,1)$ is $\QQ$-Gorenstein rigid, so it does not contribute to $H^0(\cTqG{1}{Y})$. One can see that the $T_N$-representation $H^0(\cTqG{1}{Y})$ is the direct sum of the $1$-dimensional representation of $T_N$ associated to the characters
\begin{equation} \label{eq:weights}
(0, \pm 2), (0, \pm 3), \dots, (0, \pm a) \in M.
\end{equation}
In particular $\dim H^0(\cTqG{1}{Y}) = 2a-2$, so the base of the miniversal $\QQ$-Gorenstein deformation of $Y$ is a smooth germ of dimension $2a-2$.

Since the weights in \eqref{eq:weights} are contained in a rank $1$ sublattice of $M$, there exists a $1$-dimensional subtorus of $T_N$ which acts trivially on $H^0(\cTqG{1}{Y})$. More precisely one can prove that the affine quotient $H^0(\cTqG{1}{Y}) / T_N$ has dimension $2a-3$.

Since every facet of the polytope $P^\circ$ has no interior lattice points, by \cite[Proposition~2.6]{ask_petracci} the automorphism group of $Y$ is $T_N \rtimes \Aut(P)$, where $\Aut(P) \subseteq \mathrm{GL}(N)$ is the finite group consisting of the lattice automorphisms which keep the polytope $P$ invariant. Since the difference between $T_N$ and $\Aut(Y)$ is just a finite group, we deduce that the affine quotient the affine quotient $H^0(\cTqG{1}{Y}) / \Aut(Y)$ has dimension $2a-3$.
By the local structure of the K-moduli space \cite{ABHLX19, luna_etale_slice_stacks} we know that the completion of the local ring of $\Gamma$ at $[Y]$ coincides with the completion at the origin of $H^0(\cTqG{1}{Y}) / \Aut(Y)$. This proves that $\Gamma$ has dimension $2a-3$ at $[Y]$. Since $\dim M^{\mathrm{K}}=2a-3$, we know that $M^{\mathrm{K}}$ is an irreducible component of $\Gamma$.

Moreover, since all K-polystable del Pezzo surfaces in $M^{\mathrm{K}}$ have cyclic quotient singularities by Theorem \ref{thm:k=git}, they have unobstructed $\mathbb{Q}$-Gorenstein deformations by \cite[Lemma~6]{procams}. Thus the stack $\mathcal{M}_{2,\frac{8}{a}}^{\rm Kss}$ is smooth in an open neighbourhood of $\mathcal{M}^{\mathrm{K}}$. In particular, this implies that $\Gamma$ is normal in an open neighbourhood of $M^{\mathrm{K}}$. Since $M^{\mathrm{K}}$ is an irreducible component of $\Gamma$, we have $M^\mathrm{K} = \Gamma$.
\end{proof}

\begin{comment}
The K-(semi/poly)stability of small $\QQ$-Gorenstein deformations of $Y$ is equivalent to the GIT-(semi/poly)stability of the $\Aut(Y)$-action on $\DefqG{Y}$ \cite[\S2-3]{odaka_spotti_sun}.
In purely algebraic terms this equivalence is the local structure of the K-moduli stack of K-semistable Fano varieties and of the K-moduli space of K-polystable Fano varieties
. From what has been seen above we deduce (ii).

\medskip

It remains to prove (iii).

This easily implies that the stabiliser of every point in $\DefqG{Y}$ with respect to the action of $\Aut(Y)$ contains $\mathbb{G}_\mathrm{m}$.
By the considerations explained above about the local structure of the K-moduli stack at $Y$, we deduce that the automorphism group of every
small $\QQ$-Gorenstein deformation of $Y$ contains $\mathbb{G}_\mathrm{m}$.

$Y$ is a K-polystable del Pezzo surface with volume $K^2_Y = \frac{8}{a}$.

$Y$ has four singular points: two of type $\frac{1}{a}(1,a-1) = A_{a-1}$ and two of type $\frac{1}{a}(1,1)$.

The base of the miniversal $\QQ$-Gorenstein deformation of $Y$ is smooth of dimension
\[
\begin{cases}
4 &\qquad \text{if } a = 2, \\
8 &\qquad \text{if } a = 4, \\
2a-2 &\qquad \text{if } a=3 \text{ or } a \geq 5. \\
\end{cases}
\]

The sheaf $\cTqG{1}{Y}$ is supported on the singular locus of $Y$: at the singularity $\frac{1}{a}(1,-1)$ it has length $a-1$ and at the singularity $\frac{1}{a}(1,1)$ it has length
\[
\begin{cases}
1 &\qquad \text{if } a = 2 \text{ or } a=4, \\
0 &\qquad \text{otherwise.}
\end{cases}
\]
This implies
\[
\dim \rH^0(\cTqG{1}{Y}) = \begin{cases}
4 &\qquad \text{if } a = 2, \\
8 &\qquad \text{if } a = 4, \\
2a-2 &\qquad \text{if } a=3 \text{ or } a \geq 5. \\
\end{cases}
\]

If $a \geq 3$, then the automorphism group of the polytope $P_a$ is the following non-cyclic group of order $4$:
\[
\Aut(P_a) = \left\{
\begin{pmatrix}
1 & 0 \\ 0 & 1
\end{pmatrix}
, \
\begin{pmatrix}
-1 & 0 \\ 0 & -1
\end{pmatrix}
, \
\begin{pmatrix}
-1 & a \\ 0 & 1
\end{pmatrix}
, \
\begin{pmatrix}
1 & -a \\ 0 & -1
\end{pmatrix}
\right\} \subset \mathrm{GL}_2(\ZZ)
\]
\end{comment}

\bibliographystyle{alpha}